@ -8,15 +8,20 @@
# include <helpers/AutoDiscoverRTCClock.h>
# include <helpers/SensorManager.h>
# include <helpers/sensors/LocationProvider.h>
# include <Adafruit_BME280.h>
class TbeamSupSensorManager : public SensorManager {
bool gps_active = false ;
LocationProvider * _nmea ;
Adafruit_BME280 bme ;
double node_temp , node_hum , node_pres ;
# define SEALEVELPRESSURE_HPA (1013.25)
void start_gps ( ) ;
void sleep_gps ( ) ;
public :
TbeamSupSensorManager ( LocationProvider & nmea ) : _nmea ( & nmea ) { }
TbeamSupSensorManager ( LocationProvider & nmea ) : _nmea ( & nmea ) { node_temp = 0 ; node_hum = 0 ; node_pres = 0 ; }
bool begin ( ) override ;
bool querySensors ( uint8_t requester_permissions , CayenneLPP & telemetry ) override ;
void loop ( ) override ;
@ -24,6 +29,11 @@ class TbeamSupSensorManager: public SensorManager {
const char * getSettingName ( int i ) const override ;
const char * getSettingValue ( int i ) const override ;
bool setSettingValue ( const char * name , const char * value ) override ;
# ifdef MESH_DEBUG
void printBMEValues ( ) ;
# endif
} ;
extern TBeamS3SupremeBoard board ;
@ -53,7 +63,8 @@ enum {
OSC32768_ONLINE = _BV ( 13 ) ,
} ;
bool power_init ( ) ;
void scanDevices ( TwoWire * w ) ;
static bool l76kProbe ( ) ;
bool radio_init ( ) ;
uint32_t radio_get_rng_seed ( ) ;
void radio_set_params ( float freq , float bw , uint8_t sf , uint8_t cr ) ;