mavlink: Only sending HIL control commands if the system is actually armed

This commit is contained in:
Lorenz Meier 2014-05-04 14:06:38 +02:00
parent 55cae08cf3
commit ee580206b4
1 changed files with 4 additions and 4 deletions

View File

@ -819,11 +819,11 @@ protected:
void send(const hrt_abstime t)
{
bool updated = status_sub->update(t);
updated |= pos_sp_triplet_sub->update(t);
updated |= act_sub->update(t);
bool updated = act_sub->update(t);
(void)pos_sp_triplet_sub->update(t);
(void)status_sub->update(t);
if (updated) {
if (updated && (status.arming_state == ARMING_STATE_ARMED)) {
/* translate the current syste state to mavlink state and mode */
uint8_t mavlink_state;
uint8_t mavlink_base_mode;