All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
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
andGearset
.
- Added
-
Added
Controller
API to thepros::prelude
module. (#108) -
relative_size
method onDistanceSensor
for getting a guess at an object's relative size. (#73)
pros_sys
bindings to the Motors C API now takes the correct port type (i8
) as of PROS 4 (Breaking Change) (#66).- Fixed the unintended
unsafe
context present in thesync_robot
andasync_robot
family of macros (Breaking Change) (#107).
- Renamed
DistanceSensor::object_velocity
toDistanceSensor::velocity
. - Adjusted
distance_confidence
to return a value from [0.0
,1.0
] rather than 0-100 to match other percentage getters. - Refactored the Motor API (Breaking Change) (#66)
- Adjusts constructor arguments for
Motor
to allow passingGearset
and a direction instead ofbrake_mode
at construction. (Breaking Change) (#66) - Renamed
Motor::get_state
toMotor::state
. (Breaking Change) (#66) - Changed
Motor::reversed
to returnResult<bool, _>`` rather than just
falseif
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 thanBrakeMode::Coast
. - Renamed
Motor::current_draw
toMotor::current
. - Renamed
Motor::get_state
toMotor::status
.
- Adjusts constructor arguments for
- Status structs containing device bits now use the
bitflags!
crate. (Breaking Change) (#66) - Renamed
InertialSensor::calibrating
toInertialSensor::calibrating
(Breaking CHange) (#66) - AdiEncoder now returns
Position
rather than just degrees (Breaking Change) (#106).
- Removed
MotorStoppedFuture
, as it was broken due to hardware not returning thestopped
flag (Breaking Change) (#66). - Removed
Motor::set_output
andMotor::set_raw_output
in favor ofset_voltage
.
- Added feedforward motor controllers (#80)
- Lightly document all APIs with missing documentation. (#70)
- Added
Debug
,Copy
, andClone
derives for common structs (#70) - Screen drawing API. (#81)
- Added screen field to
Peripherals
andDynamicPeripherals::take_screen
method. (#81) - Added
AdiSolenoid
, a wrapper overAdiDigitalOut
for actuating SMC pneumatic solenoids. (#61) - Added
AdiSwitch
, anotherAdiDigitalOut
wrapper that abstracts bumper switches and limit switches. (#61) - Added
AdiLineTracker
for abstracting the EDR line tracker sensor. - Implemented TryFrom for Gearset.
- Adds support for getting brake modes from motors. (#66)
- Fix error handling and error type variats in ADI bindings
- Fix
AsynRobot
only running opcontrol - Properly handle
EADDRINUSE
return for smart port errors (Breaking Change) (#97)
- Re-exported printing macros from
pros::io
. (#82) - Applied several lints to improve code quality. (#70)
- Updated to PROS version 4. (Breaking Change) (#81)
- Moved
vision::Rgb
into its owncolor.rs
file. (Breaking Change) (#81) - The VEXOS target has been updated to improve file size and floating point operation speed. (#81)
Peripherals::new()
is no longer const (**Breaking Change) (#81)- Updated panic handler to print to the brain display as well as over serial (#81)
- Refactors digital and analog ADI input/output. (Breaking Change) (#61)
- Adds LogicLevel rather than bools for controlling digital devices.
- Adds 0-5V voltage getters and setters for analog ADI.
- Changed analog getters and setters to use
u16
data.
- Changed
AdiPotentiometer
to return degrees rather than tenth degrees (Breaking Change) (#61).- Renamed
AdiPotentiometer::value
toAdiPotentiometer::angle
.
- Renamed
- Refactors
AdiMotor
to match the smart motor APIs, having output/raw output getters/setters. - Renamed
AdiUltrasonic::value
toAdiUltrasonic::distance
(Breaking Change) (#61). - Renamed
AdiEncoder::value
toAdiEncoder::position
(Breaking Change) (#61). - Repurposed
AdiAnalogOut
asAdiPwmOut
to correct match port output. (Breaking Change) (#90). - Moved most device-related constants into their associated struct
impl
(Breaking Change) (#98). - Renamed IMU_RESET_TIMEOUT to
InertialSensor::CALIBRATION_TIMEOUT
(Breaking Change) (#98). - Repurposed the
pros
crate as a metapackage without any code of its own. (Breaking Change) (#86) - Split the pros-rs into several small subcrates. (Breaking Change) (#86)
pros-async
with the async executor and robot trait.pros-devices
for device bindings.pros-sync
for the sync robot trait.pros-core
with basic abstractions overpros-sys
needed to compile a program to the brain.pros-math
with commonly used controllers and other mathematical models.pros-panic
for the panic handler implementation.
- LVGL bindings (pros-sys) and colors (pros). (Breaking Change) (#81)
- LLEMU/lcd bindings. (Breaking Change) (#81)
- Re-exported printing macros from
pros::io
. (#82) - Applied several lints to improve code quality. (#70)
- Removed the confusingly named
write
,ewrite
,writeln
, andewriteln
macros. (Breaking Change) (#82) - Removed AdiDigitalIn::new_press, instead swapping it for AdiSwitch::was_pressed. (Breaking Change) (#61)
SmartPort
struct for device access. (#34)SmartDevice
trait for common functionality across smart port devices. (#34)- Methods to get a device's port number as well as determine if the device is plugged in or not. (#34)
- Added various missing derives for hardware-related data structures. (#34)
CompetitionSystem
andCompetitionMode
structs for better retrieving information about the robot's competition state. (#38)competition::system
method for retrieving the type of competition control the robot is connected to. (#38)- New
From
implementation to convertQuaternion
andEuler
to their pros-sys equivalents. (#45) pros::io
module for I/O related operations. (#30)- Various types from the
no_std_io
have are re-exported from this module to provide missing functionality fromstd
. (#30) - Macros for printing to stdout (
println
,print
,eprintln
, etc...) (#30) - All ADI device bindings (#55)
LocalKey
now hasCell
/RefCell
-specific methods for setting and taking values. (#42)Peripherals
andDynamicPeripherals
structs to ensure that you have only registered one device on a given smart or ADI port. (#53)- Support for ADI Expander modules with
AdiExpander
. (#63)
- Fixed competition state-related getters in the
pros::competition
module. (#38) - Fixed error handling in IMU sensor bindings. (#37)
- Fixed errors in doctests and examples throughout the crate. (#37)
- Fixed Missing ERRNO and ADI config variants in pros-sys (#55)
- Fixed incorrect error handling with
InertialSensor::status
. (#65) Controller::status
now handles errors by returningResult<ControllerStatus, ControllerError>
. (Breaking Change) (#74)
- Overhauled the
competition
module with more straightforward getters for competition state. (#38) (Breaking Change) - LLEMU-related macros have been prefixed with
llemu_
(e.g.llemu_println
). (Breaking Change) (#30) - Added
Debug
,Copy
, andClone
derives for common structs (#37) - Renamed
InertialSensor::is_calibrating
toInertialSensor::calibrating
. (Breaking Change) (#65) - Battery API functions now return
Result<_, BatteryError>
. (Breaking Change) (#62) - Renamed
battery::get_capacity
tobattery::capacity
,battery::get_current
->battery::current
,battery::get_temperature
->battery::temperature
,battery::get_voltage
->battery::voltage
. (Breaking Change) (#62)
- Removed several broken bindings in
pros_sys
relating to competition state. (#38) (Breaking Change) LocalKey
no longer implementsset
for non-Cell
/RefCell
stored values. (Breaking change) (#42)- Removed the now-redundant
InertialStatus::error
function. (Breaking Change) (#65)
0.6.0 - 2024-01-14
- GPS sensor
set_offset
function now returns a result. The relevant PROS C bindings have been fixed as well. (Breaking change) - FreeRTOS task creation now does not garble data that the provided closure captured.
- Grammar in the feature request template has been fixed.
- Wasm build flags have been updated and fixed.
- Panicking behavior has been improved so that spawned tasks will not panic the entire program.
- Panic messages are now improved and printed over the serial connection.
AsyncRobot
should now be implemented using the newly stabilized async trait syntax instead of the oldasync_trait
attribute macro. (Breaking change)- Add contributing information, pull request templates, and changelog. (#34)
AdiPort
is now structured with ADI expander modules in mind. (Breaking change) (#34)- Reorganized ADI, Smart Port, and builtin devices into a common
devices
module. (Breaking change) (#34) - Devices now take
SmartPort
/AdiPort
rather than a raw port index. (Breaking change) (#34) - All devices now take
&mut self
for methods modifying hardware state. (Breaking change) (#34)
Copy
/Clone
derives for some existing device types. (Breaking change) (#34)- A nonexistent runner for armv7a-vexos-eabi target has been removed from the cargo config.
0.5.0 - 2024-01-08
- Standard library like
Instant
s - Optical sensor bindings.
- IMU sensor bindings.
- The async executor now does not starve the OS of cycles when unnecessary.
- Updated readme with fixed grammar.
0.4.0 - 2024-01-02
- Add methods to controller for checking individual buttons and axes.
- Write doc comments for previously undocumented modules and functions.