diff --git a/armsrc/appmain.c b/armsrc/appmain.c index ea4896e76..7b56690c7 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -3867,13 +3867,13 @@ static void PacketReceived(PacketCommandNG *packet) { break; } #ifdef PM5 - case CMD_PM5_QC_TEST: { + case CMD_PM5_QC_TEST_HW: { uint8_t failed_item = 0; uint32_t timeout_ms = 0; if (packet->length >= sizeof(timeout_ms)) { memcpy(&timeout_ms, packet->data.asBytes, sizeof(timeout_ms)); } - reply_ng(CMD_PM5_QC_TEST, QCTestPM5(&failed_item, timeout_ms) ? PM3_SUCCESS : PM3_EFAILED, &failed_item, 1); + reply_ng(CMD_PM5_QC_TEST_HW, QCTestPM5(&failed_item, timeout_ms) ? PM3_SUCCESS : PM3_EFAILED, &failed_item, 1); break; } case CMD_PM5_RGB_SET: { diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index a30c6dd22..a222d1c8a 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -2288,11 +2288,11 @@ static int CmdPM5QCTest(const char *Cmd) { PrintAndLogEx(INFO, "Performing QC test for the PM5..."); clearCommandBuffer(); - SendCommandNG(CMD_PM5_QC_TEST, (uint8_t *)&timeout_ms, sizeof(timeout_ms)); + SendCommandNG(CMD_PM5_QC_TEST_HW, (uint8_t *)&timeout_ms, sizeof(timeout_ms)); PacketResponseNG resp; // wait a bit longer than the device side sequence timeout, with headroom for RTC drift - if (WaitForResponseTimeout(CMD_PM5_QC_TEST, &resp, timeout_ms + (timeout_ms / 5) + 1000) == false) { + if (WaitForResponseTimeout(CMD_PM5_QC_TEST_HW, &resp, timeout_ms + (timeout_ms / 5) + 1000) == false) { SendCommandNG(CMD_BREAK_LOOP, NULL, 0); PrintAndLogEx(WARNING, "command execution time out"); return PM3_ETIMEOUT; diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index 452a2cbc7..fdbd2c07b 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -874,12 +874,11 @@ typedef struct { #define CMD_EEPROM_FACTORY_INFO_READ 0x0172 #define CMD_EEPROM_FACTORY_INFO_WRITE 0x0173 // PM5, QC test for the hardware -#define CMD_PM5_QC_TEST 0x0177 +#define CMD_PM5_QC_TEST_HW 0x0177 // PM5, set the antenna RGB LED colour (payload: r,g,b). Used by `hf/lf tune --rgb`. #define CMD_PM5_RGB_SET 0x0178 // PM5, provision BWM fuel-gauge (BQ27427) Design Capacity. Used by `hw bwmsetcap`. #define CMD_PM5_BWM_SET_CAP 0x0179 -#define CMD_PM5_BWM_SET_CAP 0x0179 // PM5, enable/disable BWM battery charging (AW32001E CEB). Used by `hw bwmcharge`. #define CMD_PM5_BWM_CHARGE_EN 0x017A // PM5, toggle automatic power-off on USB unplug. Used by `hw bwmautooff`.