Skip to content

Refloat v1.1-preview2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 14 Jan 22:01
· 0 commits to main since this release

WARNING: This is an experimental version of the package. Bugs may and will be present. Be very careful!

!!!! The Haptic Feedback feature can potentially cause VESC Firmware Faults, read below !!!!

This feature preview contains a second iteration of Haptic Feedback, which uses current modulation instead of the 6.05 foc_play_tone feature for lower frequencies haptics, and Setpoint smoothing for ATR, Torque Tilt and Input Tilt.

The preview provides a lot of technically complex configuration options, please read this release notes text in its entirety as well as the config option descriptions!

Haptic Feedback

This second iteration of Haptic Feedback uses current modulation for lower frequencies, because the foc_play_tone feature doesn't respect VESC current limits and may cause an overcurrent fault if the Absolute Maximum Current threshold is crossed (which results in an immediate nose dive). Lower frequencies cause higher current spikes, that's why we use current modulation for those, instead of foc_play_tone.

The Absolute Maximum Current threshold is supposed to be set with a leeway (recommended is at least 50% over your current limits), which should cover the spikes under normal circumstances. The user is responsible to set this limit with enough leeway. But different combinations of hardware make every board unique and some boards may have higher current spikes than others. Low impedance motors like Superflux and Cannoncore will have higher spikes in general, so are more susceptible to this issue. We evaluate the probability of a fault occurrence as unlikely, but it may happen. Use at your own risk!!! With that said, any feedback on this working without issues or producing faults is highly appreciated.

Configuring Haptic Feedback

The Haptic Feedback is configured separately for Duty Cycle alerts and for Error alerts. you can set the Audible Frequency and Strength for each of those. Then there's Vibrating Strength and Frequency (enabled by setting non-zero Strength), which is shared for both the Duty Cycle and Error feedback.

The Duty Cycle feedback has two levels, short beeps or a continuous tone. Short beeps are triggered when the Pushback Duty Cycle Threshold is crossed and there's an option for Duty Cycle Solid Threshold. There's also an option for a Current Threshold. This will play a solid tone when you are reaching a percentage threshold of your motor or battery current. Be extra careful with this option, as it occurs in high current situations and that's exactly when Absolute Overcurrent Fault is most likely to occur!

Last but not least, the Strength Polynomial configuration allows you to set the intensity as the following function of speed, so that it gets louder when you go faster:

intensity = A + B * speed + C * speed2

Setpoint Smoothing

Setpoint modifiers in the current stable Refloat release change linearly at a constant rate. When this rate (defined by Max Tiltback Speed and Max Tiltback Release Speed in the respective features' configs) is set too high, the movement is jerky. This release introduces some experimental filters that aim to smooth out the jerkiness, but at the same time allow higher setpoint change speeds.

There are three new filters:

  • 3-Stage
  • 3rd Order EMA
  • Nico's

The main configuration of the filters is on the ATR tab! You can set a different type of filter for Torque Tilt on the Tune Modifiers tab and a different Input Tilt filter on the Remote tab, but the configuration of the given types is always only one, on the ATR tab.

The 3-stage and 3rd Order EMA have config options that allow to configure their smoothness (the smoother they are configured, the longer their response time).

Note: Nico's filter doesn't have configuration. It's been used for the Input Tilt smoothing in Float and Refloat and is included here for reference. It is mathematically flawed, albeit it works reasonably well. We're trying to find a better and mathematically correct filter.

The configuration options have detailed descriptions of their respective effects.

Changelog

Features

  • Experimental: Implement Haptic Feedback

  • Experimental: Implement ATR, Torque Tilt and Input Tilt smoothing

  • The Accelerometer Confidence Decay configuration option has been removed.
    The value is now hard-coded to 0.02.

  • The Darkride Pitch Offset configuration option has been removed.

  • The Surge feature has been removed.

  • The Remote Tiltback Smoothing Factor configuration option has been removed.
    Its default value of 1 is now used for smoothing.

  • LED status bar confirmation animation for config writes and konami triggers.

  • Add konami codes for turning LED headlights on and off
    To turn headlights on: LEFT LEFT RIGHT
    To turn headlights off: RIGHT RIGHT LEFT

  • New Parking Brake feature
    Parking Brake is a strong brake at standstill applied via shorting the motor phases. A new option is added that allows to turn it on, off or on only when idle (allowing for ghostride tricks).

  • Don't activate idle brake right after startup

  • More tolerant simple-start implementation with 1 second grace period [Dado Mista]

  • Reverse stop is now smooth, robust and beginner friendly [Dado Mista]

  • Add the Felony LED effect. [acheronfail]

  • Add the (W)RGB LED Color Order option (WS2814 LED chip). [Jared Harrison]

Fixes

  • Fix overflowing battery bar in AppUi
  • Fix Floaty LEDs communication error if LED Type is not External
  • Fix spurious braking current at standstill by raising the ERPM threshold to 5