inav icon indicating copy to clipboard operation
inav copied to clipboard

Create a way to list possible alternatives for an setting in CLI

Open digitalentity opened this issue 10 years ago • 8 comments

Something like this:

set mid_rc=?
Arbitrary value in range [1200, 1700]

set rc_smoothing=?
Value from a list: ON, OFF

digitalentity avatar May 11 '16 08:05 digitalentity

It would also be more user firendly to get that info when entering a invalid value

set mid_rc=2500
Invalid value. Arbitrary value in range [1200, 1700]

theArchLadder avatar May 11 '16 08:05 theArchLadder

Agreed. This will certainly make CLI more user-friendly.

digitalentity avatar May 11 '16 08:05 digitalentity

Nice.

Linjieqiang avatar May 11 '16 13:05 Linjieqiang

So say 150 CLI variables potentially affected, some redundancy, so be generous, assume 40 help strings x 30 say bytes per string. 1200 bytes of flash. F3 only material.

Now, if the configurator CLI pre-parsed commands before passing to the FC and did the help prompting there ... Assume us picocom users know what we're doing:)

stronnag avatar May 11 '16 19:05 stronnag

I'm no programmer.

But would it not be possible to add this to the iNav configurator instead of the firmware?

Just have the iNav configurator interwene when entering a command that way?

oleost avatar May 11 '16 19:05 oleost

All the max/min and list values are already in inav, only two help strings should be needed, one for max/min and one for a list of values, and then just grab max/min/list from settings... At least i assume this is how it will be done, i'm sure @digitalentity will give us the answer tomorrow!

Having this in the configurator would be a nightmare IMHO, because then we would need to update the configurator every time we add, remove or change max/min/list for any setting in inav.

theArchLadder avatar May 11 '16 19:05 theArchLadder

Oh... I was digging around in the code and it turns out this feature partially already exists! This command will print a list with all settings, current value, min value and max value: set * It does not print out the different values for lists like HIGH_G or LOW_G though.

theArchLadder avatar May 11 '16 21:05 theArchLadder

I'm closing this issue, discussion will continue in #203

digitalentity avatar May 12 '16 11:05 digitalentity