Skip to content

Commit

Permalink
fix: break sweep loop on frequency change
Browse files Browse the repository at this point in the history
  • Loading branch information
edy555 committed Oct 7, 2019
1 parent f7e7127 commit 3fc17e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,8 @@ update_frequencies(void)
}

set_frequencies(start, stop, sweep_points);
operation_requested = OP_FREQCHANGE;

update_marker_index();

// set grid layout
Expand Down
3 changes: 3 additions & 0 deletions nanovna.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ extern int8_t sweep_enabled;
extern void ui_init(void);
extern void ui_process(void);

enum { OP_NONE = 0, OP_LEVER, OP_TOUCH, OP_FREQCHANGE };
extern uint8_t operation_requested;

/*
* dsp.c
*/
Expand Down
1 change: 0 additions & 1 deletion ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static uint32_t last_button_down_ticks;
static uint32_t last_button_repeat_ticks;
static int8_t inhibit_until_release = FALSE;

enum { OP_NONE = 0, OP_LEVER, OP_TOUCH };
uint8_t operation_requested = OP_NONE;

int8_t previous_marker = -1;
Expand Down

0 comments on commit 3fc17e1

Please sign in to comment.