Skip to content

Refloat 1.3.0-beta1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 14 Jun 18:01

Refloat 1.3 reworks a lot of the core control mechanisms and adds Setpoint Smoothing to all Tilts. Boards will behave slightly differently and tunes might need adjusting.

WARNING: This is a test version of the package. Bugs may be present.

Use at your own risk!!!

Features

  • Move core (PID) balancing control to the IMU callback
    This removes a source of timing inaccuracies stemming from an arbitrary delay between a new IMU sample arriving and being used.

  • Introduce setpoint smoothing for all Tilts (Torque tilt, ATR, Brake Tilt, Turn Tilt and Remote)

  • Add separate configurable downhill/braking tilt speeds for Torque Tilt and ATR

  • New ATR Transition Boost
    The ATR Transition Boost feature didn't fit the new Setpoint Smoothing algorithm. It was reworked and the multiplier now applies to the smoothing constants as well as the angling rates.

  • The ATR Response Boost config option was dropped
    It is deemed unnecessary with the new Setpoint Smoothing allowing faster speeds in general.

  • Use torque instead of current in balance calculations (6.06+)
    On firmware 6.06+ calculate motor torque based on the calibrated flux linkage and configured motor poles.

    This compensates for different motors' torque constants and should make tunes behave more consistently across different motors (not taking into account saturation, that is, the maximum torque a given motor can produce, which remains a major differentiator that can't be accounted for). As a consequence, with this feature (on FW 6.06+) the tune behavior will change slightly according to the motor being used.

    Config options related to current are now internally converted to a torque equivalent of a motor Flux Linkage of 27 mWb (a middle value for the common Onewheel motors). The more your Flux Linkage value differs from this, the more will your tune be adjusted.

    The following config options are affected. To retain previous tune behavior, calculate k = Flux Linkage / 27 and adjust:

    Divide by k (likely noticeable, recommended to adjust):

    • Torque Tilt Strength and Strength (Regen)

    Multiply by k (subtle, adjust if needed):

    • Angle P
    • Rate P
    • Angle I
    • I Term Limit
    • Booster (Acceleration/Braking) Current Boost
    • Torque Tilt Start Current Threshold
    • ATR Amps to Acceleration/Deceleration Ratio

    Make sure your Motor Cfg -> Additional Info -> Setup -> Motor Poles value is correct! The correct value for all Onewheel motors to date is 30.

    On firmware 6.05 and older the behavior remains the same.

  • New and more consistent Reverse Stop implementation

  • Add the Control Loop dt and Control Loop Frequency to realtime data
    The dt (delta time) is the time between control loop iterations. The frequency is based off that, just smoothed out. Both of these values are defined by IMU Sample Rate.

    Control Loop Frequency can be used to check the actual frequency a particular configure IMU Sample Rate has resulted in.

    Control Loop dt can be checked to see how jittery the timing is, but the Data Recording firmware is needed for that, as the dt needs to be recorded precisely (normal data logging at 10x per second can't accurately show it). Besides IMU Sample Rate, Motor ZVF has a big impact on the Control Loop jitter.

  • Add an option to swap left/right footpad ADCs

  • Remove the Loop Hertz config option
    The value no longer directly influences motor control and is now hard-coded to 500 Hz.

  • Remove the Turn Tilt Max Tiltback Speed option
    It is replaced by the Smoothing Time Constant, which effectively limits speed in addition to defining the overall smoothness.

  • Remove the Remote Tiltback Speed option
    It is replaced by the Smoothing Time Constant.

  • Add a "Keep Defaults" button to the automatic config restore dialog (to stay on defaults and stop the dialog from popping up)

  • Add the Decimation parameter to Data Recording
    Decimation controls how often samples are recorded - a value of N records every Nth sample, allowing longer recording periods at reduced resolution. It can be set via long-pressing the Record button in the realtime data plot.

    The decimation defaults to a value which results in about 10 seconds of data being recorded.

  • Implement scaling groups for the realtime data plot in the UI
    All pitch values (including sentpoints) and all motor current values will now scale together.

  • Custom scaling for realtime data plot
    The scaling can be accessed by long-pressing on a series in the series visibility menu.

  • Add a fullscreen remote overlay to package UI

  • Rework the remote moving (wheel turning) and implement a new way to control remote (both tilting and moving) from apps
    There is now a single slider in the package UI for remote which controls both tilting and moving the same way a remote does.

  • Flash the last remaining LED on the status battery bar if battery percentage goes below that point [acheronfail]

  • Show motor and battery current saturation (together with the duty cycle called motor utilization) on the status bar [acheronfail]
    Motor saturation is pink, battery saturation is teal and duty cycle is amber in color.

  • Turn Flywheel off on a single sensor press instead of requiring both halves to be pressed

Fixes

  • Make internal package calculations independent of the loop frequency
    Ensures consistent behavior regardless of what frequency the package is running at.
  • Add recalculation of filter constants according to actual measured loop frequency
    Due to technical details actual frequencies at which the package is running can differ significantly from the configured ones, this ensures the filtering is consistent and accurate.
  • Fix sending up to full motor current when turning off Flywheel via the app button
  • When using a physical remote to move the motor, don't immediately release the motor (applying brake current) in neutral position (1s timeout is used)