2026 remote: Nextion project in remote/, fix status-text page names
The old HMI's pages are 0 splashsceen, 1 main, 2 servocal, 3 page0, 4 uploadscreen, 5 joysticks; the link-status texts are main.t1 and page0.t1 (not page1.t1/page3.t1, which the display silently ignored). remote.HMI is the 2019 project re-saved by Nextion Editor 1.68, to work on here instead of in 2019-teensy-nrf24/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2a4f6335dd
commit
1b8166f470
4 files changed
+27
-9
No files matched your search
@@ -0,0 +1,2 @@
|
||||
# local editor settings
|
||||
.vscode/
|
||||
@@ -69,9 +69,9 @@ constexpr float STICK_EXPO[NUM_AXES] = { 0.25f, 0.25f, 0.30f, 0.20f, 0.20f,
|
||||
// One-pole low-pass on raw ADC counts (1 = no filtering). Pots are noisy.
|
||||
constexpr float STICK_FILTER_ALPHA = 0.5f;
|
||||
|
||||
// ---- Remote IMU: MPU6050 on the third I2C bus (Wire2: SDA2 = 25, SCL2 = 24) ----
|
||||
// ---- Remote IMU: MPU6050 on the third I2C bus (Wire2: SDA2 = 25, SCL2 = 24) ----
|
||||
// On the Teensy 4.0, 24/25 are solder pads on the underside, not edge pins.
|
||||
// Not Wire (18/19): those pins are stick axes A4/A5. Not Wire1 (17/16) either:
|
||||
// Not Wire (18/19): those pins are stick axes A4/A5. Not Wire1 (17/16) either:
|
||||
// those are stick axes A3/A2.
|
||||
#define IMU_WIRE Wire2
|
||||
constexpr uint8_t IMU_ADDR = 0x68; // 0x69 if AD0 is pulled high
|
||||
@@ -118,10 +118,10 @@ constexpr uint32_t NEXTION_BAUD = 115200;
|
||||
// Controls live on this page (remote/NEXTION.md). Its components must have
|
||||
// vscope = global, so the firmware can update them whichever page is showing.
|
||||
#define NEXTION_CONTROL_PAGE "control"
|
||||
// The old HMI's link-status texts (pages 1 and 3, both named t1), also
|
||||
// vscope = global. BENCH: use your real page names (Nextion's default
|
||||
// names are page0..page5; only page 4 "uploadscreen" is known).
|
||||
constexpr const char* NEXTION_STATUS_TEXTS[] = { "page1.t1", "page3.t1" };
|
||||
// The old HMI's link-status texts, also vscope = global. Its pages are
|
||||
// 0 splashsceen (sic), 1 main, 2 servocal, 3 page0, 4 uploadscreen,
|
||||
// 5 joysticks; the texts are t1 on page 1 (main) and page 3 (page0).
|
||||
constexpr const char* NEXTION_STATUS_TEXTS[] = { "main.t1", "page0.t1" };
|
||||
// The old HMI's "upload" button: page 1, component id 5 (b2), sends the
|
||||
// standard touch event. It puts the remote into Nextion upload passthrough.
|
||||
constexpr uint8_t NEXTION_UPLOAD_BUTTON_PAGE = 1;
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
# Nextion HMI build guide
|
||||
|
||||
Start from your existing HMI (`../../2019-teensy-nrf24/remote-nextion/remote.HMI`, the servo
|
||||
monitor) and **add one page named `control`** with the components below.
|
||||
Work in `remote.HMI` in this folder (a copy of the old servo monitor,
|
||||
`../../2019-teensy-nrf24/remote-nextion/remote.HMI`, re-saved by a newer
|
||||
Nextion Editor) and **add one page named `control`** with the components below.
|
||||
|
||||
The old HMI's pages:
|
||||
|
||||
| # | Name | Contents |
|
||||
|---|------|----------|
|
||||
| 0 | `splashsceen` (sic) | start page |
|
||||
| 1 | `main` | `t1` link status, `b2` (id 5) upload mode |
|
||||
| 2 | `servocal` | servo calibration (not used by this firmware) |
|
||||
| 3 | `page0` | servo sliders `h0`–`h17`, `t1` link status. Note the name: `page page0` opens this page, `page 0` (a number) opens the splash |
|
||||
| 4 | `uploadscreen` | shown during upload mode |
|
||||
| 5 | `joysticks` | not used by this firmware |
|
||||
|
||||
Your existing pages keep working:
|
||||
|
||||
| Existing | What the firmware does with it |
|
||||
|----------|--------------------------------|
|
||||
| page 1 `t1`, page 3 `t1` | writes `connected` / `not connected`, as the old firmware did. Set both to **vscope = global**, and put their real names (`page1.t1`, …) in `NEXTION_STATUS_TEXTS` in `Config.h` |
|
||||
| page 1 `t1`, page 3 `t1` | writes `connected` / `not connected`, as the old firmware did, as `main.t1` and `page0.t1` (`NEXTION_STATUS_TEXTS` in `Config.h`). Set both to **vscope = global** |
|
||||
| page 1 `b2` (id 5) | **upload mode**: keep "Send Component ID" ticked on it. The remote shows `uploadscreen` and passes USB straight through to the display, so Nextion Editor can upload over the remote's USB port. Power-cycle to leave. Serial key `U` does the same |
|
||||
| page 4 `uploadscreen` | shown on entering upload mode |
|
||||
| page 3 sliders `h0`–`h17` | not driven yet: the robot doesn't send servo positions back (that needs the planned telemetry channel) |
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user