uavcan escs: Modified esc_status reporting to have _rotor_count published.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
Claudio Micheli
2019-08-09 09:41:17 +02:00
committed by Beat Küng
parent 187a025dfe
commit 1e04d718f6
7 changed files with 44 additions and 5 deletions
+7
View File
@@ -919,6 +919,7 @@ int UavcanNode::run()
new_output = true;
}
}
if (new_output) {
@@ -993,6 +994,7 @@ int UavcanNode::run()
_esc_controller.enable_idle_throttle_when_armed(_idle_throttle_when_armed > 0);
}
}
}
orb_unsubscribe(params_sub);
@@ -1123,6 +1125,11 @@ UavcanNode::ioctl(file *filp, int cmd, unsigned long arg)
} else {
_mixers->groups_required(_groups_required);
printf("Groups required %d \n", _groups_required);
_rotor_count = _mixers->get_multirotor_count();
_esc_controller.set_rotor_count(_rotor_count);
printf("Number of rotors %d \n", _rotor_count);
}
}
}