mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
Encode if the mode in stabilized in heartbeat message
This commit is contained in:
parent
0a87ccf435
commit
208e50aa15
@ -33,8 +33,8 @@ void sendMavlink() {
|
|||||||
if (t - lastSlow >= PERIOD_SLOW) {
|
if (t - lastSlow >= PERIOD_SLOW) {
|
||||||
lastSlow = t;
|
lastSlow = t;
|
||||||
|
|
||||||
mavlink_msg_heartbeat_pack(SYSTEM_ID, MAV_COMP_ID_AUTOPILOT1, &msg, MAV_TYPE_QUADROTOR,
|
mavlink_msg_heartbeat_pack(SYSTEM_ID, MAV_COMP_ID_AUTOPILOT1, &msg, MAV_TYPE_QUADROTOR, MAV_AUTOPILOT_GENERIC,
|
||||||
MAV_AUTOPILOT_GENERIC, MAV_MODE_FLAG_MANUAL_INPUT_ENABLED | (armed ? MAV_MODE_FLAG_SAFETY_ARMED : 0),
|
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED | (armed * MAV_MODE_FLAG_SAFETY_ARMED) | ((mode == STAB) * MAV_MODE_FLAG_STABILIZE_ENABLED),
|
||||||
0, MAV_STATE_STANDBY);
|
0, MAV_STATE_STANDBY);
|
||||||
sendMessage(&msg);
|
sendMessage(&msg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user