hf plot - now uses NG

This commit is contained in:
iceman1001 2022-07-17 19:29:47 +02:00
parent 07e5f62cab
commit 0554ec220f
3 changed files with 6 additions and 6 deletions

View file

@ -209,6 +209,6 @@ void HfPlotDownload(void) {
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
// Trigger a finish downloading signal with an ACK frame
reply_mix(CMD_ACK, 1, 0, FPGA_TRACE_SIZE, 0, 0);
reply_ng(CMD_FPGAMEM_DOWNLOAD, PM3_SUCCESS, NULL, 0);
LED_B_OFF();
}

View file

@ -416,10 +416,10 @@ int CmdHFSniff(const char *Cmd) {
int handle_hf_plot(void) {
uint8_t buf[FPGA_TRACE_SIZE];
uint8_t buf[FPGA_TRACE_SIZE] = {0};
PacketResponseNG response;
if (!GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &response, 4000, true)) {
if (GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &response, 4000, true) == false) {
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
return PM3_ETIMEOUT;
}

View file

@ -834,7 +834,7 @@ bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint3
return false;
}
case FPGA_MEM: {
SendCommandMIX(CMD_FPGAMEM_DOWNLOAD, start_index, bytes, 0, NULL, 0);
SendCommandNG(CMD_FPGAMEM_DOWNLOAD, NULL, 0);
return dl_it(dest, bytes, response, ms_timeout, show_warning, CMD_FPGAMEM_DOWNLOADED);
}
}
@ -856,8 +856,8 @@ static bool dl_it(uint8_t *dest, uint32_t bytes, PacketResponseNG *response, siz
if (response->cmd == CMD_ACK)
return true;
// Spiffs download is converted to NG,
if (response->cmd == CMD_SPIFFS_DOWNLOAD)
// Spiffs // fpgamem-plot download is converted to NG,
if (response->cmd == CMD_SPIFFS_DOWNLOAD || response->cmd == CMD_FPGAMEM_DOWNLOAD)
return true;
// sample_buf is a array pointer, located in data.c