mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 20:38:27 +02:00
Implement Improv via Serial component (#2423)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef USE_ARDUINO
|
||||
#ifdef ARDUINO
|
||||
#include "WString.h"
|
||||
#endif // USE_ARDUINO
|
||||
#endif // ARDUINO
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
@@ -38,6 +38,8 @@ enum Command : uint8_t {
|
||||
UNKNOWN = 0x00,
|
||||
WIFI_SETTINGS = 0x01,
|
||||
IDENTIFY = 0x02,
|
||||
GET_CURRENT_STATE = 0x02,
|
||||
GET_DEVICE_INFO = 0x03,
|
||||
BAD_CHECKSUM = 0xFF,
|
||||
};
|
||||
|
||||
@@ -53,8 +55,8 @@ ImprovCommand parse_improv_data(const std::vector<uint8_t> &data);
|
||||
ImprovCommand parse_improv_data(const uint8_t *data, size_t length);
|
||||
|
||||
std::vector<uint8_t> build_rpc_response(Command command, const std::vector<std::string> &datum);
|
||||
#ifdef USE_ARDUINO
|
||||
#ifdef ARDUINO
|
||||
std::vector<uint8_t> build_rpc_response(Command command, const std::vector<String> &datum);
|
||||
#endif // USE_ARDUINO
|
||||
#endif // ARDUINO
|
||||
|
||||
} // namespace improv
|
||||
|
||||
Reference in New Issue
Block a user