Releases: lukash/refloat
Refloat v1.1-preview2
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
Refloat 1.1-preview1
WARNING: This is an experimental version of the package. Bugs may and will be present. Be very careful!
This release is intended primarily as a test for Haptic Feedback. This release allows to configure all the Haptic frequencies as well as the tone length of the beeps. The goal is to provide a configurable build for testing, gather feedback and come up with a smaller set of configuration options, which still allows enough customization.
In addition to the new config section (Haptic Feedback), Pushback Alerts -> Duty Cycle Threshold is used to trigger Duty Cycle Haptic Feedback).
There is also an option to set the Duty Cycle filter alpha (Pushback Alerts -> Duty Filter Alpha) for Duty Cycle smoothing used to determine duty pushback, which can be used to tune how Duty Cycle spikes are filtered out. (higher numbers mean less filtering)
As for the kind of feedback we're looking for:
- Which frequencies work for you and which do you prefer
- What tone length do you use
- Which intensities
- How do you like how the Haptic Feedback works in general
- Do you use the vibrating frequency and which?
- What Duty Cycle alpha works best for you (and how much did you push into very high Duty Cycle when testing)
Features
- Add the Felony LED effect. [acheronfail]
- Reverse stop is now smooth, robust and beginner friendly [Dado Mista]
- Add a temporary config option to set duty cycle filter alpha
- Implement Haptic Feedback
Refloat 1.0.1
When upgrading from Refloat 1.0.0, config backup and restore is not needed.
Fixes
- Locking/unlocking the board no longer writes unrelated changes. (Dado Mista)
- Fix overflowing battery bar in AppUi.
- Add a a deprecation note to the Accelerometer Confidence Decay setting.
- Fix Floaty LEDs communication error if LED Type is not External.
- Fix spurious braking current at standstill on VESC Firmware 6.05 by raising the ERPM threshold to 10.
Refloat 1.0.1-beta3
Fixes
- Fix spurious braking current at standstill by further raising the ERPM threshold to 10.
Refloat 1.0.1-beta2
Fixes
- Fix spurious braking current at standstill on VESC Firmware 6.05 by raising the ERPM threshold to 5.
Refloat 1.0.1-beta1
A small bugfix release (config backup/restore not required).
Fixes
- Locking/unlocking the board no longer writes unrelated changes. (Dado Mista)
- Fix overflowing battery bar in AppUi.
- Add a a deprecation note to the Accelerometer Confidence Decay setting.
- Fix Floaty LEDs communication error if LED Type is not External.
Refloat 1.0.0
Refloat 1.0.0 is based on Float 1.3 and brings the following new features and fixes:
Features
-
Separate Mahony KP configuration between package and firmware
Mahony KP configuration is now separate between the App Config (firmware) and the Refloat Config (package). The App Config IMU Mahony KP is now used for "true pitch", meaning a standard KP of less than 1 is required. (Float used Mahony KP of 0.2, here 0.4 is used, as it seems to work better)
To make the transition seamless and to ensure no misconfiguration happens, Refloat will set the following values in App Config - IMU if it detects Mahony KP greater than 1 being configured there:
- Mahony KP: 0.4
- Mahony KI: 0
- Accelerometer Confidence Decay: 0.1
You don't need to do anything when transitioning from Float package, but you can check the values are as described after installation.
A new Refloat Config item Accelerometer Confidence Decay has been added to the package, which is used for the Refloat balance filter.
-
Separate Axis KP
The Mahony KP configuration item is now called Pitch KP and controls only the pitch axis. A new configuration option, Roll KP, is introduced, which controls the roll axis. This way the KP can be configured for each axis separately, which improves the way the board handles in turns and in a significant way improves the balance profile.
Technical explanation: High Mahony KP works very well for balancing, but it is only desirable on the pitch axis. The mellow response of high KP has unwanted effects on the roll axis, because when the board rotates in yaw (when turning), roll becomes pitch. The board leads into a turn angled in roll (more pronounced on roundier tires), and this angle translates into pitch and lingers there for an amount of time determined by the KP, causing the nose to be down for a time, until it balances back up.
Lower roll KP makes the nose hold up better in turns. It makes the board more stable and "stiffer", especially in short carves. This means the Turn Tilt feature may be less needed and may respond more aggressively.
The Yaw KP parameter seems to have very little effect on anything, it is included for completeness and experimentation for now. It may be removed in the future if it proves to not be useful. Recommended value is inbetween Pitch KP and Roll KP to not make the model unnecessarily imbalanced.
-
Beautiful new full-featured GUI
-
Advanced LED lighting control
LED lighting control for front/rear/status strips with configurable animations and smooth transitions.
Runs in its own thread (meaning it won't disrupt the control loop) at 30 FPS. Consumes about 1% CPU.
-
Allow negative ATR Speed Boost
Ported from Float package 2.0.
-
Changes to default configuration values:
- Pitch/Roll Axis Fault Cutoff 60° instead of 90°.
- Pitch/Roll Fault Delay 250ms instead of 1s.
- ADC1/2 Switch Voltage 2.0V instead of 3.0V.
- Half Switch Fault Delay 200erpm instead of 300erpm.
- Startup Pitch Axis Angle Tolerance 4° instead of 5°.
- Startup Centering Speed 30°/sec instead of 60°/sec.
- ATR Threshold Angle Up/Down 1.5° instead of 0.5°.
- Pushback Return To Level Speed 1°/sec instead of 5°/sec.
-
Set default Turn Tiltback Strength to 0
The feature is less needed with Triple KP and the user should set it only if they feel they need to.
-
Set ATR Uphill/Downlhill Strength default to 0
ATR is an advanced feature, which is not always smooth. Users should only set it up when they decide they want it.
-
LCM Support and Float-like lights control
The LCM support is ported from the Float package and Refloat supports the same commands to control the lights from 3rd party apps.
The concepts used for light controls in Float don't really fit with the Refloat way of managing lights, though. For Refloat's VESC-native LEDs the 3rd party app controls will not work (VESC tool can be used to control the lights).
For configuration of the LCM module, the three brightness values that Float uses for lights control are mapped to the following Refloat options:
- Headlights Brightness
- Front Brightness
- Status Brightness (Headlights On)
- Status Brightness (Headlights Off)
The following two LEDs options can be used to control whether the LEDs are on and whether the Headlights or Idle brightness is used:
- LEDs On
- Headlights On
The rest of the options is ignored for the External Module LEDs.
-
Allow turning Flywheel off via the app button even when running.
Fixes
- Remove undocumented 0.8 multiplier for handpress ADC activation.
- Remove undocumented non-trivial current limits based on the decimal digits of the following options: Motor Current Max, Motor Current Max Break, Absolute Maximum Current
- Fix choppy braking while freespinning in handtest mode.
- Fix applying the Motor Current Max Brake to the acceleration current while going in reverse (battery forward).
- Fix Runtime Tune applying Break Tilt Strength 0 (very small) instead of disabling the feature completely.
- Fix resetting runtime tune to defaults by a 3rd party app command (not related to the Read Default Settings in VESC Tool) correctly applying ATR Filter and Break Tilt Strength/Lingering. (This feature still doesn't correctly reset all parameters.)
Refloat 1.0.0-beta6
This release will reset the configuration, a configuration backup and restore will be needed.
Features
- Remove the Yaw KP configuration option.
A middle value between Pitch KP and Roll KP is now used for Yaw KP. - Add new LED Color Order config option with support for the RGB order (WS2815 LED chip).
Fixes
- Fix dirty landings re-engaging sometimes returning to level at a very slow speed.
Refloat 1.0.0-beta5
Fixes
- Fix a crash in LEDs Cipher transition when front or rear strips have 0 LEDs configured
- Fix a (Watchdog Timer) reboot when reinstalling Refloat (in case LEDs are disabled)
Refloat 1.0.0-beta4
Fixes
- Fix setting brightness for LCM module (Floatwheel) [Dado Mista]
- Fix Torque Tilt using ATR step sizes instead of its own step sizes [Aeraglyx]
- Fix showing wheelslip and duty pushback alerts in Flywheel mode
- Fix beeper beeping on board startup