target.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #define RADIOLIB_STATIC_ONLY 1
  3. #include <RadioLib.h>
  4. #include <helpers/radiolib/RadioLibWrappers.h>
  5. #include "T1000eBoard.h"
  6. #include <helpers/radiolib/CustomLR1110Wrapper.h>
  7. #include <helpers/ArduinoHelpers.h>
  8. #include <helpers/SensorManager.h>
  9. #include <helpers/sensors/LocationProvider.h>
  10. #ifdef DISPLAY_CLASS
  11. #include "NullDisplayDriver.h"
  12. #endif
  13. class T1000SensorManager: public SensorManager {
  14. bool gps_active = false;
  15. LocationProvider * _nmea;
  16. void start_gps();
  17. void sleep_gps();
  18. void stop_gps();
  19. public:
  20. T1000SensorManager(LocationProvider &nmea): _nmea(&nmea) { }
  21. bool begin() override;
  22. bool querySensors(uint8_t requester_permissions, CayenneLPP& telemetry) override;
  23. void loop() override;
  24. int getNumSettings() const override;
  25. const char* getSettingName(int i) const override;
  26. const char* getSettingValue(int i) const override;
  27. bool setSettingValue(const char* name, const char* value) override;
  28. LocationProvider* getLocationProvider() { return _nmea; }
  29. };
  30. #ifdef DISPLAY_CLASS
  31. extern NullDisplayDriver display;
  32. #endif
  33. extern T1000eBoard board;
  34. extern WRAPPER_CLASS radio_driver;
  35. extern VolatileRTCClock rtc_clock;
  36. extern T1000SensorManager sensors;
  37. bool radio_init();
  38. mesh::LocalIdentity radio_new_identity();