diff --git a/HMI/README.md b/HMI/README.md index 6a353091..e66a6064 100644 --- a/HMI/README.md +++ b/HMI/README.md @@ -223,9 +223,12 @@ tIconBtnEntityName is the entiy name used in the button event for pressing the u `event,buttonPress2,internalNameEntity,actionName,code` -# Icons IDs +### cardPower Page + +`entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6 + +`"entityUpd~test~1|1~6666~A~8888~B~1~t0o~t0u~9999~C~2~t1o~t1u~1111~D~3~t2o~t2u~33333~E~-1~t3o~t3u~3333~F~-2~t4o~t4u~4444~G~-3~t5o~t5u` -Please see Icon's int the [icons.md file](icons.md) # Design Guidelines for Nextion HMI Project diff --git a/HMI/code_gen/pages/cardPower.py b/HMI/code_gen/pages/cardPower.py new file mode 100644 index 00000000..14f98de1 --- /dev/null +++ b/HMI/code_gen/pages/cardPower.py @@ -0,0 +1,51 @@ +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,"~",3 + covx tTmp.txt,t1.pco,0,0 + // icon home + spstr strCommand.txt,t1.txt,"~",4 +""" +print(head) +start = 5 +for i in range(0,6): + idxstart = start + (i)*5 + item = f""" + // iconColor + spstr strCommand.txt,tTmp.txt,"~",{idxstart} + covx tTmp.txt,t{i}Icon.pco,0,0 + // icon + spstr strCommand.txt,t{i}Icon.txt,"~",{idxstart+1} + // speed + spstr strCommand.txt,tTmp.txt,"~",{idxstart+2} + covx tTmp.txt,t{i}Speed.val,0,0 + // upper text + spstr strCommand.txt,t{i}o.txt,"~",{idxstart+3} + // lower text + spstr strCommand.txt,t{i}u.txt,"~",{idxstart+4} + + if(t{i}Icon.txt!="") + {{ + vis t{i}Icon,1 + vis t{i}o,1 + vis t{i}u,1 + vis h{i},1 + }}else + {{ + vis t{i}Icon,0 + vis t{i}o,0 + vis t{i}u,0 + vis h{i},0 + }} +""" + print(item) +foot = """ + } +""" + sharedfoot +print(foot) + diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index 93d91de3..689d5000 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/HMI/nspanel.tft b/HMI/nspanel.tft index ff56d80e..07930b0f 100644 Binary files a/HMI/nspanel.tft and b/HMI/nspanel.tft differ