Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
docs: update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Tropix126 committed Mar 8, 2024
1 parent 0555f6f commit f71cfea
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
28 changes: 25 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,39 @@ Before releasing:
## [Unreleased]

### Added
- New Motor API (**Breaking Change**) (#66)
- Added `MotorControl` enum for controlling motor targets (#66).
- Added support for onboard velocity and position control in motors (#66).
- Added missing motor telemetry functions `velocity`, `efficiency`, `gearset`, `current_limit`.
- Added support for current and voltage limiting in motors.
- Added `Motor::raw_position` for getting raw IME ticks at a given timestamp.
- Added support for getting motor fault flags (e.g. over-temperature, over-current, H-bridge faults).
- Added support for internal motor PID tuning. Feature gated behind `dangerous_motor_tuning`, as this can cause hardware damage and is not recommended.
- Added various constants for convenience around `Motor` and `Gearset`.

### Fixed

- `pros_sys` bindings to the Motors C API now takes the correct port type (`i8`) as of PROS 4 (**Breaking Change**) (#66).

### Changed

- Adjusts constructor arguments for `Motor` to allow passing `Gearset` and `reversed` instead of `brake_mode` at construction. (**Breaking Change**) (#66)
- Renamed `Motor::get_state` to `Motor::state`. (**Breaking Change**) (#66)
- Changed `Motor::reversed` to return `Result<bool, _>`` rather than just `false` if `PROS_ERR` is returned. (**Breaking Change**) (#66)
- Refactored the Motor API (**Breaking Change**) (#66)
- Adjusts constructor arguments for `Motor` to allow passing `Gearset` and a direction instead of `brake_mode` at construction. (**Breaking Change**) (#66)
- Renamed `Motor::get_state` to `Motor::state`. (**Breaking Change**) (#66)
- Changed `Motor::reversed` to return `Result<bool, _>`` rather than just `false` if `PROS_ERR` is returned. (**Breaking Change**) (#66)
- Adjusted motor targeting to work around the `MotorControl` enum.
- Adjusted motor reverse flag to use `Direction` enum rather than a boolean.
- Motor braking is now stateless and requires an explicit method to be called to use `BrakeMode`s other than `BrakeMode::Coast`.
- Renamed `Motor::current_draw` to `Motor::current`.
- Renamed `Motor::get_state` to `Motor::status`.
- Status structs containing device bits now use the `bitflags!` crate. (**Breaking Change**) (#66)
- Renamed `InertialSensor::calibrating` to `InertialSensor::calibrating` (**Breaking CHange**) (#66)

### Removed

- Removed `MotorStoppedFuture`, as it was broken due to hardware not returning the `stopped` flag (**Breaking Change**) (#66).
- Removed `Motor::set_output` and `Motor::set_raw_output` in favor of `set_voltage`.

## [0.8.0]

### Added
Expand Down
5 changes: 1 addition & 4 deletions packages/pros/examples/accessories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ impl AsyncRobot for ExampleRobot {
let motor = Arc::clone(&self.motor); // Obtain a shared reference to our motor to safely share between tasks.

move || loop {
println!(
"Motor stopped? {}",
motor.lock().velocity() < 2
);
println!("Motor stopped? {}", motor.lock().velocity() < 2);

// Sleep the task as to not steal processing time from the OS.
// This should always be done in any loop, including loops in the main task.
Expand Down

0 comments on commit f71cfea

Please sign in to comment.