diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index ebe44a6c..01e538b7 100644 --- a/HMI/US/landscape/diff-eu-version.txt +++ b/HMI/US/landscape/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-08-17 14:53:10.719943618 +0000 -+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-08-17 14:53:11.691958420 +0000 +--- HMI/n2t-out/Program.s.txt 2022-08-17 15:05:03.933958595 +0000 ++++ HMI/US/landscape/n2t-out/Program.s.txt 2022-08-17 15:05:05.245664384 +0000 @@ -14,6 +14,3 @@ //color vars int defaultFontColor=65535 @@ -9,8 +9,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt - lcd_dev fffb 0002 0000 0020 - page pageStartup diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-08-17 14:53:10.719943618 +0000 -+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-08-17 14:53:11.691958420 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-08-17 15:05:03.933958595 +0000 ++++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-08-17 15:05:05.249664584 +0000 @@ -177,7 +177,7 @@ recmod=1 bauds=115200 @@ -21,8 +21,8 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff -bur HMI/n2t-out/pageTest.txt HMI/US/landscape/n2t-out/pageTest.txt ---- HMI/n2t-out/pageTest.txt 2022-08-17 14:53:10.719943618 +0000 -+++ HMI/US/landscape/n2t-out/pageTest.txt 2022-08-17 14:53:11.691958420 +0000 +--- HMI/n2t-out/pageTest.txt 2022-08-17 15:05:03.933958595 +0000 ++++ HMI/US/landscape/n2t-out/pageTest.txt 2022-08-17 15:05:05.249664584 +0000 @@ -13,36 +13,6 @@ Events Preinitialize Event @@ -117,7 +117,7 @@ diff -bur HMI/n2t-out/pageTest.txt HMI/US/landscape/n2t-out/pageTest.txt - spstr strCommand.txt,tInstruction.txt,"~",0 - if(tInstruction.txt=="ping") - { -- spstr strCommand.txt,tBench.txt,"~",0 +- spstr strCommand.txt,tBench.txt,"~",1 - tSend.txt="pong,"+tBench.txt - //send calc crc - btlen tSend.txt,sys0 diff --git a/HMI/US/portrait/diff-eu-version.txt b/HMI/US/portrait/diff-eu-version.txt index 3973d76a..1fee3bb3 100644 --- a/HMI/US/portrait/diff-eu-version.txt +++ b/HMI/US/portrait/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-08-17 14:53:10.719943618 +0000 -+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-08-17 14:53:11.195950867 +0000 +--- HMI/n2t-out/Program.s.txt 2022-08-17 15:05:03.933958595 +0000 ++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-08-17 15:05:04.569667901 +0000 @@ -14,6 +14,6 @@ //color vars int defaultFontColor=65535 @@ -11,8 +11,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt + //lcd_dev fffb 0002 0000 0020 page pageStartup diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt ---- HMI/n2t-out/cardEntities.txt 2022-08-17 14:53:10.723943679 +0000 -+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-08-17 14:53:11.195950867 +0000 +--- HMI/n2t-out/cardEntities.txt 2022-08-17 15:05:03.937956767 +0000 ++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-08-17 15:05:04.573666073 +0000 @@ -65,6 +65,16 @@ vis nNum4,0 vis bPrev,0 @@ -458,8 +458,8 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt if(tInstruction.txt=="pageType") { diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-08-17 14:53:10.719943618 +0000 -+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-08-17 14:53:11.195950867 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-08-17 15:05:03.933958595 +0000 ++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-08-17 15:05:04.573666073 +0000 @@ -142,7 +142,7 @@ Disable release event after dragging: 0 Send Component ID : disabled @@ -479,8 +479,8 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff -bur HMI/n2t-out/pageTest.txt HMI/US/portrait/n2t-out/pageTest.txt ---- HMI/n2t-out/pageTest.txt 2022-08-17 14:53:10.719943618 +0000 -+++ HMI/US/portrait/n2t-out/pageTest.txt 2022-08-17 14:53:11.195950867 +0000 +--- HMI/n2t-out/pageTest.txt 2022-08-17 15:05:03.933958595 +0000 ++++ HMI/US/portrait/n2t-out/pageTest.txt 2022-08-17 15:05:04.569667901 +0000 @@ -13,36 +13,6 @@ Events Preinitialize Event @@ -575,7 +575,7 @@ diff -bur HMI/n2t-out/pageTest.txt HMI/US/portrait/n2t-out/pageTest.txt - spstr strCommand.txt,tInstruction.txt,"~",0 - if(tInstruction.txt=="ping") - { -- spstr strCommand.txt,tBench.txt,"~",0 +- spstr strCommand.txt,tBench.txt,"~",1 - tSend.txt="pong,"+tBench.txt - //send calc crc - btlen tSend.txt,sys0 diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index d934aaae..2b071bcb 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,12 +1,12 @@ -+++ HMI/US/portrait/diff-eu-version.txt 2022-08-17 14:53:11.211951111 +0000 -+--- HMI/n2t-out/Program.s.txt 2022-08-17 14:53:10.719943618 +0000 -++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-08-17 14:53:11.195950867 +0000 ++++ HMI/US/portrait/diff-eu-version.txt 2022-08-17 15:05:04.589658760 +0000 ++--- HMI/n2t-out/Program.s.txt 2022-08-17 15:05:03.933958595 +0000 +++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-08-17 15:05:04.569667901 +0000 +@@ -14,6 +14,6 @@ + //color vars + int defaultFontColor=65535 + int defaultBcoColor=6371 -+--- HMI/n2t-out/cardEntities.txt 2022-08-17 14:53:10.723943679 +0000 -++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-08-17 14:53:11.195950867 +0000 ++--- HMI/n2t-out/cardEntities.txt 2022-08-17 15:05:03.937956767 +0000 +++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-08-17 15:05:04.573666073 +0000 +@@ -65,6 +65,16 @@ + vis bPrev,0 + vis bNext,0 @@ -33,11 +33,11 @@ ++ spstr strCommand.txt,tTmp.txt,"~",32 ++ covx tTmp.txt,sys0,0,0 ++ btOnOff5.val=sys0 -+--- HMI/n2t-out/pageStartup.txt 2022-08-17 14:53:10.719943618 +0000 -++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-08-17 14:53:11.195950867 +0000 ++--- HMI/n2t-out/pageStartup.txt 2022-08-17 15:05:03.933958595 +0000 +++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-08-17 15:05:04.573666073 +0000 +diff -bur HMI/n2t-out/pageTest.txt HMI/US/portrait/n2t-out/pageTest.txt -+--- HMI/n2t-out/pageTest.txt 2022-08-17 14:53:10.719943618 +0000 -++++ HMI/US/portrait/n2t-out/pageTest.txt 2022-08-17 14:53:11.195950867 +0000 ++--- HMI/n2t-out/pageTest.txt 2022-08-17 15:05:03.933958595 +0000 +++++ HMI/US/portrait/n2t-out/pageTest.txt 2022-08-17 15:05:04.569667901 +0000 +@@ -13,36 +13,6 @@ + Events + Preinitialize Event @@ -132,7 +132,7 @@ +- spstr strCommand.txt,tInstruction.txt,"~",0 +- if(tInstruction.txt=="ping") +- { -+- spstr strCommand.txt,tBench.txt,"~",0 ++- spstr strCommand.txt,tBench.txt,"~",1 +- tSend.txt="pong,"+tBench.txt +- //send calc crc +- btlen tSend.txt,sys0 diff --git a/HMI/code_gen/pages/font-char.py b/HMI/code_gen/pages/font-char.py index c1bd936a..58578443 100644 --- a/HMI/code_gen/pages/font-char.py +++ b/HMI/code_gen/pages/font-char.py @@ -173,8 +173,6 @@ char_res_string += "鎖離狀出目外斷態輔用運判閉碼助啟執轉閒" print("Out: ") #print(char_res_string) -import json - # check if translations.py is covered with open("test", 'r') as f: # open in readonly mode unique_chars = set(f.read()) @@ -187,4 +185,4 @@ with open("test", 'r') as f: # open in readonly mode print(f"char {char} missing") with open("charout.txt", "wb") as text_file: - text_file.write(char_res_string.encode('utf8')) \ No newline at end of file + text_file.write(char_res_string.encode('utf8')) diff --git a/HMI/n2t-out-visual/pageTest.txt b/HMI/n2t-out-visual/pageTest.txt index 92cc9d5e..fdf0241b 100644 --- a/HMI/n2t-out-visual/pageTest.txt +++ b/HMI/n2t-out-visual/pageTest.txt @@ -579,7 +579,7 @@ Timer tmSerial spstr strCommand.txt,tInstruction.txt,"~",0 if(tInstruction.txt=="ping") { - spstr strCommand.txt,tBench.txt,"~",0 + spstr strCommand.txt,tBench.txt,"~",1 tSend.txt="pong,"+tBench.txt //send calc crc btlen tSend.txt,sys0 diff --git a/HMI/n2t-out/pageTest.txt b/HMI/n2t-out/pageTest.txt index ccf77ea9..a2a10692 100644 --- a/HMI/n2t-out/pageTest.txt +++ b/HMI/n2t-out/pageTest.txt @@ -273,7 +273,7 @@ Timer tmSerial spstr strCommand.txt,tInstruction.txt,"~",0 if(tInstruction.txt=="ping") { - spstr strCommand.txt,tBench.txt,"~",0 + spstr strCommand.txt,tBench.txt,"~",1 tSend.txt="pong,"+tBench.txt //send calc crc btlen tSend.txt,sys0 diff --git a/apps/nspanel-lovelace-ui/luibackend/icons.py b/apps/nspanel-lovelace-ui/luibackend/icons.py index 81d5df4b..9b5fbccd 100644 --- a/apps/nspanel-lovelace-ui/luibackend/icons.py +++ b/apps/nspanel-lovelace-ui/luibackend/icons.py @@ -115,6 +115,22 @@ def map_to_mdi_name(ha_type, state=None, device_class="_", cardType=None): return sensor_mapping[device_class] if device_class in sensor_mapping else "alert-circle-outline" elif ha_type == "alarm-arm-fail": return "progress-alert" + elif ha_type == "alarm_control_panel": + if state == "disarmed": + return "shield-off" + if state == "armed_home": + return "shield-home" + if state == "armed_away": + return "shield-lock" + if state == "armed_night": + return "weather-night" + if state == "armed_vacation": + return "shield-airplane" + elif ha_type == "sun": + if state == "above_horizon": + return "weather-sunset-up" + if state == "below_horizon": + return "weather-sunset-down" else: return "alert-circle-outline"