Releases: pybricks/pybricks-micropython
Releases · pybricks/pybricks-micropython
Release v3.2.1
Fixed
- Fixed
imu.angular_velocity
returning the values ofimu.acceleration
.
Release v3.2.0
Changed
- Buffered stdout is flushed before ending user program.
Fixed
- Fixed SPIKE/MINDSTORMS hubs advertising after disconnect while user program
is still running (support#849). - Fixed Essential hub hanging on boot when bootloader entered but USB cable
not connected (support#821). - Fixed button needs debouncing on City/Technic/Essential hubs (support#716).
- Fixed motor hold drifting away under external input movement (support#863).
Release v3.2.0c1
Fixed
- Fixed
motor.control.limits()
not working if acceleration wasNone
. - Fixed crash on calling methods on uninitialized objects (support#805).
- Fixed crash on calling methods in
__init__(self, ...)
before
callingsuper().__init(...)
on uninitialized objects (support#777). - Reverted Pybricks Code stop button raises
SystemAbort
instead of
SystemExit
(support#834). - Improved stop message raised on
SystemExit
andSystemAbort
(support#836). - Fixed Technic Hub and City Hub sometimes not shutting down when a Bluetooth
operation is busy (support#814). - Fixed
hub.system
methods not working (support#837).
Changed
- Changed default XYZ orientation of the Technic Hub and the Essential Hub to
match the SPIKE Prime Hub and Move Hub (support#848).
Release v3.2.0b6
Added
- Added support for
PBIO_PYBRICKS_COMMAND_REBOOT_TO_UPDATE_MODE
Pybricks
Profile BLE command. - Implemented
Motor.load()
which now measures load both during active
conditions (run
) and passive conditions (dc
).
Changed
- The Pybricks Code stop button will force the program to exit even if the user
catches theSystemExit
exception (pybricks-micropython#117). - Changed
PrimeHub.display.image()
toPrimeHub.display.icon()
and renamed
its kwarg fromimage
toicon
(support#409). - Deprecated
Control.load()
,Control.stalled()
, andControl.done()
methods, but they will continue to exist in the firmware until further
notice ([support#822]). New scripts are encouraged to use the (improved)
variants available directly onMotor
objects.
Fixed
- Fixed connecting
Remote
on BOOST move hub (support#793).
Removed
- Removed
hub.system.reset()
method. - Disabled
micropython
module on Move Hub.
Release v3.2.0b5
Added
- Added
DriveBase.stalled()
for convenient stall detection. - Added
DriveBase.done()
for convenient completion detection, which is
practical when combined withwait=False
. - Added
Motor.done()
for convenient completion detection, which is
practical when combined withwait=False
. Especially on Move Hub, which
does not have the control attribute enabled.
Fixed
- Fixed brief hub freeze on
pybricks.common.Logger.save()
when not connected
to the computer (support#738). - Fixed drive base stall flags being set while not stalled (support#767).
- Fixed
Motor.run_target
raising exception for short moves (support#786).
Release v3.2.0b4
Added
- Indicate that the hub is shutting down by quickly flashing the hub light for
half a second. This makes it easier to see when you can stop pressing the
button. - Indicate that the SPIKE Prime hub is booting and shutting down by fading
the stop sign in and out. - Implemented iterator protocol on
geometry.Matrix
class. - Added support for multi-file projects (pybricks-micropython#115).
- Added new
System.storage()
API (support#85).
Changed
- Battery full indication (green light) comes on earlier (support#647).
- New indication for over-charging battery (blinking green light).
- On Move Hub, City Hub, and Technic Hub, programs can now be restarted with
the button after downloading them. They are saved on shutdown. - Improved program download process. Reduces the likelihood of getting errors
about incompatible .mpy files when accidentally entering characters in the
terminal window when no program is active. - On Prime Hub and Essential Hub, there is no longer a wait time after boot
before you can start programs. - On Prime Hub and Essential Hub, the user program is now stored in a section
of the external flash that is not used by any file system of other known
firmwares, in order to avoid compatibility issues when changing firmware. - Restored the
Motor.speed()
method andDriveBase
equivalent to provide
speed as a numerical derivative of the motor position, instead of a
model-based estimate. For most use cases, this is a more intuitive result
because this speed value is not affected by mechanical load. - When using the REPL, everything from all Pybricks modules was automatically
imported for convenience. Now, MicroPython modules are also automatically
imported (support#741). - Updated Bluetooth to Pybricks Profile v1.2.0.
- Bluetooth now uses random private address instead of static public address
(support#600).
Fixed
- Fixed motors going out of sync when starting program (support#679).
- Fixed motor torque signal overflowing under load (support#729).
- Fixed city hub turning back on after shutdown (support#692).
- Fixed IMU I2C bus lockup on SPIKE hubs (support#232).
- Fixed REPL history corrupt after soft reset (support#699).
- Fixed "ValueError: incompatible .mpy file" when pressing the button when
there is no program yet (support#599).
Release v3.2.0b3
Fixed
- Fix integral control not working properly due to mistakes introduced while converting the controllers to use millidegrees.
Changed
Motor.run_time
no longer raises an exception for negative time values. Negative times are now treated as zero, thus producing a stationary
trajectory.
Release v3.2.0b2
Added
- Added
Motor.stalled()
. It can detect stall during speed and position
control (run
,run_angle
, ...) just likeMotor.control.stalled()
, but
it also detects stall fordc()
command when the user controls the voltage
directly.
Fixed
- Fixed motor not stopping at the end of
run_until_stalled
(support#662). - Fixed incorrect battery current reading on Technic hub (support#665).
- When the motor was pushed backwards while stalled, the
control.stalled()
was inadvertently cleared because a nonzero speed was detected. This is fixed
by checking the intended direction as well. - Fixed I/O devices not syncing at high baud rate.
- Fixed
ENODEV
error while device connection manager is busy (support#674).
Changed
- Reworked internal motor model that is used to estimate speed. This results
in better speed estimation at low speeds, which makes PID control smoother. - The
Motor.speed()
method andDriveBase
equivalents now provide the
estimated speed instead of the value reported by the motor. This is generally
more responsive. - Overhauled the control code to make it smaller and more numerically robust
while using higher position resolution where it is available. - Changed drive base default speed to go a little slower.
- Updated MicroPython to v1.19.
Release v3.2.0b1
Added
- Added
Stop.NONE
asthen
option for motors. This allows subsequent
motor and drive base commands to transition without stopping. - Added
Stop.COAST_SMART
asthen
option for motors. This still coasts the
motor, but it keeps track of the previously used position target. When a new
relative angle command is given (e.g. rotate 90 degrees), it uses that
position as the starting point. This avoids accumulation of errors when using
relative angles in succession. - Made motor deceleration configurable separately from acceleration.
- Enabled
ujson
module. - Added ability to use more than one
DriveBase
in the same script. - Added support for battery charging on Prime and essential hubs.
Changed
- Changed how
DriveBases
andMotor
classes can be used together.
Previously, an individual motor could not be used when a drive base used it.
From now on, devices can always be used. If they were already in use by
something else, that other class will just be stopped (coast). - Changed how unexpected motor problems are handled, such as a cable being
unplugged while it was running. Previously, this raised aSystemExit
no
matter which motor was unplugged. Now it will return anOSError
with
ENODEV
, which is consistent with trying to initialize a motor that isn't
there. TheMotor
class must be initialized again to use the motor again. - Changing settings while a motor is moving no longer raises an exception. Some
settings will not take effect until a new motor command is given. - Disabled
Motor.control
andMotor.log
on Move Hub to save space. - Changed LED color calibration on Prime hub to make yellow less green.
- Updated to upstream MicroPython v1.18.
- Changed
imu.acceleration()
units to mm/s/s (pybricks-micropython#88) for
Move Hub, Technic Hub, and Prime Hub.
Fixed
- Fixed color calibration on Powered Up remote control (support#424).
- Fixed 3x3 Light Matrix colors with hue > 255 not working correctly (support#619).
Release v3.1.0
v3.1.0