From 9ba3094eeb857d9f0b6c47d402057593f353b623 Mon Sep 17 00:00:00 2001 From: franchioping Date: Sun, 19 Apr 2026 15:58:24 +0100 Subject: [PATCH] getter for killswitch --- main/packet_handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/packet_handler.cpp b/main/packet_handler.cpp index a006a76..431a070 100644 --- a/main/packet_handler.cpp +++ b/main/packet_handler.cpp @@ -143,6 +143,12 @@ void send_packet_getter(PACKET_TYPE requested_type) { } } + if (requested_type == PACKET_TYPE::KILLSWITCH_TOGGLE) { + bool value = atomic_load(&killswitch_active); + resp_packet = create_packet_pooled(PACKET_TYPE::KILLSWITCH_TOGGLE, + packet_killswitch_toggle{value}); + } + if (requested_type >= PACKET_TYPE::DRONE_NAV_WAYPOINT_0 && requested_type <= PACKET_TYPE::DRONE_NAV_WAYPOINT_7) { uint8_t index = requested_type - PACKET_TYPE::DRONE_NAV_WAYPOINT_0;