Merge branch 'master' of github.com:meshtastic/Meshtastic-device

This commit is contained in:
Sacha Weatherstone
2022-05-07 13:34:36 +10:00
15 changed files with 33 additions and 14 deletions

View File

@@ -1,10 +1,6 @@
#include "buzz.h"
#include "configuration.h"
#ifdef NRF52_SERIES
#include "variant.h"
#endif
#ifndef PIN_BUZZER
// Noop methods for boards w/o buzzer

View File

@@ -120,7 +120,7 @@ bool perhapsSetRTC(RTCQuality q, const struct timeval *tv)
#endif
// nrf52 doesn't have a readable RTC (yet - software not written)
#if defined(PORTDUINO) || !defined(NO_ESP32) || defined(RV3028_RTC)
#if defined(PORTDUINO) || !defined(NO_ESP32) || defined(RV3028_RTC) || defined(PCF8563_RTC)
readFromRTC();
#endif

View File

@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "configuration.h"
#ifndef NO_SCREEN
#include <OLEDDisplay.h>
#include "GPS.h"
@@ -1665,3 +1666,4 @@ int Screen::handleUIFrameEvent(const UIFrameEvent *event)
}
} // namespace graphics
#endif // NO_SCREEN

View File

@@ -1,6 +1,7 @@
#pragma once
#ifdef NO_SCREEN
#include "power.h"
namespace graphics
{
// Noop class for boards without screen.
@@ -15,6 +16,8 @@ class Screen
void adjustBrightness(){}
void doDeepSleep() {}
void forceDisplay() {}
void startBluetoothPinScreen(uint32_t pin) {}
void stopBluetoothPinScreen() {}
};
}

View File

@@ -440,7 +440,7 @@ uint32_t sinceLastSeen(const NodeInfo *n)
return delta;
}
#define NUM_ONLINE_SECS (60 & 60 * 2) // 2 hrs to consider someone offline
#define NUM_ONLINE_SECS (60 * 60 * 2) // 2 hrs to consider someone offline
size_t NodeDB::getNumOnlineNodes()
{

View File

@@ -798,7 +798,9 @@ void handleBlinkLED(HTTPRequest *req, HTTPResponse *res)
count = count - 1;
}
} else {
#ifndef NO_SCREEN
screen->blink();
#endif
}
Json jsonObjOuter = Json::object{{"status", "ok"}};

View File

@@ -152,10 +152,11 @@ void createSSLCert()
yield();
esp_task_wdt_reset();
#ifndef NO_SCREEN
if (millis() / 1000 >= 3) {
screen->setSSLFrames();
}
#endif
}
runLoop = false;
} else {

View File

@@ -1,4 +1,5 @@
#include "configuration.h"
#ifndef NO_SCREEN
#include "CannedMessageModule.h"
#include "PowerFSM.h" // neede for button bypass
#include "MeshService.h"
@@ -548,3 +549,4 @@ void CannedMessageModule::handleSetCannedMessageModulePart4(const char *from_msg
this->saveProtoForModule();
}
}
#endif

View File

@@ -1,4 +1,6 @@
#pragma once
#ifdef NO_SCREEN
#else
#include "ProtobufModule.h"
#include "input/InputBroker.h"
@@ -84,3 +86,4 @@ class CannedMessageModule :
};
extern CannedMessageModule *cannedMessageModule;
#endif

View File

@@ -47,7 +47,9 @@ void setupModules()
cardKbI2cImpl->init();
facesKbI2cImpl = new FacesKbI2cImpl();
facesKbI2cImpl->init();
#ifndef NO_SCREEN
cannedMessageModule = new CannedMessageModule();
#endif
#ifndef PORTDUINO
new DeviceTelemetryModule();
new EnvironmentTelemetryModule();

View File

@@ -15,7 +15,11 @@ class EnvironmentTelemetryModule : private concurrency::OSThread, public Protobu
lastMeasurementPacket = nullptr;
}
virtual bool wantUIFrame() override;
#ifdef NO_SCREEN
void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
#else
virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;
#endif
protected:
/** Called to handle a particular incoming message