/* * dispatch.cpp * * Created on: 18 Jul 2021 * Author: Andreas Berthoud */ #include "dispatch.hpp" #include "HeartbeatCommand.hpp" #include "LedCommand.hpp" void handle_received_command(uint8_t command_id, uint8_t * payload_ptr, uint16_t size) { switch (command_id) { case COMMAND_HEARTBEAT_REQUEST: push_command(new HeartbeatRequest(payload_ptr, size)); break; case COMMAND_LED_REQUEST: push_command(new LedRequest(payload_ptr, size)); break; default: break; } }