Implicinte vypnuta obsluha OLED dokud se nezavola begin()
This commit is contained in:
parent
a42e4b27b6
commit
8bf0f6d3c5
@ -20,7 +20,7 @@ typedef struct {
|
||||
} crt_anim_t;
|
||||
|
||||
static crt_anim_t _anim;
|
||||
static bool _displayon = true; // priznak, ze na OLED je videt zobrazeni (neni ve stavu spanku)
|
||||
static bool _displayon = false; // priznak, ze na OLED je videt zobrazeni (neni ve stavu spanku)
|
||||
|
||||
void OLEDUIPlus::goToFrame(uint8_t frame)
|
||||
{
|
||||
@ -46,6 +46,7 @@ void OLEDUIPlus::begin(OLEDDisplay *display, kbdRead rKbd, uint32_t timeout, Fra
|
||||
_oled = display;
|
||||
_frames = frames;
|
||||
_framesCount = framesCount;
|
||||
_displayon = true;
|
||||
setTargetFPS(30);
|
||||
setFrameAnimation(SLIDE_UP);
|
||||
setFrames(frames, framesCount);
|
||||
@ -310,4 +311,11 @@ void OLEDUIPlus::setMainFrame(FrameCallback cb)
|
||||
_mainFrame = getFrameIndex(cb);
|
||||
}
|
||||
|
||||
void OLEDUIPlus::setTimeout(uint32_t ms)
|
||||
{
|
||||
|
||||
_oledtimeout = ms;
|
||||
extendOn();
|
||||
}
|
||||
|
||||
OLEDUIPlus ui;
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
void drawMenu(OLEDDisplay *display, const menu_t *menu, int *top, int *selected, int16_t x, int16_t y);
|
||||
int handleKbd(void);
|
||||
int extendOn(void);
|
||||
void setTimeout(uint32_t ms);
|
||||
bool blinkIsVisible(void);
|
||||
bool menuExpired(void);
|
||||
uint8_t getFrameIndex(FrameCallback cb);
|
||||
|
Loading…
Reference in New Issue
Block a user