Reword Lua script UI - #1
Conversation
4adb02b to
609e524
Compare
| static char gyroOffOn[] = "Off;On"; // Off-ON | ||
| // needs to match gyro_status_t | ||
| static const char *gyroStatus[] = {"Off","IMU Not Detected","Need RX-Orientation","Need Stick Calibration","Running"}; | ||
| static const char *gyroStatus[] = {"Off","!Detected","!Orient.","!Stick cal","Running"}; |
There was a problem hiding this comment.
These ones may be a bit controversial. I feel the ! conveys the idea of an error, even if someone doesn't necessarily read it as NOT, and space is really at a premium in these fields on B&W displays.
|
|
||
| // Must match gyro_pidgroup_t | ||
| static const char gyroPidGroup[] = "Rate (v/100);Level(v/100);AHRS (v/10)"; | ||
| static const char gyroPidGroup[] = "Rate (%);Level (%);AHRS (x0.1)"; |
There was a problem hiding this comment.
I hope we can turn them all in % and move the unit next to the values.
There was a problem hiding this comment.
Not necesary percentages.. there are weights for parameters in the algorithms
|
|
||
| static folderParameter luaGyroPIDFolder = { | ||
| {"PIDs (Advanced)", CRSF_FOLDER}, | ||
| {"Advanced (PIDs)", CRSF_FOLDER}, |
There was a problem hiding this comment.
Guessing what the name of the corresponding panel in the WebUI could be. 💭
|
|
||
| static folderParameter luaGyroFModeFolder = { | ||
| {"FMode Settings", CRSF_FOLDER}, | ||
| {"Tuning", CRSF_FOLDER}, |
There was a problem hiding this comment.
I'm not too sure about this vs Settings, but I followed the WebUI (where I think it "Gyro Mode Tuning" reads good. In the Lua script, "Gyro Mode" is the visible title of the menu.)
There was a problem hiding this comment.
I think is more a Flight mode tuning... not general tuning
There was a problem hiding this comment.
I suggested to move from "gyro flight mode" to "gyro mode", so that there is less room for confusion between the gyro modes and the typical EdgeTX "flight modes".
I've been highlighting gyro mode as a specific gyro concept across the docs, and I think it works well.
In this specific Lua screen, the title of the menu / page is Gyro Modes and it has two menu entries: Tuning and Advanced (PIDs). This echoes the WebUI Gyro Mode Tuning panel.
The full hierarchy to get there is: RX > Gyro > Gyro Modes > Tuning.
Respectively: RX > Gyro > Gyro Modes > Advanced (PIDs).
| // Step 2: Stick Range Cal | ||
| newStep = lcsAskConfirm; | ||
| msg = "Moved to all Sides/Corners?"; | ||
| msg = "Move over full range"; |
There was a problem hiding this comment.
Fighting for a few characters. 😬
|
|
||
| static selectionParameter luaGyroFMode_StickPri = { | ||
| {"Stick Priority", CRSF_TEXT_SELECTION}, | ||
| {"Stck priority", CRSF_TEXT_SELECTION}, |
There was a problem hiding this comment.
There was just one character too many. IMHO this looks better than the ...y touching the value. YMMV.
|
|
||
| static int8Parameter luaGyroFMode_AngLimitPitch = { | ||
| {"Limit Pitch", CRSF_UINT8}, | ||
| {"Pitch limit", CRSF_UINT8}, |
| } | ||
| }, | ||
| " deg (+Left)" | ||
| " deg (+Lft)" |
There was a problem hiding this comment.
The closing parenthesis does get one pixel cut, but I think they still make the text clearer, and removing more letters from Left would pass the threshold of readability IMO.
| registerParameter(&luaGyroCalibrationFolder, nullptr, luaGyroMainFolder.common.id); | ||
| registerParameter(&luaGyroModelFolder, nullptr, luaGyroMainFolder.common.id); | ||
| registerParameter(&luaGyroModesFolder, nullptr, luaGyroModelFolder.common.id); | ||
| registerParameter(&luaGyroOutputFolder, nullptr, luaGyroModelFolder.common.id); | ||
| registerParameter(&luaGyroQuickSetupFolder, nullptr, luaGyroModelFolder.common.id); | ||
| registerParameter(&luaGyroSettingsFolder, nullptr, luaGyroMainFolder.common.id); | ||
| registerParameter(&luaGyroFModeFolder, nullptr, luaGyroSettingsFolder.common.id); | ||
| registerParameter(&luaGyroCalibrationFolder, nullptr, luaGyroSettingsFolder.common.id); |
There was a problem hiding this comment.
Moved to match the WebUI.
|
|
||
| // ----- Gyro -> Model -> Stick Calibration | ||
| registerParameter(&luaGyroStickCal, [this](propertiesCommon *item, uint8_t arg) { luaparamGyroStickCal(item, arg); }, luaGyroCalibrationFolder.common.id); | ||
| registerParameter(&luaGyroStickCal, [this](propertiesCommon *item, uint8_t arg) { luaparamGyroStickCal(item, arg); }, luaGyroModelFolder.common.id); |
There was a problem hiding this comment.
Moved to match the WebUI.
Also WebUI and script do share docs, so aligning the hierarchy does help a lot in keeping the structure of the docs simple / easy to maintain.
a7c7abe to
2c90af8
Compare
We can't use the UART in the ISR in this mode so CRSF is delayed to the timeout call instead
2c90af8 to
edafd1e
Compare
Use a low-poly GLB and OGL for rendering Compass rose, artificial horizon & Ground plane Fix build by ignoring libraries before the LDF does its stupidity! Extract wizard to a common component & reuse for gyro wizards Export/Import configuration Validate setting in SetGyroConfig
edafd1e to
9ed79ff
Compare
I've no idea why, but this change did break the 'Gyro enabled' field. It went from displaying 'Gyro enabled: On' and being editable (On;Off), to display 'Gyro enabled: n' and not being editable.
The non-gyro Output mapping uses 'invert'.
The other channels with the same function do not follow the values of the primary as in a master/follower relationship; instead there is one primary input, which values are taken into account by the gyro, and secondary inputs which are ignored.
I had missed the fact that 'Level' groups all the level modes, so 'Mode group' is more accurate than 'Mode'. And the hint is actually useful, even though '(v/100)' was too long.
9cf7dc2 to
dbdb146
Compare
|
(rebased to fix minor conflict) |
d666d43 to
e47b65c
Compare
|
@pkendall64 I'm omitting updating the headers (web assets) to avoid generating pointless conflicts. Since you'll have to re-build the headers anyway... |
|
9ed79ff to
b6d43b7
Compare
|
@gonzalo-bulnes probably what you should do is rebase this and drop the wifi commits i.e. the first 4 and the 2 simple changes and PR agains Frankies branch. Mixing and matching which branch we're doing changes on is going to get very confusing. |
|
Sounds good @pkendall64 ! Makes sense, I'll do that. 👍 (Cc: @frankiearzu as a heads up 🙂) |
c425dcf to
069d5a7
Compare
a3fd7de to
ecacde0
Compare
|
Closed in favor of frankiearzu#15 |



A few goals here:
To do:
Calibrationfolder to top level[Stick Calibration]command toMain setupfolder, like in the WebUIinvertinstead ofreversefor consistency with non-gyro output mappingprimaryinstead ofmasterfor input channels