mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
cli_gps: remove callbacks and add generic sensor set/get.
This commit is contained in:
parent
e4f2d63b0a
commit
7be65c148e
4 changed files with 74 additions and 76 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "Mesh.h"
|
||||
#include <helpers/IdentityStore.h>
|
||||
#include <target.h>
|
||||
|
||||
struct NodePrefs { // persisted to file
|
||||
float airtime_factor;
|
||||
|
|
@ -50,10 +51,6 @@ public:
|
|||
virtual void saveIdentity(const mesh::LocalIdentity& new_id) = 0;
|
||||
virtual void clearStats() = 0;
|
||||
virtual void applyTempRadioParams(float freq, float bw, uint8_t sf, uint8_t cr, int timeout_mins) = 0;
|
||||
virtual void gpsGetStatus(char * reply) {}
|
||||
virtual void gpsStart() {}
|
||||
virtual void gpsStop() {}
|
||||
virtual void gpsSyncTime() {}
|
||||
};
|
||||
|
||||
class CommonCLI {
|
||||
|
|
@ -67,6 +64,9 @@ class CommonCLI {
|
|||
void savePrefs();
|
||||
void loadPrefsInt(FILESYSTEM* _fs, const char* filename);
|
||||
|
||||
const char* sensorGetCustomVar(const char* key);
|
||||
bool sensorSetCustomVar(const char* key, const char* value);
|
||||
|
||||
public:
|
||||
CommonCLI(mesh::MainBoard& board, mesh::RTCClock& rtc, NodePrefs* prefs, CommonCLICallbacks* callbacks)
|
||||
: _board(&board), _rtc(&rtc), _prefs(prefs), _callbacks(callbacks) { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue