mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
ppr1 lcd is 'good enough' for now
This commit is contained in:
@@ -58,10 +58,6 @@ static char ourId[5];
|
||||
static bool heartbeat = false;
|
||||
#endif
|
||||
|
||||
// We used to use constants for this - now we pull from the device at startup
|
||||
//#define SCREEN_WIDTH 128
|
||||
//#define SCREEN_HEIGHT 64
|
||||
|
||||
static uint16_t displayWidth, displayHeight;
|
||||
|
||||
#define SCREEN_WIDTH displayWidth
|
||||
@@ -85,6 +81,10 @@ static uint16_t displayWidth, displayHeight;
|
||||
|
||||
#define getStringCenteredX(s) ((SCREEN_WIDTH - display->getStringWidth(s)) / 2)
|
||||
|
||||
#ifndef SCREEN_TRANSITION_MSECS
|
||||
#define SCREEN_TRANSITION_MSECS 300
|
||||
#endif
|
||||
|
||||
static void drawBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||
{
|
||||
// draw an xbm image.
|
||||
@@ -636,11 +636,7 @@ void Screen::setup()
|
||||
displayWidth = dispdev.width();
|
||||
displayHeight = dispdev.height();
|
||||
|
||||
uint16_t transitionTime = 300; // msecs
|
||||
#ifdef HAS_EINK
|
||||
transitionTime = 0;
|
||||
#endif
|
||||
ui.setTimePerTransition(transitionTime);
|
||||
ui.setTimePerTransition(SCREEN_TRANSITION_MSECS);
|
||||
|
||||
ui.setIndicatorPosition(BOTTOM);
|
||||
// Defines where the first frame is located in the bar.
|
||||
@@ -882,12 +878,16 @@ void Screen::handleOnPress()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SCREEN_TRANSITION_FRAMERATE
|
||||
#define SCREEN_TRANSITION_FRAMERATE 30 // fps
|
||||
#endif
|
||||
|
||||
void Screen::setFastFramerate()
|
||||
{
|
||||
DEBUG_MSG("Setting fast framerate\n");
|
||||
|
||||
// We are about to start a transition so speed up fps
|
||||
targetFramerate = TRANSITION_FRAMERATE;
|
||||
targetFramerate = SCREEN_TRANSITION_FRAMERATE;
|
||||
ui.setTargetFPS(targetFramerate);
|
||||
setInterval(0); // redraw ASAP
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user