mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 18:59:56 +00:00
Test if screen address was found
This commit is contained in:
parent
d1370071da
commit
f3fc88ac5d
@ -703,6 +703,7 @@ void _screen_header()
|
|||||||
|
|
||||||
Screen::Screen(uint8_t address, int sda, int scl) : OSThread("Screen"), cmdQueue(32), dispdev(address, sda, scl), ui(&dispdev)
|
Screen::Screen(uint8_t address, int sda, int scl) : OSThread("Screen"), cmdQueue(32), dispdev(address, sda, scl), ui(&dispdev)
|
||||||
{
|
{
|
||||||
|
address_found = address;
|
||||||
cmdQueue.setReader(this);
|
cmdQueue.setReader(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -940,11 +941,13 @@ void Screen::drawDebugInfoWiFiTrampoline(OLEDDisplay *display, OLEDDisplayUiStat
|
|||||||
* it is expected that this will be used during the boot phase */
|
* it is expected that this will be used during the boot phase */
|
||||||
void Screen::setSSLFrames()
|
void Screen::setSSLFrames()
|
||||||
{
|
{
|
||||||
|
if (address_found) {
|
||||||
// DEBUG_MSG("showing SSL frames\n");
|
// DEBUG_MSG("showing SSL frames\n");
|
||||||
static FrameCallback sslFrames[] = {drawSSLScreen};
|
static FrameCallback sslFrames[] = {drawSSLScreen};
|
||||||
ui.setFrames(sslFrames, 1);
|
ui.setFrames(sslFrames, 1);
|
||||||
ui.update();
|
ui.update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// restore our regular frame list
|
// restore our regular frame list
|
||||||
void Screen::setFrames()
|
void Screen::setFrames()
|
||||||
|
@ -97,6 +97,8 @@ class Screen : public concurrency::OSThread
|
|||||||
Screen(const Screen &) = delete;
|
Screen(const Screen &) = delete;
|
||||||
Screen &operator=(const Screen &) = delete;
|
Screen &operator=(const Screen &) = delete;
|
||||||
|
|
||||||
|
uint8_t address_found;
|
||||||
|
|
||||||
/// Initializes the UI, turns on the display, starts showing boot screen.
|
/// Initializes the UI, turns on the display, starts showing boot screen.
|
||||||
//
|
//
|
||||||
// Not thread safe - must be called before any other methods are called.
|
// Not thread safe - must be called before any other methods are called.
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include <HTTPMultipartBodyParser.hpp>
|
#include <HTTPMultipartBodyParser.hpp>
|
||||||
#include <HTTPURLEncodedBodyParser.hpp>
|
#include <HTTPURLEncodedBodyParser.hpp>
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
|
#include "graphics/Screen.h"
|
||||||
|
|
||||||
|
|
||||||
#include <WebServer.h>
|
#include <WebServer.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
@ -179,8 +181,7 @@ void createSSLCert()
|
|||||||
yield();
|
yield();
|
||||||
esp_task_wdt_reset();
|
esp_task_wdt_reset();
|
||||||
|
|
||||||
if ((millis() / 1000 >= 3) && screen) {
|
if (millis() / 1000 >= 3) {
|
||||||
if (screen)
|
|
||||||
screen->setSSLFrames();
|
screen->setSSLFrames();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user