kopia lustrzana https://github.com/meshtastic/firmware
protect screen specific code with #if HAS_SCREEN
rodzic
9430a98f1d
commit
d729dd952e
|
@ -87,6 +87,8 @@ int32_t PaxcounterModule::runOnce()
|
|||
}
|
||||
}
|
||||
|
||||
#if HAS_SCREEN
|
||||
|
||||
// TODO / FIXME: This code is copied from src/graphics/Screen.cpp
|
||||
// It appears (in slightly variants) also in other modules like
|
||||
// src/modules/Telemetry/PowerTelemetry.cpp, src/modules/Telemetry/EnvironmentTelemetry.cpp
|
||||
|
@ -127,5 +129,6 @@ void PaxcounterModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state
|
|||
buffer, "WiFi: %d\nBLE: %d\nuptime: %ds",
|
||||
count_from_libpax.wifi_count, count_from_libpax.ble_count, millis() / 1000);
|
||||
}
|
||||
#endif // HAS_SCREEN
|
||||
|
||||
#endif
|
|
@ -25,8 +25,10 @@ class PaxcounterModule : private concurrency::OSThread, public ProtobufModule<me
|
|||
virtual meshtastic_MeshPacket *allocReply() override;
|
||||
bool isActive() { return moduleConfig.paxcounter.enabled &&
|
||||
!config.bluetooth.enabled && !config.network.wifi_enabled; }
|
||||
#if HAS_SCREEN
|
||||
virtual bool wantUIFrame() override { return isActive(); }
|
||||
virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern PaxcounterModule *paxcounterModule;
|
||||
|
|
Ładowanie…
Reference in New Issue