change from active to active_props

pull/4/head
TT 9 years ago
parent 407d802a9c
commit 4845bde486

@ -162,7 +162,7 @@ caldata_save(int id)
} }
/* after saving data, make active configuration points to flash */ /* after saving data, make active configuration points to flash */
active = (properties_t*)saveareas[id]; active_props = (properties_t*)saveareas[id];
lastsaveid = id; lastsaveid = id;
return 0; return 0;
@ -186,7 +186,7 @@ caldata_recall(int id)
return -1; return -1;
/* active configuration points to save data on flash memory */ /* active configuration points to save data on flash memory */
active = src; active_props = src;
lastsaveid = id; lastsaveid = id;
/* duplicated saved data onto sram to be able to modify marker/trace */ /* duplicated saved data onto sram to be able to modify marker/trace */

@ -349,16 +349,16 @@ properties_t current_props = {
/* active_marker */ 0, /* active_marker */ 0,
/* checksum */ 0 /* checksum */ 0
}; };
properties_t *active = &current_props; properties_t *active_props = &current_props;
void void
ensure_edit_config(void) ensure_edit_config(void)
{ {
if (active == &current_props) if (active_props == &current_props)
return; return;
//memcpy(&current_props, active, sizeof(config_t)); //memcpy(&current_props, active_props, sizeof(config_t));
active = &current_props; active_props = &current_props;
// move to uncal state // move to uncal state
cal_status = 0; cal_status = 0;
} }

@ -266,7 +266,7 @@ typedef struct {
#define CONFIG_MAGIC 0x436f4e45 /* 'CoNF' */ #define CONFIG_MAGIC 0x436f4e45 /* 'CoNF' */
extern int16_t lastsaveid; extern int16_t lastsaveid;
extern properties_t *active; extern properties_t *active_props;
extern properties_t current_props; extern properties_t current_props;
#define frequency0 current_props._frequency0 #define frequency0 current_props._frequency0
@ -274,7 +274,7 @@ extern properties_t current_props;
#define sweep_points current_props._sweep_points #define sweep_points current_props._sweep_points
#define cal_status current_props._cal_status #define cal_status current_props._cal_status
#define frequencies current_props._frequencies #define frequencies current_props._frequencies
#define cal_data active->_cal_data #define cal_data active_props->_cal_data
#define trace current_props._trace #define trace current_props._trace
#define markers current_props._markers #define markers current_props._markers

@ -1322,7 +1322,7 @@ draw_cal_status(void)
ili9341_fill(0, y, 10, 6*YSTEP, 0x0000); ili9341_fill(0, y, 10, 6*YSTEP, 0x0000);
if (cal_status & CALSTAT_APPLY) { if (cal_status & CALSTAT_APPLY) {
char c[3] = "C0"; char c[3] = "C0";
if (active == &current_props) if (active_props == &current_props)
c[1] = '*'; c[1] = '*';
else else
c[1] += lastsaveid; c[1] += lastsaveid;

Loading…
Cancel
Save

Powered by TurnKey Linux.