Skip to content

Commit

Permalink
Closes bitcraze#357: Add support for propeller test
Browse files Browse the repository at this point in the history
  • Loading branch information
ataffanel committed Oct 18, 2018
1 parent 08389af commit 297bc35
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cfclient/ui/tabs/ConsoleTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def __init__(self, tabWidget, helper, *args):
self._dumpSystemLoadButton.clicked.connect(
lambda enabled:
self._helper.cf.param.set_value("system.taskDump", '1'))
self._propellerTestButton.clicked.connect(
lambda enabled:
self._helper.cf.param.set_value("health.startPropTest", '1'))

def printText(self, text):
# Make sure we get printouts from the Crazyflie into the log (such as
Expand All @@ -90,7 +93,9 @@ def clear(self):
def _connected(self, link_uri):
"""Callback when the Crazyflie has been connected"""
self._dumpSystemLoadButton.setEnabled(True)
self._propellerTestButton.setEnabled(True)

def _disconnected(self, link_uri):
"""Callback for when the Crazyflie has been disconnected"""
self._dumpSystemLoadButton.setEnabled(False)
self._propellerTestButton.setEnabled(False)
13 changes: 13 additions & 0 deletions src/cfclient/ui/tabs/consoleTab.ui
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="_propellerTestButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;Experimental feature:&lt;/span&gt;&lt;span style=&quot; font-weight:600;&quot;&gt; Tests propellers and motors&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Place the Crazyflie on a flat hard surface and run the propeller test.&lt;/p&gt;&lt;p&gt;The crazyflie will run the motors in sequence and beeps the motors that are above the vibration threshold.&lt;/p&gt;&lt;p&gt;The results are also printed on the console.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Propeller test</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
Expand Down

0 comments on commit 297bc35

Please sign in to comment.