Added offset_delay

pull/4/head
erikkaashoek 6 years ago
parent 3a307ad78e
commit a4b0230139

@ -190,6 +190,7 @@ void set_RBW(int);
void set_drive(int d); void set_drive(int d);
void set_IF(int f); void set_IF(int f);
void set_step_delay(int t); void set_step_delay(int t);
void set_offset_delay(int t);
void set_repeat(int); void set_repeat(int);
void set_level_sweep(float); void set_level_sweep(float);
void set_level(float); void set_level(float);
@ -618,6 +619,8 @@ typedef struct setting
unsigned int unit_scale_index; unsigned int unit_scale_index;
float unit_scale; float unit_scale;
int mute; int mute;
int step_delay_mode;
int offset_delay;
uint32_t checksum; uint32_t checksum;
}setting_t; }setting_t;
@ -631,6 +634,8 @@ void reset_settings(int m);
#define S_STATE(X) ((X)&1) #define S_STATE(X) ((X)&1)
enum { S_OFF=0, S_ON=1, S_AUTO_OFF=2, S_AUTO_ON=3 }; enum { S_OFF=0, S_ON=1, S_AUTO_OFF=2, S_AUTO_ON=3 };
enum { SD_NORMAL, SD_PRECISE, SD_FAST, SD_MANUAL };
#ifdef __FAST_SWEEP__ #ifdef __FAST_SWEEP__
#define MINIMUM_SWEEP_TIME 2000U // Minimum sweep time on zero span in uS #define MINIMUM_SWEEP_TIME 2000U // Minimum sweep time on zero span in uS
#else #else

