The esp_sleep_get_ext1_wakeup_status() function returns 64-bit value.
Hence, masks this value is checked against should be 64-bit as well.
Especially, this is important because UP_BTN_MASK for Watchy V2 does not
fit inside 32-bit integer (it's bit 35).
This change fixes this problem by using BIT64 macro instead of BIT one.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
The BLECharacteristic::getValue() method returns std::string in
older versions of Arduino core for the ESP32 and String in newer
versions.
However, the return value is used in a way that both classes support:
using only length() and c_str() methods.
Hence, replacing explicit type name with auto keyword makes the code
compatible with older and newer versions.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
* Implemented by overloading the
virtual method _reset() in GxEPD2_EPD
* Tested to write straight away
and works ok. Seems unnecessary.
* 10ms might look like little but the
ESP is not sleeping and CPUs are on.
This is probably using 0.1 uAh
(10% of display update total cost)
* The display takes 16ms to power on
During this time we can render the
content and finally display it
* The call is optional if we do not call
it then the old code path is used
* Moved the init to constructor
* Reduce the phase on times from 40ms->10ms
* Increase the driving strength, this reduces
a little the power usage as well
* Reduces 220ms the display update
-80ms the power on of the display
-140ms the display partial update
- Note: This may have side effects, but I saw none
tested on Watchy v1.0, display should be same on
other Watchy boards
* It makes more sense to put it in the Display class
* The reset should be 2ms, 10ms is worst case
* Also there was a disable call based on display
that makes more sense to put in the default
boot switch statement