fix some potential empty responses and too much inline calls

This commit is contained in:
iceman1001 committed 2023-08-03 08:41:11 +02:00
1 parent a2ea5e3a24
commit 24a138eeb1
5 files changed
+32 -8

No files matched your search

+11
View File
@@ -382,6 +382,17 @@ int CmdLFCommandRead(const char *Cmd) {
SendCommandNG(CMD_LF_MOD_THEN_ACQ_RAW_ADC, (uint8_t *)&payload, PAYLOAD_HEADER_SIZE + cmd_len);
PacketResponseNG resp;
// init to ZERO
resp.cmd = 0,
resp.length = 0,
resp.magic = 0,
resp.status = 0,
resp.crc = 0,
resp.ng = false,
resp.oldarg[0] = 0;
resp.oldarg[1] = 0;
resp.oldarg[2] = 0;
memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE);
i = 10;
// 20sec wait loop