33 lines
1.3 KiB
Python
33 lines
1.3 KiB
Python
"""Display models: id stored in main.HMI (offset 16), series byte (offset 11), native resolution.
|
|||
|
|
|
||
|
|
Only series whose series byte was confirmed in the Editor are listed (Basic = 0, Intelligent = 3).
|
||
|
|
Model ids are the 32-bit values the Editor writes for each model.
|
||
|
|
"""
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
# name: (model id, series byte, width, height)
|
||
|
|
MODELS = {
|
||
|
|
"NX3224T024_011": (0xF59677A7, 0, 320, 240),
|
||
|
|
"NX3224T028_011": (0x1443383B, 0, 320, 240),
|
||
|
|
"NX4024T032_011": (0x6D494DA9, 0, 400, 240),
|
||
|
|
"NX4832T035_011": (0xB23BC018, 0, 480, 320),
|
||
|
|
"NX4827T043_011": (0xCA296EB1, 0, 480, 272),
|
||
|
|
"NX8048T050_011": (0x87AD3AE3, 0, 800, 480),
|
||
|
|
"NX8048T070_011": (0x081FBDCC, 0, 800, 480),
|
||
|
|
"NX4827P043_011": (0x181169DA, 3, 480, 272),
|
||
|
|
"NX8048P050_011": (0x55953D88, 3, 800, 480),
|
||
|
|
"NX8048P070_011": (0xDA27BAA7, 3, 800, 480),
|
||
|
|
"NX1060P070_011": (0xC43473C2, 3, 1024, 600),
|
||
|
|
"NX1060P101_011": (0x4FC44FA0, 3, 1024, 600),
|
||
|
|
}
|
||
|
|
BY_ID = {v[0]: k for k, v in MODELS.items()}
|
||
|
|
SERIES = {0: "Basic", 3: "Intelligent"}
|
||
|
|
|
||
|
|
# main.HMI text-encoding index (offset 12). Only the value seen in real projects is listed.
|
||
|
|
ENCODINGS = {"iso-8859-1": 1}
|
||
|
|
|
||
|
|
|
||
|
|
def lookup(model: str):
|
||
|
|
if model not in MODELS:
|
||
|
|
raise KeyError("unknown model %r; known: %s" % (model, ", ".join(sorted(MODELS))))
|
||
|
|
return MODELS[model]
|