mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
change from active to active_props
This commit is contained in:
parent
407d802a9c
commit
4845bde486
4
flash.c
4
flash.c
|
|
@ -162,7 +162,7 @@ caldata_save(int id)
|
|||
}
|
||||
|
||||
/* after saving data, make active configuration points to flash */
|
||||
active = (properties_t*)saveareas[id];
|
||||
active_props = (properties_t*)saveareas[id];
|
||||
lastsaveid = id;
|
||||
|
||||
return 0;
|
||||
|
|
@ -186,7 +186,7 @@ caldata_recall(int id)
|
|||
return -1;
|
||||
|
||||
/* active configuration points to save data on flash memory */
|
||||
active = src;
|
||||
active_props = src;
|
||||
lastsaveid = id;
|
||||
|
||||
/* duplicated saved data onto sram to be able to modify marker/trace */
|
||||
|
|
|
|||
8
main.c
8
main.c
|
|
@ -349,16 +349,16 @@ properties_t current_props = {
|
|||
/* active_marker */ 0,
|
||||
/* checksum */ 0
|
||||
};
|
||||
properties_t *active = ¤t_props;
|
||||
properties_t *active_props = ¤t_props;
|
||||
|
||||
void
|
||||
ensure_edit_config(void)
|
||||
{
|
||||
if (active == ¤t_props)
|
||||
if (active_props == ¤t_props)
|
||||
return;
|
||||
|
||||
//memcpy(¤t_props, active, sizeof(config_t));
|
||||
active = ¤t_props;
|
||||
//memcpy(¤t_props, active_props, sizeof(config_t));
|
||||
active_props = ¤t_props;
|
||||
// move to uncal state
|
||||
cal_status = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ typedef struct {
|
|||
#define CONFIG_MAGIC 0x436f4e45 /* 'CoNF' */
|
||||
|
||||
extern int16_t lastsaveid;
|
||||
extern properties_t *active;
|
||||
extern properties_t *active_props;
|
||||
extern properties_t current_props;
|
||||
|
||||
#define frequency0 current_props._frequency0
|
||||
|
|
@ -274,7 +274,7 @@ extern properties_t current_props;
|
|||
#define sweep_points current_props._sweep_points
|
||||
#define cal_status current_props._cal_status
|
||||
#define frequencies current_props._frequencies
|
||||
#define cal_data active->_cal_data
|
||||
#define cal_data active_props->_cal_data
|
||||
|
||||
#define trace current_props._trace
|
||||
#define markers current_props._markers
|
||||
|
|
|
|||
Loading…
Reference in a new issue