mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
OTA + remote logging + profiling
This commit is contained in:
26
main/include/RemoteManagement.h
Normal file
26
main/include/RemoteManagement.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef REMOTEMANAGEMENT_H
|
||||
#define REMOTEMANAGEMENT_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "esp_ota_ops.h"
|
||||
#include "MessagingInterface.h"
|
||||
|
||||
static esp_ota_handle_t ota_handle;
|
||||
static const esp_partition_t* update_partition = esp_ota_get_next_update_partition(NULL);
|
||||
static uint16_t packet_number = 0; // represents last written packet
|
||||
|
||||
class RemoteManagement {
|
||||
public:
|
||||
static void mark_ota_success();
|
||||
static bool start_ota();
|
||||
static bool write_ota(const uint8_t* ota_data, size_t size);
|
||||
static bool ota_end();
|
||||
static void restart();
|
||||
|
||||
static void register_calls(MessagingInterface &messaging_interface);
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // REMOTEMANAGEMENT_H
|
||||
Reference in New Issue
Block a user