+// option '1' to save DemodBuffer any other to restore
+void save_restoreDB(uint8_t saveOpt)
+{
+ static uint8_t SavedDB[MAX_GRAPH_TRACE_LEN];
+ static size_t SavedDBlen;
+ static bool DB_Saved = false;
+
+ if (saveOpt==1) { //save
+ memcpy(SavedDB, DemodBuffer, sizeof(DemodBuffer));
+ SavedDBlen = DemodBufferLen;
+ DB_Saved=true;
+ } else if (DB_Saved){ //restore
+ memcpy(DemodBuffer, SavedDB, sizeof(DemodBuffer));
+ DemodBufferLen = SavedDBlen;
+ }
+ return;
+}
+