InfiniTime/src/components
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 +07:00
..
battery Notify battery level every 10 minutes when connected to a BLE host. 2021-07-11 16:55:06 +07:00
ble Notify battery level every 10 minutes when connected to a BLE host. 2021-07-11 16:55:06 +07:00
brightness Changed access modified indentation 2021-04-24 12:00:45 +07:00
datetime Initialize SystemTask, DisplayApp and HeartRateTask as global static variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier. 2021-06-06 15:56:03 +07:00
firmwarevalidator Changed access modified indentation 2021-04-24 12:00:45 +07:00
fs Using littlefs (#438) 2021-07-11 15:06:06 +07:00
gfx Changed access modified indentation 2021-04-24 12:00:45 +07:00
heartrate Initialize SystemTask, DisplayApp and HeartRateTask as global static variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier. 2021-06-06 15:56:03 +07:00
motion Add support for BMA425 acceleration sensor. (#440) 2021-06-19 20:27:59 +07:00
motor Timer App (#355) 2021-05-20 20:43:54 +07:00
rle Fix signed/unsigned comparison warning 2021-06-12 20:04:19 +07:00
settings Multiple wakeup sources (#290) 2021-07-14 20:51:51 +07:00
timer Initialize SystemTask, DisplayApp and HeartRateTask as global static variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier. 2021-06-06 15:56:03 +07:00