mirror of https://github.com/meshcore-dev/MeshCore
committed by
JQ
10 changed files with 195 additions and 70 deletions
@ -0,0 +1,22 @@ |
|||
#ifndef NODE_PREFS_H |
|||
#define NODE_PREFS_H |
|||
|
|||
#include <cstdint> // For uint8_t, uint32_t |
|||
|
|||
struct NodePrefs { // persisted to file
|
|||
float airtime_factor; |
|||
char node_name[32]; |
|||
double node_lat, node_lon; |
|||
float freq; |
|||
uint8_t sf; |
|||
uint8_t cr; |
|||
uint8_t reserved1; |
|||
uint8_t manual_add_contacts; |
|||
float bw; |
|||
uint8_t tx_power_dbm; |
|||
uint8_t unused[3]; |
|||
float rx_delay_base; |
|||
uint32_t ble_pin; |
|||
}; |
|||
|
|||
#endif // NODE_PREFS_H
|
|||
@ -1,18 +1,19 @@ |
|||
#pragma once |
|||
|
|||
#include <helpers/ui/DisplayDriver.h> |
|||
#include <helpers/CommonCLI.h> |
|||
|
|||
class UITask { |
|||
DisplayDriver* _display; |
|||
unsigned long _next_read, _next_refresh, _auto_off; |
|||
int _prevBtnState; |
|||
const char* _node_name; |
|||
NodePrefs* _node_prefs; |
|||
char _version_info[32]; |
|||
|
|||
void renderCurrScreen(); |
|||
public: |
|||
UITask(DisplayDriver& display) : _display(&display) { _next_read = _next_refresh = 0; } |
|||
void begin(const char* node_name, const char* build_date, const char* firmware_version); |
|||
void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version); |
|||
|
|||
void loop(); |
|||
}; |
|||
@ -1,18 +1,19 @@ |
|||
#pragma once |
|||
|
|||
#include <helpers/ui/DisplayDriver.h> |
|||
#include <helpers/CommonCLI.h> |
|||
|
|||
class UITask { |
|||
DisplayDriver* _display; |
|||
unsigned long _next_read, _next_refresh, _auto_off; |
|||
int _prevBtnState; |
|||
const char* _node_name; |
|||
NodePrefs* _node_prefs; |
|||
char _version_info[32]; |
|||
|
|||
void renderCurrScreen(); |
|||
public: |
|||
UITask(DisplayDriver& display) : _display(&display) { _next_read = _next_refresh = 0; } |
|||
void begin(const char* node_name, const char* build_date, const char* firmware_version); |
|||
void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version); |
|||
|
|||
void loop(); |
|||
}; |
|||
Loading…
Reference in new issue