tft: generic type engine (tft_types), number and button; notes on the Editor inspection
Record slots follow the Editor's visible attribute list; generated scripts are templates compiled by the normal script compiler. Number (all backgrounds and border styles) and button (solid background, all five styles) are byte-identical. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
b5eaa68298
commit
a8622e7462
4 files changed
+352
-154
No files matched your search
@@ -193,3 +193,31 @@ Starting points for the next component types (from those samples, not yet in the
|
||||
filled and the empty part. Gauge: one `09 0A 08` line. QR code: one `09 08 08` line.
|
||||
- Slider and touch cap add the init line `09 16 04 1`; slider has a `slide` event label.
|
||||
- Object flag byte: 0x37 types with a rectangle, 0x27 timer and touch cap, 0x07 variable.
|
||||
|
||||
### Look inside the Editor (2026-11-17, allowed by the owner, read-only)
|
||||
|
||||
Result: almost nothing, and nothing from it is in the repo.
|
||||
|
||||
- `Nextion Editor.exe` is a small .NET loader; the real program (and with it the compiler and
|
||||
the per-component script templates) is `ACTR.dll`, which is encrypted and was left alone.
|
||||
- `en0_com.bin` / `en0_va.bin` are the Editor's help texts for commands and system variables
|
||||
(plain text behind a one-byte XOR). They give the complete list of names (64 commands, 75
|
||||
variables and constants) but not the token numbers: the order in the file is not the token
|
||||
order. **Fact from the inspection:** only this list of names, used to decide what to put in
|
||||
sample projects. Every token number in `tft_code.py` was read from compiled samples.
|
||||
|
||||
### Slot rule and the generic builder (2026-11-17)
|
||||
|
||||
Found by comparing samples, not from the Editor: a component's record slots follow the
|
||||
attributes the Editor *shows* for it, in order. Components with a rectangle: 19 common slots
|
||||
(type, id, objname, vscope, drag, sendkey, aph, movex, movey, x, y, w, h, endx, endy, effect,
|
||||
first, time, lockobj), then one slot per visible attribute, then 8 empty ones. Components
|
||||
without (variable, timer, touch cap): 7, the visible attributes, 2 empty. Hidden attributes
|
||||
get no slot -- e.g. `style` disappears when `sta` is not "solid color", `borderc`/`borderw`
|
||||
exist only for style "border" -- so every later slot moves.
|
||||
|
||||
The generated scripts are ordinary Nextion script compiled by the same compiler as event code
|
||||
(`if(val==1) {...} else {...}` in a button becomes the usual test/jump chunks), with constant
|
||||
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.
|
||||
Reference in new issue
Block a user