2025-05-03 13:14:03 +10:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <CayenneLPP.h>
|
|
|
|
|
|
2025-05-14 13:55:45 +03:00
|
|
|
#define TELEM_PERM_BASE 0x01 // 'base' permission includes battery
|
|
|
|
|
#define TELEM_PERM_LOCATION 0x02
|
|
|
|
|
#define TELEM_PERM_ENVIRONMENT 0x04 // permission to access environment sensors
|
2025-05-03 13:14:03 +10:00
|
|
|
|
|
|
|
|
#define TELEM_CHANNEL_SELF 1 // LPP data channel for 'self' device
|
|
|
|
|
|
|
|
|
|
class SensorManager {
|
|
|
|
|
public:
|
2025-05-05 00:15:35 +10:00
|
|
|
double node_lat, node_lon; // modify these, if you want to affect Advert location
|
2025-05-18 16:36:45 -07:00
|
|
|
double node_altitude; // altitude in meters
|
2025-05-05 00:15:35 +10:00
|
|
|
|
2025-05-18 16:36:45 -07:00
|
|
|
SensorManager() { node_lat = 0; node_lon = 0; node_altitude = 0; }
|
2025-05-03 13:14:03 +10:00
|
|
|
virtual bool begin() { return false; }
|
|
|
|
|
virtual bool querySensors(uint8_t requester_permissions, CayenneLPP& telemetry) { return false; }
|
|
|
|
|
virtual void loop() { }
|
2025-05-05 00:15:35 +10:00
|
|
|
virtual int getNumSettings() const { return 0; }
|
|
|
|
|
virtual const char* getSettingName(int i) const { return NULL; }
|
|
|
|
|
virtual const char* getSettingValue(int i) const { return NULL; }
|
|
|
|
|
virtual bool setSettingValue(const char* name, const char* value) { return false; }
|
2025-05-03 13:14:03 +10:00
|
|
|
};
|