@ -22,7 +22,7 @@
int dirty = true; int dirty = true;
int scandirty = true; int scandirty = true;
extern int actualStepDelay; extern int SI4432_step_delay;
setting_t setting; setting_t setting;
uint32_t frequencies[POINTS_COUNT]; uint32_t frequencies[POINTS_COUNT];
@ -76,6 +76,8 @@ void reset_settings(int m)
setting.tracking = false; setting.tracking = false;
setting.modulation = MO_NONE; setting.modulation = MO_NONE;
setting.step_delay = 0; setting.step_delay = 0;
setting.offset_delay = 0;
setting.step_delay_mode = SD_NORMAL;
setting.vbw = 0; setting.vbw = 0;
setting.auto_reflevel = true; // Must be after SetReflevel setting.auto_reflevel = true; // Must be after SetReflevel
setting.decay=20; setting.decay=20;
@ -167,7 +169,7 @@ void reset_settings(int m)
uint32_t calc_min_sweep_time_us(void) // Calculate minimum sweep time in uS needed just because of the delays for the RSSI to become stable uint32_t calc_min_sweep_time_us(void) // Calculate minimum sweep time in uS needed just because of the delays for the RSSI to become stable
{ {
float t; float t;
float a = (actualStepDelay + MEASURE_TIME); // Single RSSI delay and measurement time in uS while scanning float a = (SI4432_step_delay + MEASURE_TIME); // Single RSSI delay and measurement time in uS while scanning
if (MODE_OUTPUT(setting.mode)) if (MODE_OUTPUT(setting.mode))
t = 100; t = 100;
else { else {
@ -526,12 +528,26 @@ void set_harmonic(int h)
void set_step_delay(int d) // override RSSI measurement delay or set to one of three auto modes void set_step_delay(int d) // override RSSI measurement delay or set to one of three auto modes
{ {
if ((3 <= d && d < 300) || d > 30000) // values 0 (fast scan), 1 (precise scan) and 2(extra fast scan) have special meaning and are auto calculated if ((3 <= d && d < 300) || d > 30000) // values 0 (normal scan), 1 (precise scan) and 2(fast scan) have special meaning and are auto calculated
return; return;
setting.step_delay = d; if (d <3) {
setting.step_delay_mode = d;
setting.step_delay = 0;
setting.offset_delay = 0;
} else {
setting.step_delay_mode = SD_MANUAL;
setting.step_delay = d;
}
dirty = true; dirty = true;
} }
void set_offset_delay(int d) // override RSSI measurement delay or set to one of three auto modes
{
setting.offset_delay = d;
dirty = true;
}
void set_average(int v) void set_average(int v)
{ {
setting.average = v; setting.average = v;
@ -768,28 +784,34 @@ void set_mode(int m)
// dirty = true; // dirty = true;
} }
extern int SI4432_offset_delay;
void calculate_step_delay(void) void calculate_step_delay(void)
{ {
if (setting.frequency_step == 0.0) { // zero span mode, not dependent on selected RBW if (setting.step_delay_mode == SD_MANUAL || setting.step_delay != 0) { // The latter part required for selftest 3
if (setting.step_delay <= 2) SI4432_step_delay = setting.step_delay;
actualStepDelay = 0; } else {
else SI4432_offset_delay = 0;
actualStepDelay = setting.step_delay; if (setting.frequency_step == 0.0) { // zero span mode, not dependent on selected RBW
} else if (setting.step_delay <= 2){ // Frequency sweep so use RBW to calculate minimum delay when changing frequency SI4432_step_delay = 0;
if (actual_rbw >= 191.0) actualStepDelay = 280; } else {
else if (actual_rbw >= 142.0) actualStepDelay = 350; if (actual_rbw >= 191.0) SI4432_step_delay = 280;
else if (actual_rbw >= 75.0) actualStepDelay = 450; else if (actual_rbw >= 142.0) SI4432_step_delay = 350;
else if (actual_rbw >= 56.0) actualStepDelay = 650; else if (actual_rbw >= 75.0) SI4432_step_delay = 450;
else if (actual_rbw >= 37.0) actualStepDelay = 700; else if (actual_rbw >= 56.0) SI4432_step_delay = 650;
else if (actual_rbw >= 18.0) actualStepDelay = 1100; else if (actual_rbw >= 37.0) { SI4432_step_delay = 700; SI4432_offset_delay = 200; }
else if (actual_rbw >= 9.0) actualStepDelay = 1700; else if (actual_rbw >= 18.0) { SI4432_step_delay = 1100; SI4432_offset_delay = 250; }
else if (actual_rbw >= 5.0) actualStepDelay = 3300; else if (actual_rbw >= 9.0) { SI4432_step_delay = 1700; SI4432_offset_delay = 400; }
else actualStepDelay = 6400; else if (actual_rbw >= 5.0) { SI4432_step_delay = 3300; SI4432_offset_delay = 800; }
if (setting.step_delay == 1) // In precise mode wait twice as long for RSSI to stabalize else { SI4432_step_delay = 6400; SI4432_offset_delay =1600; }
actualStepDelay *= 2; if (setting.step_delay_mode == SD_PRECISE) // In precise mode wait twice as long for RSSI to stabalize
} else SI4432_step_delay *= 2;
actualStepDelay = setting.step_delay; }
if (setting.offset_delay != 0) // Override if set
SI4432_offset_delay = setting.offset_delay;
}
} }
void apply_settings(void) // Ensure all settings in the setting structure are translated to the right HW setup void apply_settings(void) // Ensure all settings in the setting structure are translated to the right HW setup
{ {
set_switches(setting.mode); set_switches(setting.mode);
@ -890,7 +912,7 @@ void set_freq(int V, unsigned long freq) // translate the requested frequency
return; return;
} }
#if 1 #if 1
if (setting.step_delay == 2) { // If in extra fast scanning mode if (setting.step_delay_mode == SD_FAST) { // If in extra fast scanning mode
int delta = freq - real_old_freq[V]; int delta = freq - real_old_freq[V];
if (real_old_freq[V] >= 480000000) // 480MHz, high band if (real_old_freq[V] >= 480000000) // 480MHz, high band
@ -1061,7 +1083,7 @@ void update_rbw(void) // calculate the actual_rbw and the vbwSteps (#
if (setting.frequency_step > 0 && MODE_INPUT(setting.mode)) { // When doing frequency scanning in input mode if (setting.frequency_step > 0 && MODE_INPUT(setting.mode)) { // When doing frequency scanning in input mode
vbwSteps = ((int)(2 * (setting.vbw + (actual_rbw/2)) / actual_rbw)); // calculate # steps in between each frequency step due to rbw being less than frequency step vbwSteps = ((int)(2 * (setting.vbw + (actual_rbw/2)) / actual_rbw)); // calculate # steps in between each frequency step due to rbw being less than frequency step
if (setting.step_delay==1) // if in Precise scanning if (setting.step_delay_mode == SD_PRECISE) // if in Precise scanning
vbwSteps *= 2; // use twice as many steps vbwSteps *= 2; // use twice as many steps
if (vbwSteps < 1) // at least one step if (vbwSteps < 1) // at least one step
vbwSteps = 1; vbwSteps = 1;
@ -1350,7 +1372,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
int offs = 0,sm; int offs = 0,sm;
uint32_t lf = (uint32_t)f; uint32_t lf = (uint32_t)f;
if (vbwSteps > 1) { // Calculate sub steps if (vbwSteps > 1) { // Calculate sub steps
if (setting.step_delay == 1) if (setting.step_delay_mode == SD_PRECISE)
sm = 250; // steps of a quarter rbw sm = 250; // steps of a quarter rbw
else else
sm = 500; // steps of half the rbw sm = 500; // steps of half the rbw
@ -1474,7 +1496,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
skip_LO_setting: // jump here if in zero span mode and all HW frequency setup is done. skip_LO_setting: // jump here if in zero span mode and all HW frequency setup is done.
#ifdef __FAST_SWEEP__ #ifdef __FAST_SWEEP__
if (i == 0 && setting.frequency_step == 0 && setting.trigger == T_AUTO && setting.spur == 0 && actualStepDelay == 0 && setting.repeat == 1 && setting.sweep_time_us < ONE_SECOND_TIME) { if (i == 0 && setting.frequency_step == 0 && setting.trigger == T_AUTO && setting.spur == 0 && SI4432_step_delay == 0 && setting.repeat == 1 && setting.sweep_time_us < ONE_SECOND_TIME) {
// if ultra fast scanning is needed prefill the SI4432 RSSI read buffer // if ultra fast scanning is needed prefill the SI4432 RSSI read buffer
SI4432_Fill(MODE_SELECT(setting.mode), 0); SI4432_Fill(MODE_SELECT(setting.mode), 0);
} }
@ -1491,10 +1513,10 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
signal_path_loss = +7; // Loss in dB (+ is gain) signal_path_loss = +7; // Loss in dB (+ is gain)
int wait_for_trigger = false; int wait_for_trigger = false;
int old_actual_step_delay = actualStepDelay; int old_actual_step_delay = SI4432_step_delay;
if (i == 0 && setting.frequency_step == 0 && setting.trigger != T_AUTO) { // if in zero span mode and wait for trigger to happen and NOT in trigger mode if (i == 0 && setting.frequency_step == 0 && setting.trigger != T_AUTO) { // if in zero span mode and wait for trigger to happen and NOT in trigger mode
wait_for_trigger = true; // signal the wait for trigger wait_for_trigger = true; // signal the wait for trigger
actualStepDelay = 0; // and ignore requested sweep time to be as fast as possible SI4432_step_delay = 0; // and ignore requested sweep time to be as fast as possible
} }
float subRSSI; float subRSSI;
@ -1518,7 +1540,7 @@ float perform(bool break_on_operation, int i, uint32_t f, int tracking) // M
SI4432_Fill(MODE_SELECT(setting.mode), 1); // fast mode possible to pre-fill RSSI buffer SI4432_Fill(MODE_SELECT(setting.mode), 1); // fast mode possible to pre-fill RSSI buffer
} }
#endif #endif
actualStepDelay = old_actual_step_delay; // Trigger happened, restore step delay SI4432_step_delay = old_actual_step_delay; // Trigger happened, restore step delay
if (setting.trigger == T_SINGLE) if (setting.trigger == T_SINGLE)
pause_sweep(); // Trigger once so pause after this sweep has completed!!!!!!! pause_sweep(); // Trigger once so pause after this sweep has completed!!!!!!!
} }
@ -2278,7 +2300,7 @@ void draw_cal_status(void)
} }
#endif #endif
// Sweep time // Sweep time
if (setting.step_delay) if (setting.step_delay != 0)
color = BRIGHT_COLOR_GREEN; color = BRIGHT_COLOR_GREEN;
else else
color = DEFAULT_FG_COLOR; color = DEFAULT_FG_COLOR;
@ -2288,9 +2310,9 @@ void draw_cal_status(void)
y += YSTEP + YSTEP/2 ; y += YSTEP + YSTEP/2 ;
buf[0] = ' '; buf[0] = ' ';
if (setting.step_delay == 1) if (setting.step_delay_mode == SD_PRECISE)
buf[0] = 'P'; buf[0] = 'P';
if (setting.step_delay == 2) if (setting.step_delay_mode == SD_FAST)
buf[0] = 'F'; buf[0] = 'F';
strcpy(&buf[1],"Scan:"); strcpy(&buf[1],"Scan:");
ili9341_drawstring(buf, x, y); ili9341_drawstring(buf, x, y);
@ -2465,7 +2487,7 @@ static const struct {
{TC_MEASURE, TP_30MHZ, 270, 4, -50, 30, -75 }, // 13 Measure powerlevel and noise {TC_MEASURE, TP_30MHZ, 270, 4, -50, 30, -75 }, // 13 Measure powerlevel and noise
{TC_MEASURE, TPH_30MHZ, 270, 4, -40, 30, -65 }, // 14 Calibrate power high mode {TC_MEASURE, TPH_30MHZ, 270, 4, -40, 30, -65 }, // 14 Calibrate power high mode
{TC_END, 0, 0, 0, 0, 0, 0}, {TC_END, 0, 0, 0, 0, 0, 0},
{TC_MEASURE, TP_30MHZ, 30, 1, -20, 30, -70 }, // 16 Measure RBW step time {TC_MEASURE, TP_30MHZ, 30, 1, -20, 30, -60 }, // 16 Measure RBW step time
{TC_END, 0, 0, 0, 0, 0, 0}, {TC_END, 0, 0, 0, 0, 0, 0},
}; };
@ -2873,7 +2895,6 @@ void self_test(int test)
// reset_settings(M_LOW); // reset_settings(M_LOW);
setting.auto_IF = false; setting.auto_IF = false;
setting.frequency_IF=433900000; setting.frequency_IF=433900000;
setting.step_delay = 2;
ui_mode_normal(); ui_mode_normal();
// int i = 13; // calibrate low mode power on 30 MHz; // int i = 13; // calibrate low mode power on 30 MHz;
int i = 15; // calibrate low mode power on 30 MHz; int i = 15; // calibrate low mode power on 30 MHz;
@ -2882,39 +2903,71 @@ void self_test(int test)
for (int j= 0; j < 57; j++ ) { for (int j= 0; j < 57; j++ ) {
if (setting.test_argument != 0) if (setting.test_argument != 0)
j = setting.test_argument; j = setting.test_argument;
do_again:
test_prepare(i); test_prepare(i);
setting.spur = 0; setting.spur = 0;
setting.step_delay_mode = SD_NORMAL;
setting.step_delay = setting.step_delay * 5 / 4; setting.step_delay = setting.step_delay * 5 / 4;
setting.rbw = SI4432_force_RBW(j); setting.rbw = SI4432_force_RBW(j);
shell_printf("RBW = %d, ",setting.rbw); shell_printf("RBW = %d, ",setting.rbw);
set_sweep_frequency(ST_SPAN, (uint32_t)(setting.rbw * 10000)); set_sweep_frequency(ST_SPAN, (uint32_t)(setting.rbw * 200000));
setting.repeat = 10; setting.repeat = 10;
test_acquire(i); // Acquire test test_acquire(i); // Acquire test
test_validate(i); // Validate test test_validate(i); // Validate test
if (test_value == 0) {
setting.step_delay = setting.step_delay * 4 / 5;
goto do_again;
}
float saved_peakLevel = peakLevel; float saved_peakLevel = peakLevel;
// if (peakLevel < -35) { // if (peakLevel < -35) {
// shell_printf("Peak level too low, abort\n\r"); // shell_printf("Peak level too low, abort\n\r");
// return; // return;
// } // }
#if 0
shell_printf("Start level = %f, ",peakLevel); shell_printf("Start level = %f, ",peakLevel);
while (setting.step_delay > 10 && peakLevel > saved_peakLevel - 1) { while (setting.step_delay > 10 && test_value != 0 && test_value > saved_peakLevel - 0.5) {
test_prepare(i); test_prepare(i);
setting.spur = 0; setting.spur = 0;
setting.step_delay_mode = SD_NORMAL;
setting.step_delay = setting.step_delay * 4 / 5; setting.step_delay = setting.step_delay * 4 / 5;
// shell_printf("\n\rRBW = %f",SI4432_force_RBW(j)); // shell_printf("\n\rRBW = %f",SI4432_force_RBW(j));
set_sweep_frequency(ST_SPAN, (uint32_t)(setting.rbw * 10000)); set_sweep_frequency(ST_SPAN, (uint32_t)(setting.rbw * 50000));
setting.repeat = 10; setting.repeat = 10;
test_acquire(i); // Acquire test test_acquire(i); // Acquire test
test_validate(i); // Validate test test_validate(i); // Validate test
// shell_printf(" Step %f, %d",peakLevel, setting.step_delay); // shell_printf(" Step %f, %d",peakLevel, setting.step_delay);
} }
setting.step_delay = setting.step_delay * 5 / 4;
shell_printf("End level = %f, step time = %d\n\r",peakLevel, setting.step_delay); setting.step_delay = setting.step_delay * 5 / 4; // back one level
#else
setting.step_delay = setting.step_delay * 4 / 5;
#endif
setting.offset_delay = 1600;
test_value = saved_peakLevel;
if ((uint32_t)(setting.rbw * 10000) / 290 < 8000) { // fast mode possible
while (setting.offset_delay > 0 && test_value != 0 && test_value > saved_peakLevel - 1.5) {
test_prepare(i);
setting.step_delay_mode = SD_FAST;
setting.offset_delay /= 2;
setting.spur = 0;
// shell_printf("\n\rRBW = %f",SI4432_force_RBW(j));
set_sweep_frequency(ST_SPAN, (uint32_t)(setting.rbw * 200000)); // 200 times RBW
setting.repeat = 10;
test_acquire(i); // Acquire test
test_validate(i); // Validate test
// shell_printf(" Step %f, %d",peakLevel, setting.step_delay);
}
}
shell_printf("End level = %f, step time = %d, fast delay = %d\n\r",peakLevel, setting.step_delay, setting.offset_delay*2);
if (setting.test_argument != 0) if (setting.test_argument != 0)
break; break;
} }
reset_settings(M_LOW); reset_settings(M_LOW);
setting.step_delay_mode = SD_NORMAL;
setting.step_delay = 0;
} else if (test == 5) { } else if (test == 5) {
// reset_settings(M_LOW); // Make sure we are in a defined state // reset_settings(M_LOW); // Make sure we are in a defined state
in_selftest = true; in_selftest = true;

@ -25,7 +25,7 @@
#include "si4432.h" #include "si4432.h"
#pragma GCC push_options #pragma GCC push_options
#pragma GCC optimize ("O2") //#pragma GCC optimize ("O2")
#define CS_SI0_HIGH palSetPad(GPIOC, GPIO_RX_SEL) #define CS_SI0_HIGH palSetPad(GPIOC, GPIO_RX_SEL)
#define CS_SI1_HIGH palSetPad(GPIOC, GPIO_LO_SEL) #define CS_SI1_HIGH palSetPad(GPIOC, GPIO_LO_SEL)
@ -381,7 +381,7 @@ void SI4432_Set_Frequency ( uint32_t Freq ) {
// SI4432_Write_Byte( 0x07, 0x0B); // SI4432_Write_Byte( 0x07, 0x0B);
} }
int actualStepDelay = 1500; int SI4432_step_delay = 1500;
//extern int setting.repeat; //extern int setting.repeat;
#ifdef __FAST_SWEEP__ #ifdef __FAST_SWEEP__
@ -434,7 +434,8 @@ void SI4432_Fill(int s, int start)
} }
#endif #endif
#define MINIMUM_WAIT_FOR_RSSI 0 #define MINIMUM_WAIT_FOR_RSSI 280
int SI4432_offset_delay = 300;
float SI4432_RSSI(uint32_t i, int s) float SI4432_RSSI(uint32_t i, int s)
{ {
@ -458,19 +459,20 @@ float SI4432_RSSI(uint32_t i, int s)
} }
#endif #endif
SI4432_Sel = s; SI4432_Sel = s;
int stepdelay = actualStepDelay; int stepdelay = SI4432_step_delay;
if (SI4432_frequency_changed) { if (SI4432_frequency_changed) {
if (stepdelay < MINIMUM_WAIT_FOR_RSSI) { if (stepdelay < MINIMUM_WAIT_FOR_RSSI) {
stepdelay = MINIMUM_WAIT_FOR_RSSI; stepdelay = MINIMUM_WAIT_FOR_RSSI;
} }
SI4432_frequency_changed = false; SI4432_frequency_changed = false;
} else if (SI4432_offset_changed) { } else if (SI4432_offset_changed) {
stepdelay = MINIMUM_WAIT_FOR_RSSI + (stepdelay - MINIMUM_WAIT_FOR_RSSI)/8; // stepdelay = MINIMUM_WAIT_FOR_RSSI + (stepdelay - MINIMUM_WAIT_FOR_RSSI)/8;
stepdelay = SI4432_offset_delay;
SI4432_offset_changed = false; SI4432_offset_changed = false;
} }
if (stepdelay) if (stepdelay)
my_microsecond_delay(stepdelay); my_microsecond_delay(stepdelay);
// chThdSleepMicroseconds(actualStepDelay); // chThdSleepMicroseconds(SI4432_step_delay);
i = setting.repeat; i = setting.repeat;
RSSI_RAW = 0; RSSI_RAW = 0;
again: again:

