diff --git a/HMI/README.md b/HMI/README.md index 39763e8e..c5a75f29 100644 --- a/HMI/README.md +++ b/HMI/README.md @@ -2271,13 +2271,12 @@ Example: `entityUpd~Guest Wifi~button~navigate.prev~<~65535~~~button~navigate.ne ### cardPower -```entityUpd~LightTest~button~navigate.prev~<~65535~~~button~navigate.next~>~65535~~~17299~C~1~100 W~17299~D~0~100 W~17299~E~3~3499.5 kWh~17299~F~-1~3499.5 kWh~17299~G~-2~3499.5 kWh~17299~H~-3~3499.5 kWh~17299~G~1~3499.5 kWh~17299~H~1~100 W``` +```entityUpd~PowerTest~x~navUp~A~65535~~~delete~~~~~~text~sensor.power_consumption~B~17299~Power consumption~100W~1~text~sensor.power_consumption~C~17299~Power consumption~100W~1~text~sensor.today_energy~D~17299~Total energy 1~5836.0kWh~0~delete~~~~~~0~text~sensor.today_energy~E~17299~Total energy 1~5836.0kWh~-30~delete~~~~~~0~text~sensor.today_energy~F~65504~Total energy 1~5836.0kWh~90~text~sensor.today_energy~G~17299~Total energy 1~5836.0kWh~10``` - @@ -2287,7 +2286,6 @@ Example: `entityUpd~Guest Wifi~button~navigate.prev~<~65535~~~button~navigate.ne - @@ -2298,12 +2296,10 @@ Example: `entityUpd~Guest Wifi~button~navigate.prev~<~65535~~~button~navigate.ne - - @@ -2368,181 +2364,300 @@ Example: `entityUpd~Guest Wifi~button~navigate.prev~<~65535~~~button~navigate.ne - - - - - + + + + + + + + + - - - - - - + - - - - + + - - + + - + - - + + + + - - - - + + - + - - + + - - + + - - - + - - + + - - + + + + - - + + - - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + - - + + - - + + - - - - + + + + + + + + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parameter NumberCategory Location Type Field
0instruction instruction entityUpdtitle title titleintNameEntity
2Navigation Upper Left Icon Entity Definition type
14cardPower specificHome Icon / Value below Home IconPower Entity DefinitioniconColorHome Icon / Value below Home IconEntity Definitiontypeignored
15intNameEntityignored
16 icon
16speedignored
17texticonColor
18Value above Home IconPower Entity DefinitioniconColorignoreddisplayName
19iconignoredoptionalValue
20speedspeed ignored
21textValue above Home IconEntity Definitiontypeignored
221st Item Upper LeftPower Entity DefinitioniconColorintNameEntityignored
23 iconignored
24speednumbers (-2,-1,0,1,2)iconColorignored
25textdisplayNameignored
262nd Item Middle LeftPower Entity DefinitioniconColoroptionalValue
27iconspeedignored
28speednumbers (-2,-1,0,1,2)1st Item Upper LeftEntity Definitiontypeignored
29textintNameEntityignored
303rd Item Bottom LeftPower Entity DefinitioniconColoricon
31icon
32speednumbers (-2,-1,0,1,2)
33text
344th Item Upper RightPower Entity Definition iconColor
32displayName
33optionalValue
34speednumbers (between -120 and 120)
352nd Item Middle LeftEntity Definitiontypeignored
36intNameEntityignored
37 icon
36speednumbers (-2,-1,0,1,2)
37text
385thItem Middle RightPower Entity Definition iconColor
39icondisplayName
40speednumbers (-2,-1,0,1,2)optionalValue
41textspeednumbers (between -120 and 120)
426th Item Bottom RightPower Entity DefinitioniconColor3rd Item Bottom LeftEntity Definitiontypeignored
43intNameEntityignored
44 icon
44speednumbers (-2,-1,0,1,2)45iconColor
45text46displayName
47optionalValue
48speednumbers (between -120 and 120)
494th Item Upper RightEntity Definitiontypeignored
50intNameEntityignored
51icon
52iconColor
53displayName
54optionalValue
55speednumbers (between -120 and 120)
565th Item Middle RightEntity Definitiontypeignored
57intNameEntityignored
58icon
59iconColor
60displayName
61optionalValue
62speednumbers (between -120 and 120)
636th Item Bottom RightEntity Definitiontypeignored
64intNameEntityignored
65icon
66iconColor
67displayName
68optionalValue
69speednumbers (between -120 and 120)
diff --git a/HMI/code_gen/pages/cardPower.py b/HMI/code_gen/pages/cardPower.py index 2f54be60..63542414 100644 --- a/HMI/code_gen/pages/cardPower.py +++ b/HMI/code_gen/pages/cardPower.py @@ -2,39 +2,36 @@ from shared import * head = sharedhead + """ if(tInstruction.txt=="entityUpd") { - // command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6 spstr strCommand.txt,tHeading.txt,"~",1 """ + navigation + """ // icon color home - spstr strCommand.txt,tTmp.txt,"~",14 + spstr strCommand.txt,tTmp.txt,"~",17 covx tTmp.txt,t1.pco,0,0 // icon home - spstr strCommand.txt,t1.txt,"~",15 + spstr strCommand.txt,t1.txt,"~",16 // speed 16 ignored // text home - spstr strCommand.txt,tHome.txt,"~",17 + spstr strCommand.txt,tHome.txt,"~",19 spstr tHome.txt,tHome2.txt," ",1 spstr tHome.txt,tHome.txt," ",0 - // icon color 18 ignored - // icon 19 ignored - // speed 20 ignored // text home - spstr strCommand.txt,tHomeO.txt,"~",21 + spstr strCommand.txt,tHomeO.txt,"~",26 spstr tHomeO.txt,tHomeO2.txt," ",1 spstr tHomeO.txt,tHomeO.txt," ",0 """ + print(head) -start = 22 +start = 27 for i in range(0,6): - idxstart = start + (i)*4 + idxstart = start + (i)*7 item = f""" // iconColor - spstr strCommand.txt,tTmp.txt,"~",{idxstart} + spstr strCommand.txt,tTmp.txt,"~",{idxstart+4} covx tTmp.txt,t{i}Icon.pco,0,0 // icon - spstr strCommand.txt,t{i}Icon.txt,"~",{idxstart+1} + spstr strCommand.txt,t{i}Icon.txt,"~",{idxstart+3} // speed - spstr strCommand.txt,tTmp.txt,"~",{idxstart+2} + spstr strCommand.txt,tTmp.txt,"~",{idxstart+7} covx tTmp.txt,t{i}Speed.val,0,0 if(t{i}Speed.val>120) {{ @@ -45,8 +42,9 @@ for i in range(0,6): t{i}Speed.val=-120 }} // lower text - spstr strCommand.txt,t{i}u.txt,"~",{idxstart+3} - + spstr strCommand.txt,t{i}u.txt,"~",{idxstart+6} + // upper text + spstr strCommand.txt,t{i}o.txt,"~",{idxstart+5} if(t{i}Icon.txt!="") {{ vis t{i}Icon,1 diff --git a/HMI/code_gen/pages/out.txt b/HMI/code_gen/pages/out.txt deleted file mode 100644 index 307a2fe3..00000000 --- a/HMI/code_gen/pages/out.txt +++ /dev/null @@ -1,402 +0,0 @@ - -// data available -if(usize>1) -{ - bufferPos=0 - while(bufferPos