mirror of https://github.com/sqfmi/Watchy.git
Remove delay after hard reset
* 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)pull/242/head
parent
f369b6f207
commit
be185cbd54
|
@ -441,6 +441,23 @@ void WatchyDisplay::_InitDisplay()
|
||||||
_setPartialRamArea(0, 0, WIDTH, HEIGHT);
|
_setPartialRamArea(0, 0, WIDTH, HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WatchyDisplay::_reset()
|
||||||
|
{
|
||||||
|
// Call default method if not configured the same way
|
||||||
|
if (_rst < 0 || !_pulldown_rst_mode) {
|
||||||
|
GxEPD2_EPD::_reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
digitalWrite(_rst, LOW);
|
||||||
|
pinMode(_rst, OUTPUT);
|
||||||
|
delay(_reset_duration);
|
||||||
|
pinMode(_rst, INPUT_PULLUP);
|
||||||
|
// Tested calling _powerOn() inmediately, and works ok, no need to sleep
|
||||||
|
// delay(_reset_duration > 10 ? _reset_duration : 0);
|
||||||
|
_hibernating = false;
|
||||||
|
}
|
||||||
|
|
||||||
void WatchyDisplay::_Init_Full()
|
void WatchyDisplay::_Init_Full()
|
||||||
{
|
{
|
||||||
_InitDisplay();
|
_InitDisplay();
|
||||||
|
|
|
@ -91,5 +91,7 @@ class WatchyDisplay : public GxEPD2_EPD
|
||||||
void _Update_Full();
|
void _Update_Full();
|
||||||
void _Update_Part();
|
void _Update_Part();
|
||||||
|
|
||||||
|
void _reset();
|
||||||
|
|
||||||
void _transferCommand(uint8_t command);
|
void _transferCommand(uint8_t command);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue