ppr1 lcd is 'good enough' for now

1.2-legacy
Kevin Hester 2020-10-24 09:49:14 +08:00
rodzic d4e95e95a6
commit f0eeaf01d4
5 zmienionych plików z 19 dodań i 13 usunięć

Wyświetl plik

@ -11,8 +11,8 @@
* fix bluetooth
* Test GPS
* make ST7567Wire driver less ugly, move OLED stuff into a common class treee
* add power save mode for lcd per page 31 of datasheet
* add power off sequence per datasheet to lcd driver
* add LCD power save mode for lcd per page 31 of datasheet
* add LCD power off sequence per datasheet to lcd driver
* leave LCD screen on most of the time (because it needs little power)
### general nrf52 TODO:

Wyświetl plik

@ -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
}

Wyświetl plik

@ -3,7 +3,6 @@
#include "fonts.h"
// This means the *visible* area (sh1106 can address 132, but shows 128 for example)
#define TRANSITION_FRAMERATE 30 // fps
#define IDLE_FRAMERATE 1 // in fps
#define COMPASS_DIAM 44

Wyświetl plik

@ -209,6 +209,9 @@ External serial flash WP25R1635FZUIL0
#define HAS_EINK
// No screen wipes on eink
#define SCREEN_TRANSITION_MSECS 0
#define PIN_SPI1_MISO \
(32 + 7) // FIXME not really needed, but for now the SPI code requires something to be defined, pick an used GPIO
#define PIN_SPI1_MOSI PIN_EINK_MOSI

Wyświetl plik

@ -122,6 +122,10 @@ static const uint8_t AREF = PIN_AREF;
// Define if screen should be mirrored left to right
#define SCREEN_MIRROR
// LCD screens are slow, so slowdown the wipe so it looks better
#define SCREEN_TRANSITION_MSECS 1000
#define SCREEN_TRANSITION_FRAMERATE 10 // fps
/*
* SPI Interfaces
*/