Skip to content

Commit

Permalink
Add documentation about hardfault recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
dpkoch committed Mar 17, 2020
1 parent cfe32fe commit 8b84ee5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/developer-guide/code-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ The operation of the state manager is defined by the following finite state mach

![state manager FSM](images/arming-fsm.svg)

The state manager also includes functionality for recovering from hard faults. In the case of a hard fault, the firmware writes a small amount of data to backup memory then reboots. This backup memory location is checked and then cleared after every reboot. The backup memory includes the armed state of the flight controller. On reboot, the firmware will initialize then, if this armed-state flag is set, immediately transition back into the armed state. This functionality allows for continued RC control in the case of a hard fault. Hard faults are not expected with the stable firmware code base, but this feature adds an additional layer of safety if experimental changes are being made to the firmware itself.

### Parameter Server
This module handles all parameters for the flight stack.
It supports the getting and setting of integer and floating-point parameters, and the saving of these parameters to non-volatile memory.
Expand Down
2 changes: 2 additions & 0 deletions docs/user-guide/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ The following is a simplified version of the finite state machine that defines l

![Arming FSM](images/arming-fsm-simplified.svg)

The state manager also includes functionality for recovering from hard faults if one were to occur. If a hard fault occurs while the flight controller is armed, the firmware has the ability to immediately rearm after rebooting to enable continued RC control of the vehicle for recovery.

## LEDs

The meaning of the various LEDs is summarized in the following table. The colors of the LEDs may change depending on your specific board:
Expand Down
4 changes: 4 additions & 0 deletions docs/user-guide/parameter-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ rosservice call /param_write
[ INFO] [1491672597.123201952]: Param write succeeded
[ INFO] [1491672597.123452908]: Onboard parameters have been saved
```

!!! important
It is highly recommended that you write parameters before arming and flying the vehicle. Among other things, this will ensure that in the rare case that a hard fault is encountered and the flight controller must reboot during flight, the correct configuration will be loaded on reboot.

!!! error
Parameter writing can only happen if the flight controller is disarmed. If the param write failed for some reason, you may want to make sure your FC is disarmed and try again.

Expand Down

0 comments on commit 8b84ee5

Please sign in to comment.