Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refloat: restore config before locking (and writing config) #8

Open
wants to merge 147 commits into
base: main
Choose a base branch
from

Conversation

surfdado
Copy link

Locking the board via 3rd party apps while still in flywheel mode could cause the temporary flywheel changes to be made permanent. Now the lock command first reads the config then sets the package disabled flag and writes the config.

lukash and others added 30 commits March 17, 2024 10:59
A carbon copy of the Float package from the v1.3 commit:
b2c2750

Except for paths and Makefiles adjusted to the new name, and a few
auto-generated files omitted.
lefthook is a git hook manager.
Remove useless comments and move long trailing comments that mess up
clang-format.
Doesn't make sense to call fabsf() on a boolean, assume the intention
was to take absolute value of the tiltconst variable.
Using qmlformat and a lot of hand-editing where it gave suboptimal
results.
Signed-off-by: Dado Mista <dadomista@gmail.com>
When going backwards (battery forward), the sign for the accel_gap is
inverted. Without the fix, the wrong ATR strength was being applied, so
e.g. setting only ATR uphill, the nose would instead angle down on a
downhill if going battery forward.
From AppUI (or Float Watch) it was possible to enter flywheel mode without
actually passing the sanity check!

Signed-off-by: Dado Mista <dadomista@gmail.com>
Signed-off-by: Dado Mista <dadomista@gmail.com>
Check against roll tolerances when starting dark ride

Signed-off-by: Dado Mista <dadomista@gmail.com>

darkfix
Reverse stop condition now also checked in wheelslip state!

Signed-off-by: Dado Mista <dadomista@gmail.com>
200ms instead of 500ms

Signed-off-by: Dado Mista <dadomista@gmail.com>
Drop the version in settings.xml, it adds more complexity than it's
worth. Use semantic versioning and make version a string.
The simplestart/posi features shouldn't override the footpad sensor
state to FS_BOTH, as that should represent the true value of the
sensors. Instead, add a function that evaluates whether the sensors are
engaged and which takes simplestart and posi into account.

One of the practical advantages is the user is now able to see the true
state of the sensors when only one side is activated, as opposed to
always seeing both sides are.
Keep board explicitly engaged in flywheel mode instead of overriding
float_conf adc thresholds.
Do the evalution in footpad_sensor_update().
lukash and others added 26 commits March 17, 2024 10:59
Also fix atr_filter_enabled config value being reset in an init
function.

The _reset name is much more descriptive, the function serve to reset
any runtime values that haven't been cleared after stopping (so that the
values remain available for backward reference).
Fix: Fix duty on LED status bar always showing at 100%.
Fix: Fix disappearing battery percentage on LED status bar.
Fix: Fix LEDs configuration not picking up some values after startup.
Fix: Rename the Specs -> LED Pin option values to be more descriptive.
Convert brightness from 0..1 float to 0..100 integer

Fix: Fix setting brightness for LCM module (Floatwheel)

Signed-off-by: Dado Mista <dadomista@gmail.com>
Fix: Fix Torque Tilt using ATR step sizes instead of its own step sizes.
Fix: Fix showing wheelslip and duty pushback alerts in Flywheel mode.
Fix: Fix beeper beeping on board startup.
Signed-off-by: Dado Mista <dadomista@gmail.com>
Fix: Fix a crash in LEDs Cipher transition when front or rear strips
 have 0 LEDs configured.
Fix: Fix a (Watchdog Timer) reboot when reinstalling Refloat (in case
 LEDs are disabled)
Locking the board via 3rd party apps while still in flywheel mode could cause
the temporary flywheel changes to be made permanent. Now the lock command first
reads the config then sets the package disabled flag and writes the config.

Signed-off-by: Dado Mista <dadomista@gmail.com>
@lukash
Copy link
Owner

lukash commented May 16, 2024

You did the fix in Float, not in Refloat 😅 You might wanna wait for the repo move (which I hope will be finished in a week or two, I'm still swamped time-wise), then it'll be a bit simpler :)

@surfdado
Copy link
Author

lmao, sorry - I did it in both but somehow still picked the wrong commit to PR

@lukash
Copy link
Owner

lukash commented May 23, 2024

😁 please don't add it here anymore, I've got the new repo all ready, but didn't have time for the actual switch. I'm leaving for the weekend, when I get back I'll do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants