-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added arming fuctionality and emergency button #665
Conversation
Arming functionality has been added both by pressing a buton in the flight tab but also a joystick button can be assigned to do it. The functionality itself is implemented using the system.arm parameter.
The disarm button in the flight tab is not always disabled after a disconnect. |
1 similar comment
The disarm button in the flight tab is not always disabled after a disconnect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some comments already!
@@ -562,6 +565,12 @@ def _show_input_device_config_dialog(self): | |||
def _show_connect_dialog(self): | |||
self.logConfigDialogue.show() | |||
|
|||
def _emergency_stop(self): | |||
#send disarming command | |||
if (self.uiState == UIState.CONNECTED): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found here, if there is a firmware on the crazyflie that does not have 'system.arm' on there, the button 'arm and disarm' is active still and the terminal says:
WARNING:cflib.crazyflie.toc:Unable to find variable [system.arm]
WARNING:cflib.crazyflie.param:Cannot set value for [system.arm], it's not in the TOC!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yes the variable name us new but I guess this is avoidable for all new parameters that are used in e.g. the cfclient UI. Perhaps the warning is a good thing then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bigger problem might be that the emergency button will not work...
<item row="3" column="1"> | ||
<widget class="QPushButton" name="detectExitapp"> | ||
<item row="1" column="1"> | ||
<widget class="QPushButton" name="_detect_assisted_control"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably unify to make this all snake cases, but that is just a beauty issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had the same idea but it generated a lot of side work as many of them are saved as button mapping
@@ -178,7 +183,8 @@ def _reset_mapping(self): | |||
"pitchNeg": self.pitchNeg, | |||
"rollPos": self.rollPos, | |||
"rollNeg": self.rollNeg, | |||
"killswitch": self.killswitch, | |||
"estop": self.killswitch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering... do we want to force people to choose a kill button? Like, they can not save the config file if there is no pitch yaw roll and thrust assigned... but we can also force people to choose a kill button. This needs to be for both the crazyflie or bolt based systems I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good idea but could there be joysticks without buttons? Then it would block those, which might be good...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some comments already!
src/cfclient/ui/tabs/FlightTab.py
Outdated
self.actualM1.setValue(data[self.LOG_NAME_MOTOR_1]) | ||
self.actualM2.setValue(data[self.LOG_NAME_MOTOR_2]) | ||
self.actualM3.setValue(data[self.LOG_NAME_MOTOR_3]) | ||
self.actualM4.setValue(data[self.LOG_NAME_MOTOR_1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C&P error
exists to keep backwards compatibility.
Arming functionality has been added both by pressing a buton in the flight tab but also a joystick button can be assigned to do it. The functionality itself is implemented using the system.arm parameter.
This PR requires bitcraze/crazyflie-firmware#1281
and bitcraze/crazyflie-lib-python#404