Skip to content

Commit

Permalink
pbdrv/reset: Align reset action and reset reason.
Browse files Browse the repository at this point in the history
pybricks/support#379

Even though these are not the same enums, it makes sense to align the first two entries of both as they can be used complementary.
  • Loading branch information
laurensvalk committed Jul 1, 2021
1 parent 00f1fbc commit 0a39528
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
### Changed
- Move `Remote` class from `experimental` to `pupdevices`.
- Move `Remote.pressed()` to `Remote.buttons.pressed()`.
- Swapped reset(action) action 0 and 1 for consistency with
reset_reason() ([support#379]).

### Fixed
- Fix Bluetooth not disconnecting when shutting down and button is still pressed.
Expand Down Expand Up @@ -65,6 +67,7 @@ Prerelease changes are documented at [support#48].
[support#347]: https://github.com/pybricks/support/issues/347
[support#352]: https://github.com/pybricks/support/issues/352
[support#361]: https://github.com/pybricks/support/issues/361
[support#361]: https://github.com/pybricks/support/issues/379

[Unreleased]: https://github.com/pybricks/pybricks-micropython/compare/v3.1.0a1...HEAD
[3.1.0a1]: https://github.com/pybricks/pybricks-micropython/compare/v3.0.0...v3.1.0a1
Expand Down
6 changes: 3 additions & 3 deletions lib/pbio/include/pbdrv/reset.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

/** Reset/power actions. */
typedef enum {
/** Resets the MCU without powering off. */
PBDRV_RESET_ACTION_RESET = 0,
/** Turns off power to the hub/brick. */
PBDRV_RESET_ACTION_POWER_OFF = 1,
PBDRV_RESET_ACTION_POWER_OFF = 0,
/** Resets the MCU without powering off. */
PBDRV_RESET_ACTION_RESET = 1,
/** Resets the MCU in firmware update mode. */
PBDRV_RESET_ACTION_RESET_IN_UPDATE_MODE = 2,
} pbdrv_reset_action_t;
Expand Down

0 comments on commit 0a39528

Please sign in to comment.