1
0
Fork 0
InfiniTime/src
Kozova1 57b3397078
Multiple wakeup sources (#290)
* Allow multiple wakeup modes at the same time.

This commit adds multiple wakeup modes support.
It does so by storing them as a uint8_t bitfield enum.
It changes the following functions:

Since multiple modes can be on now, older version would not cut it:
WakeUpMode getWakeupMode() -> std::bitset<3> getWakeUpModes()
Where each bit corresponds to a WakeUpMode

We still need a way to check whether a specific wakeup mode is on, so:
bool isWakeUpModeOn(const WakeUpMode mode)

This function was changed to work correctly with the new implementation.
setWakeUpMode(WakeupMode mode, bool enable)

Previously, systemtask would exit SystemTask::OnTouchEvent() if the wake
up mode was None or RaiseWrist, to prevent waking up when a touch was
received. However, after enabling using multiple WakeUpModes, this
caused a bug where when RaiseWrist was checked with SingleTap or
DoubleTap, the tap detection wouldn't work.

This commit fixes that bug.

Next commit will update the settings WakeUpMode select UI to reflect these changes.

Signed-off-by: Kozova1 <mug66kk@gmail.com>

* Updated UI to reflect multiple WakeUp sources being available.

Signed-off-by: Kozova1 <mug66kk@gmail.com>
2021-07-14 20:51:51 +02:00
..
components Multiple wakeup sources (#290) 2021-07-14 20:51:51 +02:00
displayapp Multiple wakeup sources (#290) 2021-07-14 20:51:51 +02:00
drivers Removed an illogical comparison from SystemInfo and St7789 driver (#449) 2021-06-22 20:31:31 +02:00
FreeRTOS Remove debug defines (DEBUG & DEBUG_NRF_USER) from the build. These debug can be useful for debugging purposes but not in production (release). (#400) 2021-06-01 21:02:15 +02:00
heartratetask Move most of the code from the constructor of the objects statically initialized in main() into Start()/Init() functions to avoid Static Initialization Order Fiasco (https://en.cppreference.com/w/cpp/language/siof). See https://github.com/JF002/InfiniTime/pull/415#issuecomment-859004238. 2021-06-12 10:58:28 +02:00
libs Set correct refresh times for lvgl (#488) 2021-07-14 20:35:21 +02:00
logging Merge pull request #349 from Avamander/patch-2 2021-05-15 09:57:22 +02:00
systemtask Multiple wakeup sources (#290) 2021-07-14 20:51:51 +02:00
BootloaderVersion.cpp SPI flash sleep if bootloader >= 1.0.0 (#322) 2021-06-26 20:53:32 +02:00
BootloaderVersion.h SPI flash sleep if bootloader >= 1.0.0 (#322) 2021-06-26 20:53:32 +02:00
CMakeLists.txt Using littlefs (#438) 2021-07-11 15:06:06 +02:00
FreeRTOSConfig.h LVGL use system tick 2021-07-07 15:47:47 +03:00
main.cpp Merge branch 'lvgl_use_system_tick' of https://github.com/Riksu9000/InfiniTime into Riksu9000-lvgl_use_system_tick 2021-07-13 20:53:40 +02:00
main.h Include cleanup: components 2020-11-16 01:35:45 +01:00
recoveryLoader.cpp Reformatted all the files according to clang-format style 2021-04-24 11:39:53 +03:00
sdk_config.h Reformatted all the files according to clang-format style 2021-04-24 11:39:53 +03:00
Version.h.in git: store git short ref hash on build stage to Version.h 2021-05-14 01:08:37 +03:00