summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-08-30 17:58:53 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-08-30 17:58:53 -0400
commit36322fd737f0988d00a5ea36b4536c6596937534 (patch)
tree0f33d29208a504270a5d4933ba6c620dc69f4c02
parentfbd9ae4b67b74a9a215f8231d33e3b2f5509abd0 (diff)
downloadSensor-Watch-36322fd737f0988d00a5ea36b4536c6596937534.tar.gz
Sensor-Watch-36322fd737f0988d00a5ea36b4536c6596937534.tar.bz2
Sensor-Watch-36322fd737f0988d00a5ea36b4536c6596937534.zip
remove delays from BME280 demo, no longer needed
-rw-r--r--Sensor Watch BME280 Project/app.c12
-rw-r--r--Sensor Watch BME280 Project/app.h1
2 files changed, 0 insertions, 13 deletions
diff --git a/Sensor Watch BME280 Project/app.c b/Sensor Watch BME280 Project/app.c
index 59090ea3..344a2e1b 100644
--- a/Sensor Watch BME280 Project/app.c
+++ b/Sensor Watch BME280 Project/app.c
@@ -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();
diff --git a/Sensor Watch BME280 Project/app.h b/Sensor Watch BME280 Project/app.h
index 85076698..e0bbe1c2 100644
--- a/Sensor Watch BME280 Project/app.h
+++ b/Sensor Watch BME280 Project/app.h
@@ -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];