remove delays from BME280 demo, no longer needed

This commit is contained in:
Joey Castillo 2021-08-30 17:58:53 -04:00
parent fbd9ae4b67
commit 36322fd737
2 changed files with 0 additions and 13 deletions

View file

@ -136,9 +136,6 @@ bool app_loop() {
application_state.mode_changed = false;
delay_ms(250);
application_state.debounce_wait = false;
return true;
}
@ -342,9 +339,6 @@ void set_time_mode_handle_secondary_button() {
}
void cb_mode_pressed() {
if (application_state.debounce_wait) return;
application_state.debounce_wait = true;
application_state.mode = (application_state.mode + 1) % NUM_MODES;
application_state.mode_changed = true;
application_state.mode_ticks = 300;
@ -352,9 +346,6 @@ void cb_mode_pressed() {
}
void cb_light_pressed() {
if (application_state.debounce_wait) return;
application_state.debounce_wait = true;
switch (application_state.mode) {
case MODE_PREFS:
prefs_mode_handle_secondary_button();
@ -369,9 +360,6 @@ void cb_light_pressed() {
}
void cb_alarm_pressed() {
if (application_state.debounce_wait) return;
application_state.debounce_wait = true;
switch (application_state.mode) {
case MODE_LOG:
log_mode_handle_primary_button();

View file

@ -30,7 +30,6 @@ typedef struct ApplicationState {
bool led_on; // Indicates that the LED is on
uint8_t page; // Tracks the current page in log, prefs or settings.
bool is_fahrenheit; // User preference, C or F
bool debounce_wait; // For debouncing button inputs
// Data logging
SensorReading logged_data[MAX_DATA_POINTS];