vexide 0.5.0 is our biggest update of all time. We focused on hopefully finalizing all of our device APIs in this update and on improving the quality of our documentation. We highly recommend reading our Thanksgiving blog post for more info.
Changelog
Added
- You can now detect controller release occurrences with
ButtonState::is_now_released
. - Added support for 5.5W motors with a new constructor (
Motor::new_exp
) and four new getters (Motor::max_voltage
,Motor::motor_type
,Motor::is_v5
, andMotor::is_exp
) forMotor
. (#167) - Added support for the V5 Workcell Electromagnet smart device. (#176)
- The conditions upon which functions return errors are now documented. (#155).
- Implemented the
Copy
trait forBannerTheme
. - Added a getter that retrieves a
Controller
’s identifier. (#189) - Added support for controllers in
DynamicPeripherals
. (#196) - Added the ability to return Smart Ports, ADI ports, the display, and controllers to
DynamicPeripherals
. (#196) - Added a
SmartDevice::UPDATE_INTERVAL
constant for all devices, representing the amount of time between data updates from a given device. (#199) (Breaking Change) - Added a
toggle
method toAdiDigitalOut
to toggle between level outputs (210). - Added the
OpticalSensor::GESTURE_UPDATE_INTERVAL
(50mS) constant (#211). - Added a
toggle
method toAdiDigitalOut
to toggle between level outputs. - Added a
SerialPort::set_baud_rate
method for the adjusting baudrate of a generic serial smartport after initialization. (#217) - Added fields containing relevant failure information to several error types (#221) (Breaking Change)
- Added support for the power button in the
Controller
API. (#231) (Breaking Change) - Added implementations of
Mul<i64>
andDiv<i64>
forPosition
, allowing for opaque scaling (#230) - Added panic hook support comparable to the Rust standard library through
vexide::panic::set_hook
andvexide::panic::take_hook
(#234) - Added support for legacy ADI servos through the
AdiServo
API. (#241) - Added support for the V5 AI Vision Sensor (#58)
- Added FOV constants to the Vision Sensor (#58)
- Added missing
Send
andSync
impl
s for RwLock. (#239) - Added the
Proportional
font family and support for fractional font scaling. (#248) (Breaking Change) - Added
AdiDigitalOut::with_initial_state
to set the initial state of a digital output while creating it (#246) - Added
Display::draw_text
to writeText
to aDisplay
. (#247) - Added support for the legacy Yaw Rate Gyroscope through the
AdiGyroscope
struct. (#236) - Added support for reading/writing to the Brain’s SDCard slot using the
vexide::core::fs
module. (#22)
Fixed
AdiAddrLed::set_pixel
will now correctly return an error if the device’s ADI expander is disconnected. (#155)- The
dbg!();
now works as expected when no arguments are supplied to it. (#175) Motor::velocity
now correctly returns the estimated velocity instead of target velocity. (#184) (Breaking Change)- Removed useless generics from
AdiAddrLed::new
. (#197) (Breaking Change) - IMU calibration timeouts should no longer appear when the IMU is in working condition. (#212)
- Fixed an issue preventing ADI updates in fast loops. (#210)
Motor::status
can now actually return theMotorStatus::BUSY
flag. (#211)- Fixed a memory leak on every
RadioLink
construction. (#220) - Fixed a panic in
RadioLink::open
that would occur if a program using a VEXlink radio was ran twice. (#243) - Fixed a bug with IMU reset offsets being applied incorrectly. (#242)
Changed
- Controller state is now returned all at once to reduce error checking. (#152) (Breaking Change)
- Controller bumper naming scheme has been changed from
<left/right>_trigger_<1/2>
tobutton_<r/l><1/2>
. (#204) (Breaking Change) Button::was_pressed
has been renamed toButtonState::is_now_pressed
.battery::capacity
now returns from 0.0-1.0 rather than 0-100.battery::voltage
is now returned in volts rather than millivolts.battery::current
is now returned in amps rather than milliamps.- Changed the incorrect return types of
AdiSolenoid::is_open
andAdiSolenoid::is_closed
fromLogicLevel
tobool
. (#164) (Breaking Change) - Renamed
Motor::MAX_VOLTAGE
toMotor::V5_MAX_VOLTAGE
and addedMotor::EXP_MAX_VOLTAGE
. (#167) (Breaking Change) - Moved the ability to convert Smart devices to
SmartPorts
out of theSmartDevice
trait and into the devices themselves. (#171) (Breaking Change) - Renamed
SmartDeviceType::Magnet
toSmartDeviceType::Electromagnet
. (#176) (Breaking Change) - Getters and constructors will now create warnings when their return values are not used. (#155)
- Renamed
OpticalSensor::rgb
toOpticalSensor::color
andOpticalSensor::raw
toOpticalSensor::raw_color
(#179) (Breaking Change). - Made the following functions infallible:
AdiAccelerometer::sensitivity
,AdiAccelerometer::max_acceleration
,AdiPotentiometer::potentiometer_type
,AdiPotentiometer::max_angle
,Motor::target
, andRotationSensor::direction
. (#182) (Breaking Change) OpticalSensor::led_brightness
now returns a number from0.0
-1.0
rather than a number from1
-100
. (#155) (Breaking Change)- Renamed
Motor::update_profiled_velocity
toMotor::set_profiled_velocity
. (#155) (Breaking Change) Mutex
is now?Sized
, matching the behavior of the standard library. (#202) (Breaking Change)- Switched to the
rgb
for color storage.vexide::devices::color
is nowvexide::devices::rgb
which re-exports theRgb
type. (#201) (Breaking Change) - Renamed
AddrledError::Adi
toAddrledError::Port
. (#203) (Breaking Change) - Renamed
GpsImu::set_data_rate
toGpsImu::set_data_interval
. (#199) (Breaking Change) - Renamed
InertialSensor::set_data_rate
toInertialSensor::set_data_interval
. (#199) (Breaking Change) - Renamed
Motor::DATA_WRITE_INTERVAL
toMotor::WRITE_INTERVAL
. (#199) (Breaking Change) - Renamed
InertialSensor::accel
toInertialSensor::acceleration
(#213) (Breaking Change) - Renamed
GpsImu::accel
toGpsImu::acceleration
(#211) (Breaking Change) SerialPort::read_byte
now takes&mut self
. (#215) (Breaking Change)OpticalSensor::last_gesture
now returns anOption<Gesture>
if no gesture was detected. (#215) (Breaking Change)- The
time
field onGesture
is now returned as an instance ofSmartDeviceTimestamp
. (#215) (Breaking Change) Gesture
andGestureDirection
no longer implementsDefault
. (#215) (Breaking Change)- Renamed
vexide::devices::geometry
tovexide::devices::math
. (#218) (Breaking Change) - Replaced the custom
Point2
type withmint
’sPoint2
type for better interop. (#218) (Breaking Change) SmartPort::device_type
now returns anOption<SmartDeviceType>
which returnsNone
if no device is connected or configured to a port. (#219) (Breaking Change)- Renamed the
LinkError::NonTerminatingNul
andControllerError::NonTerminatingNul
variants to simplyNul
and added a source error. (#220) (Breaking Change) - Made
ControllerScreen
methods andController::rumble
asynchronous and added synchronoustry_<action>
variants. (#222) (Breaking Change) - Renamed
ControllerScreen::MAX_LINE_LENGTH
toControllerScreen::MAX_COLUMNS
. (#222) (Breaking Change) - Refactored
InertialCalibrateFuture
to an opaque wrapper over the internal state machine. (#225) (Breaking Change) GpsSensor::new
is now infallible and no longer returns aResult
. (#240) (Breaking Change)RadioLink::new
can now only fail onNulError
and will not bail if a radio is disconnected. (#240) (Breaking Change)RadioLink::unread_bytes
can now return aLinkError::ReadError
. (#243)RadioLink::is_linked
is now infallible. (#243) (Breaking Change)
Removed
- Removed
Motor::DATA_READ_INTERVAL
. UseMotor::UPDATE_INTERVAL
instead. (#199) (Breaking Change) - Removed
InertialSensor::CALIBRATION_TIMEOUT
and replaced it with theInertialSensor::CALIBRATION_START_TIMEOUT
andInertialSensor::CALIBRATION_START_TIMEOUT
constants. (#212) (Breaking Change) AdiDigitalOut::level
now reads the actual reported level value from VEXos, and thus now returns aResult
. (#210) (Breaking Change)- Removed the defunct
usd
module fromvexide::devices
. (#198) (Breaking Change) - Removed
AdiSolenoid
. UseAdiDigitalOut
instead. (#210) (Breaking Change) - Removed the deprecated
ZERO_POSITION
andZERO_VELOCITY
Motor
status flags. (#211) (Breaking Change) GestureDirection::None
has been removed, asOpticalSensor::next_gesture
now returns anOption<Gesture>
. (#215) (Breaking Change)GestureDirection
no longer has aFrom
conversion foru32
. (#215) (Breaking Change)- Removed the
nalgebra
feature. All math types should natively support nalgebra conversions without any additional features. (#218) (Breaking Change) - Removed
SmartDeviceType::None
.SmartPort::device_type
now returns anOption<SmartDeviceType>
which serves the same purpose. (#219) (Breaking Change) - Removed
Position
-to-Position
Mul
/Div
ops, as they were mathematically unsound. Prefer usingPosition
-to-scalar operations for this. (#237) (Breaking Change) - Removed
LinkError::Nul
. (#240) (Breaking Change) - Removed
LinkError::Port
, because it was broken. VEXlink will no longer perform port validation. (#243) (Breaking Change) - Removed the
TextSize
enum. Use the associated constants on the newFontSize
struct instead. (#248) (Breaking Change)
New Contributors
@zabackary made their first contribution in #164!