Skip to content

Re-read the folder above a change when returning to it - #53

Open
jurgelenas wants to merge 1 commit into
masterfrom
reload-parent-on-return
Open

jurgelenas wants to merge 1 commit into
masterfrom
reload-parent-on-return

Conversation

@jurgelenas

Copy link
Copy Markdown
Member

Reported with the gyro receiver firmware (ExpressLRS/ExpressLRS#3727): the Gyro
page says a calibration is needed, the calibration is run in a subfolder, and on
going back the page still says it is needed until a manual refresh.

After a write or a finished command the tool re-read only that field, its
siblings and the parent folder's name. Rows one folder up kept their cached
values, and going back only popped the navigation stack.

The session now marks the folder one level above a change as stale and re-reads
its value, info and command rows when the user goes back to it. Browsing without
changing anything sends no extra reads.

Only one level is covered. A command two folders below the row it affects, such
as Detect Orientation under IMU Calibration > RX Orientation, still needs a
manual refresh.

The CRSF simulator's receiver gains a Gyro status row and an IMU Calibration
subfolder whose command changes it. Checked in the simulator on TX16S and GX12:
the status updates on going back with three reads, and browsing in and out sends
none. Not yet checked on a receiver running the gyro firmware.

After a write or a finished command the tool re-read only that field,
its siblings and the parent folder's name. A row one folder up kept its
cached value, so a status row on a parent page still showed the old
state after a calibration command ran in a subfolder.

The session now marks the folder one level above a change as stale and
re-reads its value, info and command rows when the user goes back to
it. Browsing without changing anything sends no extra reads.

The CRSF simulator's receiver gains a Gyro status row and an IMU
Calibration subfolder whose command changes it.
@github-actions

Copy link
Copy Markdown

Test build for 47ae2dc

  • Download: expresslrs-lua-pr53-47ae2dc.zip (requires a GitHub login; extract it, then extract the inner zip onto the SD card root). The tools show version 47ae2dc.
  • Or install from source with: edgetx-cli pkg install ExpressLRS/Lua@reload-parent-on-return (shows version dev)

@frankiearzu

frankiearzu commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Tested the new LUA code with the Gyro.. I don't think that is working correctly.

How I test it with the gyro code:

  1. From New Setup: (Resetting to defaults using Gyro->Channel Setup->Quick Setup)
  2. Restart Lua and Restart RX
  3. Enable the Gyro (ON). It will say that Orientation is needed (!Orient.)
  4. Go to IMU-Calibration-> RX orientation, and perform the level/nose down calibration. The page refreshes, showing the orientation.
  5. Back one menu (IMU Calibration), back to the main Gyro Page (Still says that it needs orientation). Click "Refresh Page" and now the status is refreshed.

From what I understand, the "Gyro" page should auto-update when going back to it. The progress % shows, but the values remain the same (status). Pressing "Refresh Status" fixes 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.

2 participants