betaflight / betaflight-tx-lua-scripts

Collection of scripts to configure Betaflight from your TX (currently only supported in OpenTx)
GNU General Public License v3.0
590 stars 142 forks source link

Trim acc #457

Closed druckgott closed 1 year ago

druckgott commented 1 year ago

Added A new Page fro Trim Accelerometer

druckgott commented 1 year ago

Fixed all points and tested it. Worked for me.

klutvott123 commented 1 year ago

Negative values doesn't display properly. We haven't had to deal with negative values in the bf lua scripts until now so everything is treated as unsigned. We'll have to look into that

druckgott commented 1 year ago

Ok yes I also so this this -1 ore <=-1, do you have an Idea where we have to change the code to get this working. Is there any way ob debuggin?

druckgott commented 1 year ago

Ok now the problem with negativ values is fixed. I do not exactly know there the limit is by switching to negativ calculation so I selected 65000 because this will never reached from -300 to 300

klutvott123 commented 1 year ago

@druckgott I think it's better if we handle this in a more generic way. See https://github.com/betaflight/betaflight-tx-lua-scripts/pull/458 With this your PR should work without the postLoad function

druckgott commented 1 year ago

ok I removed it again and if your fix is done then it should be fine.

klutvott123 commented 1 year ago

Looks good to me. You just need to squash to one commit now 👍

druckgott commented 1 year ago

How can I squash to one commit now?

klutvott123 commented 1 year ago

git rebase -i HEAD~9 you'll get a list of the last 9 commits and a bunch of actions. every commit is prepended with "pick" as default. Replace "pick" with "fixup" or "f" for all commits except the top one that you want to keep. This will leave you with one commit with all your changes. Then git push --force-with-lease to push your changes

druckgott commented 1 year ago

Mhh I cant get it working. I did all the things bevor online direct on github.com and not with git clone .... can you fix it, next time I will directly do it with git on windows.

klutvott123 commented 1 year ago

Just make a new PR

druckgott commented 1 year ago

Did a new one: https://github.com/betaflight/betaflight-tx-lua-scripts/pull/459