mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-12 08:16:09 -07:00
new grid X offset calcs to fix some issues
also fixed a save_restore issue with grid alignments now save_restoreGB() saves/restores offset values added macro enumeration of SAVE vs RESTORE for save_restore commands.
This commit is contained in:
parent
999d57c201
commit
3fd7fce4ac
8 changed files with 51 additions and 67 deletions
|
@ -53,16 +53,19 @@ int ClearGraph(int redraw)
|
|||
void save_restoreGB(uint8_t saveOpt)
|
||||
{
|
||||
static int SavedGB[MAX_GRAPH_TRACE_LEN];
|
||||
static int SavedGBlen;
|
||||
static int SavedGBlen=0;
|
||||
static bool GB_Saved = false;
|
||||
static int SavedGridOffsetAdj=0;
|
||||
|
||||
if (saveOpt==1) { //save
|
||||
if (saveOpt == GRAPH_SAVE) { //save
|
||||
memcpy(SavedGB, GraphBuffer, sizeof(GraphBuffer));
|
||||
SavedGBlen = GraphTraceLen;
|
||||
GB_Saved=true;
|
||||
} else if (GB_Saved){ //restore
|
||||
SavedGridOffsetAdj = GridOffset;
|
||||
} else if (GB_Saved) { //restore
|
||||
memcpy(GraphBuffer, SavedGB, sizeof(GraphBuffer));
|
||||
GraphTraceLen = SavedGBlen;
|
||||
GridOffset = SavedGridOffsetAdj;
|
||||
RepaintGraphWindow();
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue