Skip to content

Commit

Permalink
Merge pull request #633 from bitcraze/krichardsson/docs
Browse files Browse the repository at this point in the history
Improved documentation
  • Loading branch information
knmcguire committed Sep 8, 2022
2 parents 69cf114 + 9fdf5a6 commit 35f62b8
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 25 deletions.
29 changes: 15 additions & 14 deletions docs/functional-areas/cfloader.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ title: Bootload the Crazyflie 2.X
page_id: cfloader
---




The Crazyflie can be bootloaded from the commandline using the
The Crazyflie as well as decks that has a firmware can be bootloaded from the command line using the
*cfloader* script.

**Note:** To enter the bootloader for the Crazyflie 2.X power off the
Expand Down Expand Up @@ -90,7 +87,7 @@ Flashing new firmware for the STM32 MCU:
Flashing new firmware for the STM32 MCU with warmbooting with a known uri:

crazyflie-clients-python$ bin/cfloader flash cf2.bin stm32-fw -w radio://0/10/2M/E7E7E7E701
Reset to bootloader mode ...
Reset to bootloader mode ...
Connected to bootloader on Crazyflie 2.0 (version=0x10)
Target info: nrf51 (0xFE)
Flash pages: 232 | Page size: 1024 | Buffer pages: 1 | Start page: 88
Expand Down Expand Up @@ -118,16 +115,9 @@ Flash a new firmware package (containing both nRF51 and STM32 firmware):
Flashing 2 of 2 to nrf51 (fw): 25151 bytes (25 pages) .1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1
Reset in firmware mode ...

Flash a new firmware to the GAP8 on the AI-deck:
## AI-deck examples

crazyflie-clients-python$ bin/cfloader flash myApp.bin deck-bcAI:gap8-fw -w radio://0/30/2M
Reset to bootloader mode ...
Skipping bcAI:esp
| 4% Writing to bcAI:gap8 deck memory
/ 9% Writing to bcAI:gap8 deck memory
- 14% Writing to bcAI:gap8 deck memory
\ 19% Writing to bcAI:gap8 deck memory
...
The AI-deck should be mounted on the Crazyflie when running the cfloader.

Flash a new firmware to the ESP on the AI-deck:

Expand All @@ -137,3 +127,14 @@ Flash a new firmware to the ESP on the AI-deck:
/ 9% Writing to bcAI:esp deck memory
- 14% Writing to bcAI:esp deck memory
\ 19% Writing to bcAI:esp deck memory

Flash a new firmware to the GAP8 on the AI-deck:

crazyflie-clients-python$ bin/cfloader flash myApp.bin deck-bcAI:gap8-fw -w radio://0/30/2M
Reset to bootloader mode ...
Skipping bcAI:esp
| 4% Writing to bcAI:gap8 deck memory
/ 9% Writing to bcAI:gap8 deck memory
- 14% Writing to bcAI:gap8 deck memory
\ 19% Writing to bcAI:gap8 deck memory
...
15 changes: 13 additions & 2 deletions docs/userguides/userguide_client/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,19 @@ client.

### Firmware upgrade

For updating the Crazyflie firmware you can keep being connected to the crazyflie. This will open up a seperate dialog that will guide you through the process.
Please note that you need to use a Crazyradio dongle to connect to the Crazyflie when doing firmware upgrades. Upgrading using USB is not possible.
For updating the Crazyflie firmware you can keep being connected to the crazyflie. This will open up a separate dialog
that will guide you through the process.

Please note that you need to use a Crazyradio dongle to connect to the Crazyflie when doing firmware upgrades.
Upgrading using USB is **not** possible.

#### Deck firmware

Some decks have a CPUs or other chips that runs firmware that needs to be updated from time to time as well. The Crazyflie
firmware verifies that it is compatible with the deck firmware during start up. If the firmware in a deck that is
installed needs to be upgraded this will be logged in the console log. Deck firmware is upgraded as a part of the
Crazyflie firmware upgrade process, just make sure the deck is mounted when you run the upgrade.


![CFclient bootloading](/docs/images/firmware-upgrade.png)

Expand Down
24 changes: 15 additions & 9 deletions src/cfclient/ui/wizards/lighthouse_geo_bs_estimation_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def reset(self):
self.addPage(self.get_xyzspace_page)
self.addPage(self.get_geometry_page)

self.setWindowTitle("Lighthouse Basestation Geometry Wizard")
self.setWindowTitle("Lighthouse Base Station Geometry Wizard")
self.resize(WINDOW_STARTING_WIDTH, WINDOW_STARTING_HEIGHT)


Expand Down Expand Up @@ -184,7 +184,7 @@ def _ready_cb(self, averages):

if amount_of_basestations < 2:
self.status_text.setText(self.str_pad('Recording Done!' +
f' Visible Basestations: {self.visible_basestations}\n' +
f' Visible Base stations: {self.visible_basestations}\n' +
'Received too few base stations,' +
'we need at least two. Please try again!'))
self.too_few_bs = True
Expand All @@ -196,7 +196,7 @@ def _ready_cb(self, averages):
self.start_action_button.setDisabled(False)
else:
self.too_few_bs = False
status_text_string = f'Recording Done! Visible Basestations: {self.visible_basestations}\n'
status_text_string = f'Recording Done! Visible Base stations: {self.visible_basestations}\n'
if self.show_add_measurements:
self.recorded_angles_result.append(self.get_sample())
status_text_string += f'Total measurements added: {len(self.recorded_angles_result)}\n'
Expand Down Expand Up @@ -238,7 +238,8 @@ class RecordXAxisSamplePage(LighthouseBasestationGeometryWizardBasePage):
def __init__(self, cf: Crazyflie, parent=None):
super(RecordXAxisSamplePage, self).__init__(cf)
self.explanation_text.setText('Step 2. Put the Crazyflie on the positive X-axis,' +
f' exactly {REFERENCE_DIST} meters from the origin.\n')
f' exactly {REFERENCE_DIST} meters from the origin.\n' +
'This will be used to define the X-axis as well as scaling of the system.')
pixmap = QtGui.QPixmap(cfclient.module_path + "/ui/wizards/bslh_2.png")
pixmap = pixmap.scaledToWidth(PICTURE_WIDTH)
self.explanation_picture.setPixmap(pixmap)
Expand All @@ -247,7 +248,9 @@ def __init__(self, cf: Crazyflie, parent=None):
class RecordXYPlaneSamplesPage(LighthouseBasestationGeometryWizardBasePage):
def __init__(self, cf: Crazyflie, parent=None):
super(RecordXYPlaneSamplesPage, self).__init__(cf, show_add_measurements=True)
self.explanation_text.setText('Step 3. Put the Crazyflie somehere in the XY-plane, but not on the X-axis.\n ')
self.explanation_text.setText('Step 3. Put the Crazyflie somewhere in the XY-plane, but not on the X-axis.\n' +
'This position is used to map the the XY-plane to the floor.\n' +
'You can sample multiple positions to get a more precise definition.')
pixmap = QtGui.QPixmap(cfclient.module_path + "/ui/wizards/bslh_3.png")
pixmap = pixmap.scaledToWidth(PICTURE_WIDTH)
self.explanation_picture.setPixmap(pixmap)
Expand All @@ -259,8 +262,9 @@ def get_samples(self):
class RecordXYZSpaceSamplesPage(LighthouseBasestationGeometryWizardBasePage):
def __init__(self, cf: Crazyflie, parent=None):
super(RecordXYZSpaceSamplesPage, self).__init__(cf)
self.explanation_text.setText('Step 4. Move the Crazyflie around, try to cover all of the space,\n make sure ' +
'all the base stations are received')
self.explanation_text.setText('Step 4. Move the Crazyflie around, try to cover all of the flying space,\n' +
'make sure all the base stations are received.\n' +
'Avoid moving too fast, you can increase the record time if needed.\n')
pixmap = QtGui.QPixmap(cfclient.module_path + "/ui/wizards/bslh_4.png")
pixmap = pixmap.scaledToWidth(PICTURE_WIDTH)
self.explanation_picture.setPixmap(pixmap)
Expand Down Expand Up @@ -386,8 +390,10 @@ def __init__(self, cf: Crazyflie, origin_page: RecordOriginSamplePage, xaxis_pag
xyplane_page: RecordXYPlaneSamplesPage, xyzspace_page: RecordXYZSpaceSamplesPage, parent=None):

super(EstimateBSGeometryPage, self).__init__(cf)
self.explanation_text.setText('Step 5.Press the button to estimate the geometry and check the result.\n' +
'If the position looks good, press finish to close the wizard')
self.explanation_text.setText('Step 5. Press the button to estimate the geometry and check the result.\n' +
'If the positions of the base stations look reasonable, press finish to close ' +
'the wizard,\n' +
'if not restart the wizard.')
pixmap = QtGui.QPixmap(cfclient.module_path + "/ui/wizards/bslh_5.png")
pixmap = pixmap.scaledToWidth(640)
self.explanation_picture.setPixmap(pixmap)
Expand Down

0 comments on commit 35f62b8

Please sign in to comment.