Merge branch 'prepare_commands_for_device_id' into integration

This commit is contained in:
J. Nick Koston 2025-07-07 11:48:43 -05:00
commit 22e67f9754
No known key found for this signature in database

View File

@ -45,14 +45,14 @@ static const int CAMERA_STOP_STREAM = 5000;
// Helper macro for entity command handlers - gets entity by key, returns if not found, and creates call object
#define ENTITY_COMMAND_MAKE_CALL(entity_type, entity_var, getter_name) \
entity_type *entity_var = App.get_##getter_name##_by_key(msg.key); \
if (entity_var == nullptr) \
if ((entity_var) == nullptr) \
return; \
auto call = entity_var->make_call();
auto call = (entity_var)->make_call();
// Helper macro for entity command handlers that don't use make_call() - gets entity by key and returns if not found
#define ENTITY_COMMAND_GET(entity_type, entity_var, getter_name) \
entity_type *entity_var = App.get_##getter_name##_by_key(msg.key); \
if (entity_var == nullptr) \
if ((entity_var) == nullptr) \
return;
APIConnection::APIConnection(std::unique_ptr<socket::Socket> sock, APIServer *parent)