Forgot about resetting the grid offsets

This commit is contained in:
jlitewski committed 2024-04-20 22:47:42 -04:00
1 parent 791f02209d
commit 2d0bc5100a
8 files changed
+23 -5

No files matched your search

+2
View File
@@ -1152,6 +1152,7 @@ bool t55xxTryDetectModulationEx(uint8_t downlink_mode, bool print_config, uint32
if (clk > 0) {
// allow undo
buffer_savestate_t saveState = save_bufferS32(g_GraphBuffer, g_GraphTraceLen);
saveState.offset = g_GridOffset;
// skip first 160 samples to allow antenna to settle in (psk gets inverted occasionally otherwise)
CmdLtrim("-i 160");
if ((PSKDemod(0, 0, 6, false) == PM3_SUCCESS) && test(DEMOD_PSK1, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {
@@ -1201,6 +1202,7 @@ bool t55xxTryDetectModulationEx(uint8_t downlink_mode, bool print_config, uint32
} // inverse waves does not affect this demod
//undo trim samples
restore_bufferS32(saveState, g_GraphBuffer);
g_GridOffset = saveState.offset;
}
}
if (hits == 1) {