tft: picture, crop, progress bar, checkbox, radio; page RAM header fix; README sub-goals
- five more Basic types in tft_types (default variants; others refused) - the page RAM image starts with 4 x FF + one FF per component (padded to 4) - README: .tft status split into sub-goals with a stated basis each - sample generator: display direction and gradient pictures; regression test walks sub-folders (84 Editor samples reproduced) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
a8622e7462
commit
0287cf21e4
8 files changed
+101
-10
No files matched your search
+1
-1
@@ -113,7 +113,7 @@ byte for byte, or a file written by nxhmi was opened in the Editor and showed th
|
||||
| Trailer checksum | solved for any length (`tft.trailer`); one model measured |
|
||||
| 3 header checksums (0x44, 0xC4, 0x18C) | solved (`tft.header_checksums`, `tft.seal`) |
|
||||
| Pictures and fonts inside the TFT | solved (FORMAT.md 7.2) |
|
||||
| Compiled page format | structure solved (code blob, name hashes, RAM image, attribute records, page table, object records -- FORMAT.md 7.3-7.5); per-type tables done for page, hotspot, text (solid background, flat style), int variable, timer, touch cap; the other types need their slot tables and generated draw scripts |
|
||||
| Compiled page format | structure solved (code blob, name hashes, RAM image, attribute records, page table, object records -- FORMAT.md 7.3-7.5); 13 of 20 Basic types in `nxhmi.tft_types` (page, hotspot, text, number, button, picture, crop, progress bar, checkbox, radio, int variable, timer, touch cap; variants and limits in the README table); missing: slider, dual-state button, float, scrolling text, gauge, waveform, QR code |
|
||||
| Event-code tokens | solved for what was sampled (FORMAT.md 7.6): 27 commands, 33 system variables/colours, numbers, global variables, attribute references, if/else/while/for. Not sampled: string functions and attributes, the remaining commands and system variables, `>=` op code |
|
||||
| Builder (`nxhmi build-tft`) | byte-identical to the Editor for the supported subset (one model: NX4832T035); refuses anything else. **Never tested on a real display** |
|
||||
| Licensing | every `.tft` embeds Nextion's firmware files; the repo must never ship them -- a builder would read them from the user's own Editor installation |
|
||||
|
||||
+2
-1
@@ -418,7 +418,8 @@ tokenised script line; an empty chunk ends a section.
|
||||
(timer: 7.6; slider, touch cap -- **OPEN**); the page's Preinitialize lines; the chunk
|
||||
`09 21 08`; the page's Postinitialize lines; empty chunk.
|
||||
|
||||
RAM image: 8 x FF, then every RAM-stored attribute of every component in component order,
|
||||
RAM image: 4 x FF, one FF per component of the page (the page included) padded with FF to a
|
||||
multiple of 4, then every RAM-stored attribute of every component in component order,
|
||||
each aligned to its size, each component padded to 4. For a page: `sta` (u8), pad, `bco` (u16).
|
||||
|
||||
### 7.4 Attribute records (24 bytes)
|
||||
|
||||
@@ -221,3 +221,14 @@ The generated scripts are ordinary Nextion script compiled by the same compiler
|
||||
attributes written as literals and RAM attributes as record references. `nxhmi.tft_types`
|
||||
therefore describes a type as: visible attributes, record kinds, RAM order, script templates.
|
||||
The RAM order and the unnamed drawing commands still have to be read from samples per type.
|
||||
|
||||
State on 2026-11-17 (paused by the owner mid-way): 13 Basic types compile, 84 samples reproduced.
|
||||
Page RAM image starts with 4 x FF plus one FF per component padded to 4 (found when a page
|
||||
with five components failed). Read from samples but not yet in the builder: vertical progress
|
||||
bar (`sys05_4=val*h/100`, fill from `endy+1-sys05_4`), text with border / crop / picture
|
||||
background (same `_back` / `_border` rules as number, but `sta`, `style`, `borderc`, `borderw`,
|
||||
`spax`, `spay` are constants there and are written into the script as literals).
|
||||
Samples waiting to be compiled: `g3.json` in the session scratchpad (directions 0/180/270,
|
||||
`>=`, mixed `&&`/`||`, string attributes, negative globals, more variants) -- regenerate with
|
||||
`tools/make_tft_samples.py` (`direction` and `gradient` keys) if the scratchpad is gone.
|
||||
New sample pairs live in `D:\Claude\nextion-tft-samples\2026-11-17` (outside the repo).
|
||||
Reference in new issue
Block a user