mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
update movement set
This commit is contained in:
@@ -11,14 +11,22 @@
|
||||
#include "flatbuffers_generated/Movement_generated.h"
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
struct MovementEntryInput {
|
||||
uint16_t board_id;
|
||||
uint8_t module_type;
|
||||
uint16_t value_action;
|
||||
Movement::ConditionBlob condition;
|
||||
uint8_t ack;
|
||||
uint16_t ack_ttl_ms;
|
||||
uint16_t post_delay_ms;
|
||||
};
|
||||
|
||||
namespace Flatbuffers {
|
||||
class MovementSetBuilder {
|
||||
public:
|
||||
MovementSetBuilder() : builder_(MAX_MOVEMENTS_IN_SET*sizeof(Movement::MovementEntry)) {}
|
||||
|
||||
SerializedMessage build_movement_set(const std::vector<flatbuffers::Offset<Movement::MovementEntry>>& set);
|
||||
flatbuffers::Offset<Movement::MovementEntry> build_movement_entry(uint16_t board_id, uint8_t module_type, uint16_t value_action,
|
||||
const Movement::ConditionBlob& condition, uint8_t ack, uint16_t ack_ttl_ms, uint16_t post_delay_ms);
|
||||
SerializedMessage build_movement_set(const std::unordered_map<uint8_t, std::vector<MovementEntryInput>>& input);
|
||||
Movement::ConditionBlob build_condition_blob(uint16_t value, uint8_t cond, uint8_t module_type, uint8_t in_use);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user