mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-24 05:50:16 +00:00
only acquire screen when paxcounter is active, i.e. enabled and wifi and ble are both off
This commit is contained in:
parent
bbc76f884e
commit
93ba60da69
@ -57,7 +57,7 @@ meshtastic_MeshPacket *PaxcounterModule::allocReply()
|
||||
|
||||
int32_t PaxcounterModule::runOnce()
|
||||
{
|
||||
if (moduleConfig.paxcounter.enabled && !config.bluetooth.enabled && !config.network.wifi_enabled) {
|
||||
if (isActive()) {
|
||||
if (firstTime) {
|
||||
firstTime = false;
|
||||
LOG_DEBUG(
|
||||
|
@ -23,7 +23,9 @@ class PaxcounterModule : private concurrency::OSThread, public ProtobufModule<me
|
||||
bool sendInfo(NodeNum dest = NODENUM_BROADCAST);
|
||||
virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Paxcount *p) override;
|
||||
virtual meshtastic_MeshPacket *allocReply() override;
|
||||
virtual bool wantUIFrame() override { return true; }
|
||||
bool isActive() { return moduleConfig.paxcounter.enabled &&
|
||||
!config.bluetooth.enabled && !config.network.wifi_enabled; }
|
||||
virtual bool wantUIFrame() override { return isActive(); }
|
||||
virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user