fix SH1106 rotation and turn off during night #756

This commit is contained in:
lumapu 2023-03-10 18:00:26 +01:00
parent 28bd99ed1e
commit 0cc6e09383
3 changed files with 6 additions and 3 deletions

View file

@ -42,7 +42,7 @@ class Display {
}
void tickerSecond() {
loop();
mMono.loop();
if (mNewPayload || ((++mLoopCnt % 10) == 0)) {
mNewPayload = false;
mLoopCnt = 0;

View file

@ -27,9 +27,9 @@ DisplayMono::DisplayMono() {
void DisplayMono::init(uint8_t type, uint8_t rot, uint8_t cs, uint8_t dc, uint8_t reset, uint8_t clock, uint8_t data, uint32_t *utcTs, const char* version) {
void DisplayMono::init(uint8_t type, uint8_t rotation, uint8_t cs, uint8_t dc, uint8_t reset, uint8_t clock, uint8_t data, uint32_t *utcTs, const char* version) {
if ((0 < type) && (type < 4)) {
u8g2_cb_t *rot = (u8g2_cb_t *)((rot != 0x00) ? U8G2_R2 : U8G2_R0);
u8g2_cb_t *rot = (u8g2_cb_t *)((rotation != 0x00) ? U8G2_R2 : U8G2_R0);
mType = type;
switch(type) {
case 1: