setting.frequency_step now uint32_t

pull/4/head
DiSlord 6 years ago
parent 2d3de65160
commit 2387c78ef6

@ -593,7 +593,7 @@ typedef struct setting
int tracking; int tracking;
int modulation; int modulation;
int step_delay; int step_delay;
int frequency_step; uint32_t frequency_step;
int test; int test;
int harmonic; int harmonic;
int decay; int decay;

@ -549,9 +549,9 @@ VNA_SHELL_FUNCTION(cmd_scanraw)
if (argc == 3) { if (argc == 3) {
points = my_atoi(argv[2]); points = my_atoi(argv[2]);
} }
int old_step = setting.frequency_step; uint32_t old_step = setting.frequency_step;
float f_step = (stop-start)/ points; float f_step = (stop-start)/ points;
setting.frequency_step = (int32_t)f_step; setting.frequency_step = (uint32_t)f_step;
streamPut(shell_stream, '{'); streamPut(shell_stream, '{');
static uint32_t old_start=0, old_stop=0, old_points=0; static uint32_t old_start=0, old_stop=0, old_points=0;
@ -565,7 +565,7 @@ VNA_SHELL_FUNCTION(cmd_scanraw)
for (uint32_t i = 0; i<points; i++) { for (uint32_t i = 0; i<points; i++) {
if (operation_requested) if (operation_requested)
break; break;
float val = perform(false, i, start +(int32_t)(f_step * i), false); float val = perform(false, i, start +(uint32_t)(f_step * i), false);
streamPut(shell_stream, 'x'); streamPut(shell_stream, 'x');
int v = val*2 + 256; int v = val*2 + 256;
streamPut(shell_stream, (uint8_t)(v & 0xFF)); streamPut(shell_stream, (uint8_t)(v & 0xFF));

@ -797,7 +797,7 @@ void calculate_step_delay(void)
SI4432_offset_delay = setting.offset_delay; SI4432_offset_delay = setting.offset_delay;
} else { } else {
SI4432_offset_delay = 0; SI4432_offset_delay = 0;
if (setting.frequency_step == 0.0) { // zero span mode, not dependent on selected RBW if (setting.frequency_step == 0) { // zero span mode, not dependent on selected RBW
SI4432_step_delay = 0; SI4432_step_delay = 0;
} else { } else {
if (actual_rbw_x10 >= 1910) { SI4432_step_delay = 280; SI4432_offset_delay = 100; } if (actual_rbw_x10 >= 1910) { SI4432_step_delay = 280; SI4432_offset_delay = 100; }

Loading…
Cancel
Save

Powered by TurnKey Linux.