performance enhancements
memory enhancements prevent starting sensors more than once fix for wifi lag issues map scaling for huge buildings
This commit is contained in:
@@ -22,6 +22,8 @@ private:
|
||||
;
|
||||
}
|
||||
|
||||
bool started = false;
|
||||
|
||||
public:
|
||||
|
||||
/** singleton access */
|
||||
@@ -32,6 +34,9 @@ public:
|
||||
|
||||
void start() override {
|
||||
|
||||
if (started) {return;}
|
||||
started = true;
|
||||
|
||||
auto onSensorData = [&] () {
|
||||
BarometerData data(baro.reading()->pressure() / 100.0f); // convert Pa to hPa
|
||||
informListeners(data);
|
||||
@@ -43,7 +48,7 @@ public:
|
||||
}
|
||||
|
||||
bool isRunning() const override {
|
||||
return baro.isActive();
|
||||
return started;
|
||||
}
|
||||
|
||||
void stop() override {
|
||||
|
||||
Reference in New Issue
Block a user