Added
- Added optional
calibrated=True
parameter toacceleration()
andup()
and
angular_velocity()
androtation
methods of the IMU (support#943). - Implemented
hub.imu.orientation()
to give the rotation matrix of the hub or
robot with respect to the inertial frame. - Added calibration parameters that can be set for angular velocity offset and
scale and acceleration offset and scale. - Added
hub.system.reset_storage
to restore storage and settings to default
state.
Changed
- Enabled UTF-8 support for
str
objects. - The method
DriveBase.angle()
now returns a float (support#1844). This
makes it properly equivalent tohub.imu.heading
. - Re-implemented tilt using the gyro data by default. Pure accelerometer tilt
can still be obtained withhub.imu.tilt(use_gyro=False)
. - Re-implemented
hub.imu.heading()
to use optionally use the projection of 3D
orientation to improve performance when the hub is lifted off the ground.
The 1D-based heading remains the default for now. - Change return value of
connected()
property frombool
toint
using the value
ofpbdrv_usb_get_bcd()
. This will allow pro users to be able to tell if they
have a "nonstandard" charger that could prevent proper
charging (pybricks-micropython#274). - When the Bluetooth button is selected to stop the program, don't disable the
stop button while the hub menu is active (support#1975).
Fixed
- Fixed battery charging timeout if it didn't reach 100% after about 6 hours.
This is same behavior observed in official firmware. (pybricks-micropython#292). - Fixed inconsistent battery level reported to user. Now it uses the same value
as used by the light indicator (support#2055). - Fixed
DriveBase.angle()
getting an incorrectly rounded gyro value, which
could causeturn(360)
to be off by a degree (support#1844). - Fixed
hub
silently ignoring non-orthogonal base axis when it should raise. - Fixed not handling negative duration in
Speaker.beep()
(support#1996).
Removed
- Removed ev3dev and ev3rt-based CI builds. Pybricks 2.0 on ev3dev will
continue to be available as a separate download.