Merge branch 'master' into eink

This commit is contained in:
Kevin Hester
2020-09-26 12:58:13 -07:00
committed by GitHub
31 changed files with 1524 additions and 189 deletions

View File

@@ -37,6 +37,8 @@
#include "SPILock.h"
#include "graphics/Screen.h"
#include "main.h"
#include "meshwifi/meshhttp.h"
#include "meshwifi/meshwifi.h"
#include "sleep.h"
#include "target_specific.h"
#include <OneButton.h>
@@ -217,9 +219,9 @@ void setup()
// Currently only the tbeam has a PMU
power = new Power();
power->setup();
power->setStatusHandler(powerStatus);
powerStatus->observe(&power->newStatus);
power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration
// Init our SPI controller (must be before screen and lora)
initSPI();
@@ -328,6 +330,9 @@ void setup()
}
#endif
// Initialize Wifi
initWifi();
if (!rIf)
recordCriticalError(ErrNoRadio);
else
@@ -394,6 +399,8 @@ void loop()
userButtonAlt.tick();
#endif
loopWifi();
// Show boot screen for first 3 seconds, then switch to normal operation.
static bool showingBootScreen = true;
if (showingBootScreen && (millis() > 3000)) {
@@ -420,5 +427,8 @@ void loop()
// feel slow
msecstosleep = 10;
// TODO: This should go into a thread handled by FreeRTOS.
handleWebResponse();
delay(msecstosleep);
}