OTA updates (#96)
## Summary * Adds support for OTA * Gets latest firmware bin from latest GitHub release * I have noticed it be a little flaky unpacking the JSON and occasionally failing to start
This commit is contained in:
@@ -3,16 +3,15 @@
|
||||
#include <freertos/semphr.h>
|
||||
#include <freertos/task.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../Activity.h"
|
||||
#include "activities/ActivityWithSubactivity.h"
|
||||
|
||||
class CrossPointSettings;
|
||||
|
||||
enum class SettingType { TOGGLE, ENUM };
|
||||
enum class SettingType { TOGGLE, ENUM, ACTION };
|
||||
|
||||
// Structure to hold setting information
|
||||
struct SettingInfo {
|
||||
@@ -22,7 +21,7 @@ struct SettingInfo {
|
||||
std::vector<std::string> enumValues;
|
||||
};
|
||||
|
||||
class SettingsActivity final : public Activity {
|
||||
class SettingsActivity final : public ActivityWithSubactivity {
|
||||
TaskHandle_t displayTaskHandle = nullptr;
|
||||
SemaphoreHandle_t renderingMutex = nullptr;
|
||||
bool updateRequired = false;
|
||||
@@ -32,11 +31,11 @@ class SettingsActivity final : public Activity {
|
||||
static void taskTrampoline(void* param);
|
||||
[[noreturn]] void displayTaskLoop();
|
||||
void render() const;
|
||||
void toggleCurrentSetting() const;
|
||||
void toggleCurrentSetting();
|
||||
|
||||
public:
|
||||
explicit SettingsActivity(GfxRenderer& renderer, InputManager& inputManager, const std::function<void()>& onGoHome)
|
||||
: Activity("Settings", renderer, inputManager), onGoHome(onGoHome) {}
|
||||
: ActivityWithSubactivity("Settings", renderer, inputManager), onGoHome(onGoHome) {}
|
||||
void onEnter() override;
|
||||
void onExit() override;
|
||||
void loop() override;
|
||||
|
||||
Reference in New Issue
Block a user