Skip to content

Latest commit

 

History

History
654 lines (537 loc) · 30 KB

CHANGELOG.md

File metadata and controls

654 lines (537 loc) · 30 KB

Changelog

3.3.0b6 - 2023-06-02

Added

  • Enabled builtin set type (except on BOOST Move hub) (support#402).

Changed

  • Updated BTStack to v1.5.5.

Fixed

  • Fixed BLE broadcast not working on City hub.
  • Fixed crash on BTStack hubs when program stopped during call to ble.broadcast().
  • Fixed BLE broadcast not working on Technic hub when not connected (support#1086).
  • Fixed delayed sensor sync on boot on City hub (support#747).

3.3.0b5 - 2023-05-16

Added

  • Enabled the gc module (except on BOOST Move hub).
  • Added hub.ble attribute for broadcasting/observing (pybricks-micropython#158).

Changed

  • Updated MicroPython to v1.20.0.

Fixed

3.3.0b4 - 2023-04-21

Fixed

  • Fixed gyro on Technic Hub occasionally giving a bad value, which made it not calibrate properly (support#1026).
  • Fixed discrepancy in heading value across hubs by accounting for sampling time (support#1022).
  • Fixed iterator for Matrix objects giving bad values.
  • Fixed Bluetooth sometimes locking up on Technic/City hubs (support#567).
  • Fixed GyroDriveBase being slow to respond to heading perturbations when driving at high speed (support#1032).

Added

  • Added pybricks.tools.cross(a, b) to get a vector cross product.
  • Added experimental implementation of hub.imu.heading() (support#912).
  • Added support for reading single-axis rotation, which is useful in applications like balancing robots, where full 3D orientation is not required, or even undesired.
  • Added hub.imu.ready() to check that the IMU has been calibrated and is ready for use.
  • Added GyroDriveBase class to control drivebase steering with the gyro.
  • Added optional window parameter to Motor.speed to specify the differentiation window size that determines the average speed. This lets the user choose smaller values to get a more responsive (but noisier) or higher values to get a smoother (but more delayed) speed signal.

Removed

  • Removed positive_direction from DriveBase initializer. This was temporarily added in the previous beta release to facilitate gyro support, but made it more complicated than needed (support#992).
  • Removed pybricks.geometry in an effort to reduce the number of modules with just a few elements. Matrix and vector have moved to tools. The Axis enum was moved to parameters. Each item can still be imported from its original location for backwards compatibility.

3.3.0b3 - 2023-03-28

Added

  • Added positive_direction to DriveBase initializer. It defaults to clockwise to ensure this is not a breaking change. Users can now change it to counterclockwise, which is more common in engineering (support#989).
  • Added support for setting drivebase acceleration and deceleration separately using a tuple, consistent with single motors (support#881).

Fixed

  • Fixed allocator interfering with motor control when memory usage is high (support#977).
  • Fixed Stop.NONE not working properly for some drivebase geometries (support#972).
  • Fixed reading programs larger than 65535 bytes on boot on SPIKE hubs. ([support#996).
  • Various Bluetooth stability and reliability improvements on BOOST Move hub (support#320, support#324, support#417).
  • Fixed Bluetooth random address not changing on City and Technic hubs (support#1011).

Changed

  • Methods like control.limits() now check the user input and raise a ValueError if a value is out of bounds (support#484). This affects only settings setters, which are usually used as a one-off. Nothing changes to speed values set at runtime. These are still capped to valid numbers without raising exceptions.
  • Renamed precision_profile to profile in the Motor initializer.
  • In DriveBase, wheel_diameter and axle_track now accept decimal values for increased precision (support#830).

Removed

  • Removed DriveBase.left and DriveBase.right properties (support#910).

3.3.0b2 - 2023-03-08

Added

  • Added precision_profile parameter to Motor initializer. This can be used to reduce control gains to get smoother motions for heavy loads or heavily gear applications where precision is less relevant.

Changed

  • Changed how the PID values are initialized for each motor. This may lead to slightly altered performance.

Fixed

  • Fixed move hub crashing on boot.
  • Fixed position based commands starting from the wrong position if the previous command was a time based command that could not hit its target (support#956).
  • Fixed EV3 motors getting out of date with the updated motor controllers (support#941) and (support#955).
  • Fixed long delay when connecting to remote on SPIKE hubs (support#466).

3.3.0b1 - 2023-02-17

Added

  • Added support for frozen modules when building from source (support#829).
  • Added close() method to DCMotor and Motor so they can be closed and re-initialized later (support#904).
  • Fixed workaround for motor hold drifting away under external input movement (support#863).
  • Added Motor.model object to interact with the motor state estimator.
  • Added Stop.BRAKE_SMART as then option for motors. It works just like SMART_COAST, but with passive electrical braking.
  • Added logging support for control stall and pause state.

Fixed

  • Fixed Light controlling wrong ports on Move hub (support#913).
  • Reduced motor motion while holding position and added configurable setter and getter for this deadzone.
  • Fixed type checking optimized out on Move hub (support#950).
  • Fixed end-user stall flag coming up too early in position based control.
  • Further reduced stutter at low motor speeds (support#366).

3.2.2 - 2023-01-06

Fixed

  • Fixed some objects do not implement __hash__ (support#876).
  • Fixed Motor.run_time not completing under load (support#903).

3.2.1 - 2022-12-26

Fixed

  • Fixed imu.angular_velocity returning the values of imu.acceleration.

3.2.0 - 2022-12-20

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).

3.2.0c1 - 2022-12-09

Fixed

  • Fixed motor.control.limits() not working if acceleration was None.
  • Fixed crash on calling methods on uninitialized objects (support#805).
  • Fixed crash on calling methods in __init__(self, ...) before calling super().__init(...) on uninitialized objects (support#777).
  • Reverted Pybricks Code stop button raises SystemAbort instead of SystemExit (support#834).
  • Improved stop message raised on SystemExit and SystemAbort (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).

3.2.0b6 - 2022-12-02

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 the SystemExit exception (pybricks-micropython#117).
  • Changed PrimeHub.display.image() to PrimeHub.display.icon() and renamed its kwarg from image to icon (support#409).
  • Deprecated Control.load(), Control.stalled(), and Control.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 on Motor objects.

Fixed

  • Fixed connecting Remote on BOOST move hub (support#793).

Removed

  • Removed hub.system.reset() method.
  • Disabled micropython module on Move Hub.

3.2.0b5 - 2022-11-11

Added

  • Added DriveBase.stalled() for convenient stall detection.
  • Added DriveBase.done() for convenient completion detection, which is practical when combined with wait=False.
  • Added Motor.done() for convenient completion detection, which is practical when combined with wait=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).

3.2.0b4 - 2022-10-21

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 and DriveBase 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).

3.2.0b3 - 2022-07-20

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.

3.2.0b2 - 2022-07-06

Added

  • Added Motor.stalled(). It can detect stall during speed and position control (run, run_angle, ...) just like Motor.control.stalled(), but it also detects stall for dc() 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 and DriveBase 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.

3.2.0b1 - 2022-06-03

Added

  • Added Stop.NONE as then option for motors. This allows subsequent motor and drive base commands to transition without stopping.
  • Added Stop.COAST_SMART as then 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 and Motor 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 a SystemExit no matter which motor was unplugged. Now it will return an OSError with ENODEV, which is consistent with trying to initialize a motor that isn't there. The Motor 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 and Motor.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).

3.1.0 - 2021-12-16

Changed

  • Renamed new DCMotor.dc_settings() method to DCMotor.settings() (support#536).

Fixed

  • Fixed direction for DriveBase.turn() and Drivebase.curve() for some arguments (support#535).
  • Fixed then=Stop.COAST not working in DriveBase methods (support#535).

3.1.0c1 - 2021-11-19

Added

  • Added DriveBase.curve() method to drive an arc segment.
  • Added then and wait arguments to DriveBase methods (support#57).

Changed

  • Dropped integral_range argument from Control.pid(). This setting was ineffective and never used. When set incorrectly, the motor could get stuck for certain combinations of kp and ki.
  • Improved motor behavior for cases with low-speed, low-load, but high inertia (support#366).
  • Changed how the duty cycle limit is set for Motor and DCMotor. It is now set as a voltage limit via a dedicated method, instead of Motor.control.

Fixed

  • Fixed then=Stop.COAST being ignored in most motor commands.
  • Fixed brake()/light.off() not working on Move hub I/O port C (support#501).
  • Fixed Remote() failing to connect when hub is connected to 2019 or newer MacBooks (support#397).
  • Fixed intermittent improper detection of hot-plugged I/O devices (support#500).
  • A program now stops when a Motor is unplugged while it is running, instead of getting in a bad state.

3.1.0b1 - 2021-09-21

Added

  • Support for LEGO Technic Color Light Matrix (support#440).
  • Support for LEGO UART devices with a new battery power flag. This is required to support the new LEGO Technic Color Light Matrix (support#440).
  • Support for the SPIKE Essential hub/Technic Small hub (support#439).

Fixed

  • Fixed Ultrasonic Sensor and Color Sensor turning off when a user script ends (support#456).
  • Hub reset due to watchdog timer when writing data to UART I/O device (support#304).
  • City/Technic hubs not connecting via Bluetooth on macOS 12 (support#489).

Changed

  • Updated to MicroPython v1.17.

3.1.0a4 - 2021-08-30

Added

  • Enabled builtin bytearray (pybricks-micropython#60).
  • Enabled ustruct module (pybricks-micropython#60).
  • Added alpha support for dual boot installation on the SPIKE Prime Hub.
  • Added pybricks.experimental.hello_world function to make it easier for new contributors to experiment with Pybricks using C code.
  • Added ability to import the main.mpy that is embedded in the firmware from a download and run program (support#408).
  • Added pybricks.iodevices.LWP3Device to communicate with a device that supports the LEGO Wireless Protocol 3.0.00 (pybricks-micropython#68)

Changed

  • Move Hub Bluetooth optimizations to reduce firmware size (pybricks-micropython#49).
  • Disabled pybricks.iodevices module on Move Hub to reduce firmware size.
  • Improvements to pybricks.pupdevices.Remote:
    • Check if a remote is already connected before attempting to create a new connection.
    • Rename first argument from address to name to match documentation.
    • Implement connecting by name.
    • Add name() method.
    • Add light attribute.

3.1.0a3 - 2021-07-19

Added

  • Added reset_angle=False keyword argument to Motor() class. This makes resetting the angle optional, allowing to maintain absolute positioning for robots with gears (support#389).

Changed

  • Moved MicroPython math module to umath to be consistent with other MicroPython modules.

Fixed

  • Fixed City hub not always powering off on shutdown (support#385).
  • Fixed Move hub turning back on after shutdown (support#386).

3.1.0a2 - 2021-07-06

Added

  • Support for reading button state on Technic Hub, City Hub, and Move Hub.
  • Support for reading hub name on all Powered Up hubs.
  • Enable MicroPython slicing feature on Technic Hub, City Hub, Prime Hub.
  • Added pystone benchmark tests for all hubs.
  • Added hub.system.shutdown() for graceful shutdown (support#58).

Changed

  • Move Remote class from experimental to pupdevices.
  • Move Remote.pressed() to Remote.buttons.pressed().
  • Remove pybricks.experimental module on Move Hub.
  • Increased Move Hub heap from 6K to 7K due to recently freed RAM (pybricks-micropython#57).
  • Changed hub.system.reset(action) to accept 2 only (support#379). This is technically a breaking change, although this method was never officially released or documented. With this change, entering firmware update mode remains possible for backwards-compatibility, but unsafe power off methods are removed.

Fixed

  • Fix Bluetooth not disconnecting when shutting down and button is still pressed.
  • Fix I/O ports not powering off when shutting down and button is still pressed.
  • Fix version number only showing git hash and not v3.x.

3.1.0a1 - 2021-06-23

Added

  • Added PnP ID characteristic to Device Information Service and to advertising data (pybricks-micropython#49).
  • Added special location in firmware for storing hub name (support#52). Note: Support will need to be added to tools separately to make use of this.
  • Added configuration option to run a simplified version of motor PID control. It is activated on the Move Hub to reduce build size. Motor performance on the other hubs is unaffected.
  • Experimental support for the Powered Up remote control (support#186).

Changed

  • Updated MicroPython to v1.16.
  • Simplified the Powered Up UART Protocol host implementation. Unused device properties are no longer stored in order to reduce flash and RAM usage (pybricks-micropython#57).

3.0.0 - 2021-06-08

Added

Changed

  • Hub.reset() moved to Hub.system.reset() (support#321).
  • Motor methods now raise OSError with uerrno.EBUSY instead of uerrno.EPERM if the motor is currently being used and the operation cannot be completed.

Fixed

  • Fixed resetting motor angle while holding position causes movement (support#352).
  • Fixed DriveBase not resetting during initialization (pybricks-micropython#21).
  • Fixed Ctrl+C stopping REPL when first started (support#347).
  • Fixed UART I/O devices retuning uninitialized data (support#361).

Prerelease

Prerelease changes are documented at support#48.