getter for killswitch

This commit is contained in:
franchioping 2026-04-19 15:58:24 +01:00
parent ead80f3361
commit 9ba3094eeb
1 changed files with 6 additions and 0 deletions

View File

@ -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 && if (requested_type >= PACKET_TYPE::DRONE_NAV_WAYPOINT_0 &&
requested_type <= PACKET_TYPE::DRONE_NAV_WAYPOINT_7) { requested_type <= PACKET_TYPE::DRONE_NAV_WAYPOINT_7) {
uint8_t index = requested_type - PACKET_TYPE::DRONE_NAV_WAYPOINT_0; uint8_t index = requested_type - PACKET_TYPE::DRONE_NAV_WAYPOINT_0;