mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 09:37:21 +02:00
27 lines
662 B
C++
27 lines
662 B
C++
#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
|