add prompt at end of loop

pico-button-loop
alanbjohnston 3 years ago committed by GitHub
parent fb467aaf14
commit 24f863aeba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -147,7 +147,7 @@ void setup() {
configure_wifi(); configure_wifi();
} }
*/ */
start_button_isr(); /// start_button_isr();
// setup_sstv(); // setup_sstv();
picosstvpp_begin(26); picosstvpp_begin(26);
@ -305,10 +305,10 @@ void loop() {
// check to see if the mode has changed // check to see if the mode has changed
if (mode != new_mode) { if (mode != new_mode) {
Serial.println("Changing mode"); Serial.println("Changing mode");
if (mode == SSTV) { /// if (mode == SSTV) {
ITimer1.detachInterrupt(); /// ITimer1.detachInterrupt();
start_button_isr(); // restart button isr /// start_button_isr(); // restart button isr
} /// }
mode = new_mode; // change modes if button pressed mode = new_mode; // change modes if button pressed
write_mode(); write_mode();
if (new_mode != CW) if (new_mode != CW)
@ -319,6 +319,14 @@ void loop() {
sampleTime = (unsigned int) millis(); sampleTime = (unsigned int) millis();
} }
serial_input();
// check for button press
if (digitalRead(MAIN_PB_PIN) == PRESSED) // pushbutton is pressed
process_pushbutton();
if (BOOTSEL) // boot selector button is pressed on Pico
process_bootsel();
if (prompt) { if (prompt) {
// Serial.println("Need to prompt for input!"); // Serial.println("Need to prompt for input!");
prompt_for_input(); prompt_for_input();

Loading…
Cancel
Save

Powered by TurnKey Linux.