@ -301,7 +301,7 @@ const uint16_t right_icons [] =
enum { enum {
KM_START=1, KM_STOP, KM_CENTER, KM_SPAN, KM_CW, KM_REFLEVEL, KM_SCALE, KM_ATTENUATION, KM_START=1, KM_STOP, KM_CENTER, KM_SPAN, KM_CW, KM_REFLEVEL, KM_SCALE, KM_ATTENUATION,
KM_ACTUALPOWER, KM_IF, KM_SAMPLETIME, KM_DRIVE, KM_LOWOUTLEVEL, KM_DECAY, KM_NOISE, KM_ACTUALPOWER, KM_IF, KM_SAMPLETIME, KM_DRIVE, KM_LOWOUTLEVEL, KM_DECAY, KM_NOISE,
KM_10MHZ, KM_REPEAT, KM_OFFSET, KM_TRIGGER, KM_LEVELSWEEP, KM_SWEEP_TIME, KM_10MHZ, KM_REPEAT, KM_OFFSET, KM_TRIGGER, KM_LEVELSWEEP, KM_SWEEP_TIME, KM_OFFSET_DELAY,
}; };
@ -514,6 +514,7 @@ static const keypads_t * const keypads_mode_tbl[] = {
keypads_plusmin_unit, // KM_TRIGGER keypads_plusmin_unit, // KM_TRIGGER
keypads_plusmin, // KM_LEVELSWEEP keypads_plusmin, // KM_LEVELSWEEP
keypads_time, // KM_SWEEP_TIME keypads_time, // KM_SWEEP_TIME
keypads_positive, // KM_OFFSET_DELAY
}; };
#ifdef __VNA__ #ifdef __VNA__
@ -525,7 +526,7 @@ static const char * const keypad_mode_label[] = {
static const char * const keypad_mode_label[] = { static const char * const keypad_mode_label[] = {
"error", "START", "STOP", "CENTER", "SPAN", "FREQ", "\2REF\0LEVEL", "SCALE", // 0-7 "error", "START", "STOP", "CENTER", "SPAN", "FREQ", "\2REF\0LEVEL", "SCALE", // 0-7
"ATTENUATE", "\2ACTUAL\0POWER", "IF", "\2SAMPLE\0DELAY", "DRIVE", "LEVEL", "SCANS", "LEVEL", // 8-15 "ATTENUATE", "\2ACTUAL\0POWER", "IF", "\2SAMPLE\0DELAY", "DRIVE", "LEVEL", "SCANS", "LEVEL", // 8-15
"FREQ" , "\2SAMPLE\0REPEAT", "OFFSET", "\2TRIGGER\0LEVEL", "\2LEVEL\0SWEEP", "\2SWEEP\0SECONDS"// 16- "FREQ" , "\2SAMPLE\0REPEAT", "OFFSET", "\2TRIGGER\0LEVEL", "\2LEVEL\0SWEEP", "\2SWEEP\0SECONDS", "\2OFFSET\0DELAY" // 16-
}; };
#endif #endif
@ -1397,10 +1398,11 @@ static const menuitem_t menu_harmonic[] =
static const menuitem_t menu_scanning_speed[] = static const menuitem_t menu_scanning_speed[] =
{ {
{ MT_CALLBACK, 0, "NORMAL", menu_scanning_speed_cb}, { MT_CALLBACK, SD_NORMAL, "NORMAL", menu_scanning_speed_cb}, // order must match definition of enum
{ MT_CALLBACK, 1, "PRECISE", menu_scanning_speed_cb}, { MT_CALLBACK, SD_PRECISE, "PRECISE", menu_scanning_speed_cb},
{ MT_CALLBACK, 2, "FAST", menu_scanning_speed_cb}, { MT_CALLBACK, SD_FAST, "FAST", menu_scanning_speed_cb},
{ MT_KEYPAD, KM_SAMPLETIME, "\2SAMPLE\0DELAY", "300..30000"}, { MT_KEYPAD, KM_SAMPLETIME, "\2SAMPLE\0DELAY", "300..30000"}, // item number must match SD_MANUAL
{ MT_KEYPAD, KM_OFFSET_DELAY, "\2OFFSET\0DELAY", "300..30000"}, // item number must match SD_MANUAL
{ MT_CANCEL, 0, "\032 BACK", NULL }, { MT_CANCEL, 0, "\032 BACK", NULL },
{ MT_NONE, 0, NULL, NULL } // sentinel { MT_NONE, 0, NULL, NULL } // sentinel
}; };
@ -1685,9 +1687,7 @@ static void menu_item_modify_attribute(
} else if (item == 2 && setting.auto_IF) } else if (item == 2 && setting.auto_IF)
m_auto = true; m_auto = true;
} else if (menu == menu_scanning_speed) { } else if (menu == menu_scanning_speed) {
if (item == setting.step_delay){ if (item == setting.step_delay_mode){
mark = true;
} else if (item == 2 && setting.step_delay > 1) {
mark = true; mark = true;
} }
#ifdef __ULTRA__ #ifdef __ULTRA__
@ -1911,6 +1911,9 @@ set_numeric_value(void)
case KM_SAMPLETIME: case KM_SAMPLETIME:
set_step_delay(uistat.value); set_step_delay(uistat.value);
break; break;
case KM_OFFSET_DELAY:
set_offset_delay(uistat.value);
break;
case KM_REPEAT: case KM_REPEAT:
set_repeat(uistat.value); set_repeat(uistat.value);
break; break;

Loading…
Cancel
Save

Powered by TurnKey Linux.