|
|
|
@ -779,7 +779,6 @@ config_t config = {
|
|
|
|
.trace_color = { DEFAULT_TRACE_1_COLOR, DEFAULT_TRACE_2_COLOR, DEFAULT_TRACE_3_COLOR, DEFAULT_TRACE_4_COLOR },
|
|
|
|
.trace_color = { DEFAULT_TRACE_1_COLOR, DEFAULT_TRACE_2_COLOR, DEFAULT_TRACE_3_COLOR, DEFAULT_TRACE_4_COLOR },
|
|
|
|
// .touch_cal = { 693, 605, 124, 171 }, // 2.4 inch LCD panel
|
|
|
|
// .touch_cal = { 693, 605, 124, 171 }, // 2.4 inch LCD panel
|
|
|
|
.touch_cal = { 338, 522, 153, 192 }, // 2.8 inch LCD panel
|
|
|
|
.touch_cal = { 338, 522, 153, 192 }, // 2.8 inch LCD panel
|
|
|
|
.freq_mode = FREQ_MODE_START_STOP,
|
|
|
|
|
|
|
|
.harmonic_freq_threshold = 300000000,
|
|
|
|
.harmonic_freq_threshold = 300000000,
|
|
|
|
.vbat_offset = 500
|
|
|
|
.vbat_offset = 500
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -819,6 +818,8 @@ void load_default_properties(void)
|
|
|
|
current_props._active_marker = 0;
|
|
|
|
current_props._active_marker = 0;
|
|
|
|
current_props._domain_mode = 0;
|
|
|
|
current_props._domain_mode = 0;
|
|
|
|
current_props._marker_smith_format = MS_RLC;
|
|
|
|
current_props._marker_smith_format = MS_RLC;
|
|
|
|
|
|
|
|
current_props._freq_mode = FREQ_MODE_START_STOP;
|
|
|
|
|
|
|
|
|
|
|
|
//Checksum add on caldata_save
|
|
|
|
//Checksum add on caldata_save
|
|
|
|
//current_props.checksum = 0;
|
|
|
|
//current_props.checksum = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1003,7 +1004,7 @@ set_sweep_frequency(int type, uint32_t freq)
|
|
|
|
ensure_edit_config();
|
|
|
|
ensure_edit_config();
|
|
|
|
switch (type) {
|
|
|
|
switch (type) {
|
|
|
|
case ST_START:
|
|
|
|
case ST_START:
|
|
|
|
config.freq_mode &= ~FREQ_MODE_CENTER_SPAN;
|
|
|
|
freq_mode &= ~FREQ_MODE_CENTER_SPAN;
|
|
|
|
if (frequency0 != freq) {
|
|
|
|
if (frequency0 != freq) {
|
|
|
|
frequency0 = freq;
|
|
|
|
frequency0 = freq;
|
|
|
|
// if start > stop then make start = stop
|
|
|
|
// if start > stop then make start = stop
|
|
|
|
@ -1011,7 +1012,7 @@ set_sweep_frequency(int type, uint32_t freq)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ST_STOP:
|
|
|
|
case ST_STOP:
|
|
|
|
config.freq_mode &= ~FREQ_MODE_CENTER_SPAN;
|
|
|
|
freq_mode &= ~FREQ_MODE_CENTER_SPAN;
|
|
|
|
if (frequency1 != freq) {
|
|
|
|
if (frequency1 != freq) {
|
|
|
|
frequency1 = freq;
|
|
|
|
frequency1 = freq;
|
|
|
|
// if start > stop then make start = stop
|
|
|
|
// if start > stop then make start = stop
|
|
|
|
@ -1019,7 +1020,7 @@ set_sweep_frequency(int type, uint32_t freq)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ST_CENTER:
|
|
|
|
case ST_CENTER:
|
|
|
|
config.freq_mode |= FREQ_MODE_CENTER_SPAN;
|
|
|
|
freq_mode |= FREQ_MODE_CENTER_SPAN;
|
|
|
|
uint32_t center = frequency0 / 2 + frequency1 / 2;
|
|
|
|
uint32_t center = frequency0 / 2 + frequency1 / 2;
|
|
|
|
if (center != freq) {
|
|
|
|
if (center != freq) {
|
|
|
|
uint32_t span = frequency1 - frequency0;
|
|
|
|
uint32_t span = frequency1 - frequency0;
|
|
|
|
@ -1034,7 +1035,7 @@ set_sweep_frequency(int type, uint32_t freq)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ST_SPAN:
|
|
|
|
case ST_SPAN:
|
|
|
|
config.freq_mode |= FREQ_MODE_CENTER_SPAN;
|
|
|
|
freq_mode |= FREQ_MODE_CENTER_SPAN;
|
|
|
|
if (frequency1 - frequency0 != freq) {
|
|
|
|
if (frequency1 - frequency0 != freq) {
|
|
|
|
uint32_t center = frequency0 / 2 + frequency1 / 2;
|
|
|
|
uint32_t center = frequency0 / 2 + frequency1 / 2;
|
|
|
|
if (center < START_MIN + freq / 2) {
|
|
|
|
if (center < START_MIN + freq / 2) {
|
|
|
|
@ -1048,7 +1049,7 @@ set_sweep_frequency(int type, uint32_t freq)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ST_CW:
|
|
|
|
case ST_CW:
|
|
|
|
config.freq_mode |= FREQ_MODE_CENTER_SPAN;
|
|
|
|
freq_mode |= FREQ_MODE_CENTER_SPAN;
|
|
|
|
if (frequency0 != freq || frequency1 != freq) {
|
|
|
|
if (frequency0 != freq || frequency1 != freq) {
|
|
|
|
frequency0 = freq;
|
|
|
|
frequency0 = freq;
|
|
|
|
frequency1 = freq;
|
|
|
|
frequency1 = freq;
|
|
|
|
|