ota.cpp restructured; .h file sanitization
This commit is contained in:
1 parent
5793b3c811
commit
3aa8a88d3a
11 files changed
+126
-155
No files matched your search
+11
-10
@@ -38,6 +38,14 @@ typedef struct {
|
||||
uint8_t Message[PAYLOAD_BUFFER_SIZE];
|
||||
} MessageBuffer_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t latitude;
|
||||
uint32_t longitude;
|
||||
uint8_t satellites;
|
||||
uint16_t hdop;
|
||||
uint16_t altitude;
|
||||
} gpsStatus_t;
|
||||
|
||||
// global variables
|
||||
extern configData_t cfg; // current device configuration
|
||||
extern char display_line6[], display_line7[]; // screen buffers
|
||||
@@ -52,16 +60,13 @@ extern std::array<uint64_t, 0xff> beacons;
|
||||
|
||||
extern TaskHandle_t irqHandlerTask, wifiSwitchTask;
|
||||
|
||||
#include "led.h"
|
||||
#include "payload.h"
|
||||
|
||||
#ifdef HAS_GPS
|
||||
#include "gpsread.h"
|
||||
#endif
|
||||
|
||||
#if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED)
|
||||
#include "led.h"
|
||||
#endif
|
||||
|
||||
#include "payload.h"
|
||||
|
||||
#ifdef HAS_LORA
|
||||
#include "lorawan.h"
|
||||
#endif
|
||||
@@ -86,8 +91,4 @@ extern TaskHandle_t irqHandlerTask, wifiSwitchTask;
|
||||
#include "antenna.h"
|
||||
#endif
|
||||
|
||||
void reset_counters(void);
|
||||
void blink_LED(uint16_t set_color, uint16_t set_blinkduration);
|
||||
uint64_t uptime();
|
||||
|
||||
#endif
|
||||
@@ -8,14 +8,6 @@
|
||||
#include <Wire.h>
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
uint32_t latitude;
|
||||
uint32_t longitude;
|
||||
uint8_t satellites;
|
||||
uint16_t hdop;
|
||||
uint16_t altitude;
|
||||
} gpsStatus_t;
|
||||
|
||||
extern TinyGPSPlus gps; // Make TinyGPS++ instance globally availabe
|
||||
extern gpsStatus_t
|
||||
gps_status; // Make struct for storing gps data globally available
|
||||
|
||||
@@ -37,8 +37,6 @@ extern TaskHandle_t ledLoopTask;
|
||||
void rgb_set_color(uint16_t hue);
|
||||
void blink_LED(uint16_t set_color, uint16_t set_blinkduration);
|
||||
void ledLoop(void *parameter);
|
||||
#if (HAS_LED != NOT_A_PIN)
|
||||
void switch_LED(uint8_t state);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
#include <BintrayClient.h>
|
||||
#include <string>
|
||||
|
||||
void do_ota_update();
|
||||
bool do_ota_update();
|
||||
void start_ota_update();
|
||||
int version_compare(const String v1, const String v2);
|
||||
void display(const uint8_t row, const std::string status,
|
||||
|
||||
@@ -38,12 +38,8 @@ public:
|
||||
void addStatus(uint16_t voltage, uint64_t uptime, float cputemp, uint32_t mem,
|
||||
uint8_t reset1, uint8_t reset2);
|
||||
void addAlarm(int8_t rssi, uint8_t message);
|
||||
#ifdef HAS_GPS
|
||||
void addGPS(gpsStatus_t value);
|
||||
#endif
|
||||
#ifdef HAS_BUTTON
|
||||
void addButton(uint8_t value);
|
||||
#endif
|
||||
|
||||
#if PAYLOAD_ENCODER == 1 // format plain
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _RCOMMAND_H
|
||||
|
||||
#include "senddata.h"
|
||||
#include "cyclic.h"
|
||||
#include "configmanager.h"
|
||||
#include "lorawan.h"
|
||||
#include "macsniff.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "spislave.h"
|
||||
#include "lorawan.h"
|
||||
#include "cyclic.h"
|
||||
|
||||
void SendData(uint8_t port);
|
||||
void sendPayload(void);
|
||||
|
||||
Reference in new issue
Block a user