getter for killswitch
This commit is contained in:
parent
ead80f3361
commit
9ba3094eeb
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue