So in the client, the command based flight is grayed out if ...
... we are not connected:
Code: Select all
if not connected:
self.commanderBox.setEnabled(False)
return
or if the Crazyflie reports that it cannot fly:
Code: Select all
if self._can_fly == 0:
self.commanderBox.setEnabled(False)
self.commanderBox.setToolTip(
'The Crazyflie reports that flight is not possible'
)
return
In the firmware the Crazyflie reports it cannot fly i it is up-side-down or charging:
Code: Select all
//
// We cannot fly if the Crazyflie is tumbled and we cannot fly if the Crazyflie
// is connected to a charger.
//
static bool canFlyCheck()
{
if (isTumbled) {
return false;
}
return !pmIsChargerConnected();
}
Another thing that can gray out the flight commands is that we cannot find a positioning deck:
Code: Select all
# flowV1 flowV2 LightHouse LPS
position_decks = ['bcFlow', 'bcFlow2', 'bcLighthouse4', 'bcDWM1000']
for deck in position_decks:
if int(self.helper.cf.param.values['deck'][deck]) == 1:
self.commanderBox.setEnabled(True)
break
else:
self.commanderBox.setToolTip(
'You need a positioning deck to use Command Based Flight'
)
self.commanderBox.setEnabled(False)
So, some of this sets
tooltips, text that appear when you hover the pointer over the grayed out box, do you get any tooltip?