Skip to content

Commit 545f449

Browse files
Alexebrahimebrahim
authored andcommitted
Update naming from OW_CMD to OW_CTRL for getting module count to match firmware (#357)
1 parent 9bd4e20 commit 545f449

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/openlifu/io/LIFUConfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
OW_CMD_RESET = 0x0F
4040

4141
# Firmware Update / Module Commands (starting at 0x10)
42-
OW_CMD_GET_MODULE_COUNT = 0x10
42+
OW_CTRL_GET_MODULE_COUNT = 0x1A
4343

4444
# Controller Commands
4545
OW_CTRL_SET_SWTRIG = 0x13

src/openlifu/io/LIFUTXDevice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
OW_CMD_DFU,
113113
OW_CMD_ECHO,
114114
OW_CMD_GET_AMBIENT,
115-
OW_CMD_GET_MODULE_COUNT,
116115
OW_CMD_GET_TEMP,
117116
OW_CMD_HWID,
118117
OW_CMD_PING,
@@ -121,6 +120,7 @@
121120
OW_CMD_USR_CFG,
122121
OW_CMD_VERSION,
123122
OW_CONTROLLER,
123+
OW_CTRL_GET_MODULE_COUNT,
124124
OW_CTRL_GET_SWTRIG,
125125
OW_CTRL_SET_SWTRIG,
126126
OW_CTRL_START_SWTRIG,
@@ -1714,7 +1714,7 @@ def get_module_count(self) -> int:
17141714

17151715
r = self.uart.send_packet(
17161716
id=None, packetType=OW_CMD,
1717-
command=OW_CMD_GET_MODULE_COUNT, addr=0
1717+
command=OW_CTRL_GET_MODULE_COUNT, addr=0
17181718
)
17191719
self.uart.clear_buffer()
17201720

@@ -1725,7 +1725,7 @@ def get_module_count(self) -> int:
17251725

17261726
# Fallback: TX7332 chip count / 2
17271727
logger.info(
1728-
"OW_CMD_GET_MODULE_COUNT not supported; falling back to TX7332 count"
1728+
"OW_CTRL_GET_MODULE_COUNT not supported; falling back to TX7332 count"
17291729
)
17301730
module_count = self.get_tx_module_count()
17311731
return module_count

0 commit comments

Comments
 (0)