summaryrefslogtreecommitdiffstats
path: root/movement/movement.h
diff options
context:
space:
mode:
authorjoeycastillo <joeycastillo@utexas.edu>2022-10-29 18:16:29 -0500
committerGitHub <noreply@github.com>2022-10-29 18:16:29 -0500
commit09f1d023300b1108f93039e37d80d255247f1361 (patch)
tree941fd0cce77f6ee1d909961bd6afb27c2df6672c /movement/movement.h
parent425dd775087319cdab0977911ab6d2643bc5afb8 (diff)
parent501d3f844784fbe5beb2b102fd7f05d43895a87a (diff)
downloadSensor-Watch-09f1d023300b1108f93039e37d80d255247f1361.tar.gz
Sensor-Watch-09f1d023300b1108f93039e37d80d255247f1361.tar.bz2
Sensor-Watch-09f1d023300b1108f93039e37d80d255247f1361.zip
Merge pull request #109 from TheOnePerson/auto-fire-long-press
Make movement auto fire long press event
Diffstat (limited to 'movement/movement.h')
-rw-r--r--movement/movement.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/movement/movement.h b/movement/movement.h
index 69b2798a..9dc5fe82 100644
--- a/movement/movement.h
+++ b/movement/movement.h
@@ -109,14 +109,17 @@ typedef enum {
EVENT_BACKGROUND_TASK, // Your watch face is being invoked to perform a background task. Don't update the display here; you may not be in the foreground.
EVENT_TIMEOUT, // Your watch face has been inactive for a while. You may want to resign, depending on your watch face's intended use case.
EVENT_LIGHT_BUTTON_DOWN, // The light button has been pressed, but not yet released.
- EVENT_LIGHT_BUTTON_UP, // The light button was pressed and released.
- EVENT_LIGHT_LONG_PRESS, // The light button was held for >2 seconds, and released.
+ EVENT_LIGHT_BUTTON_UP, // The light button was pressed for less than half a second, and released.
+ EVENT_LIGHT_LONG_PRESS, // The light button was held for over half a second, but not yet released.
+ EVENT_LIGHT_LONG_UP, // The light button was held for over half a second, and released.
EVENT_MODE_BUTTON_DOWN, // The mode button has been pressed, but not yet released.
- EVENT_MODE_BUTTON_UP, // The mode button was pressed and released.
- EVENT_MODE_LONG_PRESS, // The mode button was held for >2 seconds, and released. NOTE: your watch face will resign immediately after receiving this event.
+ EVENT_MODE_BUTTON_UP, // The mode button was pressed for less than half a second, and released.
+ EVENT_MODE_LONG_PRESS, // The mode button was held for over half a second, but not yet released.
+ EVENT_MODE_LONG_UP, // The mode button was held for over half a second, and released. NOTE: your watch face will resign immediately after receiving this event.
EVENT_ALARM_BUTTON_DOWN, // The alarm button has been pressed, but not yet released.
- EVENT_ALARM_BUTTON_UP, // The alarm button was pressed and released.
- EVENT_ALARM_LONG_PRESS, // The alarm button was held for >2 seconds, and released.
+ EVENT_ALARM_BUTTON_UP, // The alarm button was pressed for less than half a second, and released.
+ EVENT_ALARM_LONG_PRESS, // The alarm button was held for over half a second, but not yet released.
+ EVENT_ALARM_LONG_UP, // The alarm button was held for over half a second, and released.
} movement_event_type_t;
typedef struct {
@@ -256,9 +259,9 @@ typedef struct {
BuzzerNote alarm_note;
// button tracking for long press
- uint8_t light_down_timestamp;
- uint8_t mode_down_timestamp;
- uint8_t alarm_down_timestamp;
+ uint16_t light_down_timestamp;
+ uint16_t mode_down_timestamp;
+ uint16_t alarm_down_timestamp;
// background task handling
bool needs_background_tasks_handled;