Not wait sweep end for apply bandwidth command

More size screen/font definitions
Prevent overflow on bigger POINTS_COUNT values
This commit is contained in:
DiSlord 2020-04-01 00:36:43 +03:00
parent 2f288d20cd
commit e6d680cd44
2 changed files with 4 additions and 4 deletions

6
main.c
View file

@ -91,7 +91,7 @@ int8_t sweep_mode = SWEEP_ENABLE;
volatile uint8_t redraw_request = 0; // contains REDRAW_XXX flags
// sweep operation variables
volatile uint8_t wait_count = 0;
volatile uint16_t wait_count = 0;
static uint16_t p_sweep = 0;
// ChibiOS i2s buffer must be 2x size (for process one while next buffer filled by DMA)
@ -209,7 +209,7 @@ transform_domain(void)
// and calculate ifft for time domain
float* tmp = (float*)spi_buffer;
uint8_t window_size = POINTS_COUNT, offset = 0;
uint16_t window_size = POINTS_COUNT, offset = 0;
uint8_t is_lowpass = FALSE;
switch (domain_mode & TD_FUNC) {
case TD_FUNC_BANDPASS:
@ -2147,7 +2147,7 @@ static const VNAShellCommand commands[] =
{"reset" , cmd_reset , 0},
{"freq" , cmd_freq , CMD_WAIT_MUTEX},
{"offset" , cmd_offset , CMD_WAIT_MUTEX},
{"bandwidth" , cmd_bandwidth , CMD_WAIT_MUTEX},
{"bandwidth" , cmd_bandwidth , 0},
#ifdef ENABLE_TIME_COMMAND
{"time" , cmd_time , 0},
#endif

2
ui.c
View file

@ -1283,7 +1283,7 @@ draw_numeric_input(const char *buf)
int focused = FALSE;
uint16_t xsim = 0b0010010000000000;
for (i = 0, x = 64; i < 10 && buf[i]; i++, xsim<<=1) {
for (i = 0, x = 10 + 10 * FONT_WIDTH + 4; i < 10 && buf[i]; i++, xsim<<=1) {
uint16_t fg = DEFAULT_MENU_TEXT_COLOR;
uint16_t bg = config.menu_normal_color;
int c = buf[i];