Allow multiple robots on the same network (#5)

* Support multiple bots on the same network

* Bulk OTa

* Bugfixes
This commit is contained in:
2026-03-11 01:41:30 -04:00
committed by GitHub
parent eca875a791
commit e30eb39187
13 changed files with 105 additions and 32 deletions

View File

@@ -93,6 +93,9 @@ class RobotController {
*/
void resetModules();
bool select_leader(uint8_t leader_id);
std::vector<uint8_t> get_leaders();
/**
* \brief Poll for devices accessible to the PC.
*
@@ -103,6 +106,8 @@ class RobotController {
std::optional<std::unique_ptr<std::vector<uint8_t>>>
remote_call(uint8_t function_tag, uint8_t module, const std::vector<uint8_t> &parameters);
uint8_t get_selected_leader();
private:
std::shared_ptr<spdlog::logger> m_logger;
std::unordered_map<uint8_t, std::shared_ptr<Module>> m_id_to_module{};
@@ -118,6 +123,7 @@ class RobotController {
std::thread m_configuration_loop;
std::thread m_sensor_loop;
std::thread m_expiry_looop;
std::atomic<uint8_t> m_selected_leader{0};
void metadata_loop();
void transmit_loop();