@@ -30,25 +30,35 @@ var (
30
30
31
31
func updateDisplay () {
32
32
nativeInstance .UpdateLabelIfChanged ("home_info_ipv4_addr" , networkState .IPv4String ())
33
- nativeInstance .UpdateLabelIfChanged ("home_info_ipv6_addr" , networkState .IPv6String ())
33
+ ipv6 := networkState .IPv6String ()
34
+ if ipv6 != "" {
35
+ nativeInstance .UpdateLabelIfChanged ("home_info_ipv6_addr" , ipv6 )
36
+ nativeInstance .ObjShow ("home_info_ipv6_addr" )
37
+ } else {
38
+ nativeInstance .UpdateLabelIfChanged ("home_info_ipv6_addr" , "" )
39
+ nativeInstance .ObjHide ("home_info_ipv6_addr" )
40
+ }
41
+
42
+ nativeInstance .ObjHide ("menu_btn_network" )
43
+ nativeInstance .ObjHide ("menu_btn_access" )
34
44
35
45
nativeInstance .UpdateLabelIfChanged ("home_info_mac_addr" , networkState .MACString ())
36
46
37
47
if usbState == "configured" {
38
- nativeInstance .UpdateLabelIfChanged ("ui_Home_Footer_Usb_Status_Label " , "Connected" )
39
- _ , _ = nativeInstance .ObjSetState ("ui_Home_Footer_Usb_Status_Label " , "LV_STATE_DEFAULT" )
48
+ nativeInstance .UpdateLabelIfChanged ("usb_status_label " , "Connected" )
49
+ _ , _ = nativeInstance .ObjSetState ("usb_status " , "LV_STATE_DEFAULT" )
40
50
} else {
41
- nativeInstance .UpdateLabelIfChanged ("ui_Home_Footer_Usb_Status_Label " , "Disconnected" )
42
- _ , _ = nativeInstance .ObjSetState ("ui_Home_Footer_Usb_Status_Label " , "LV_STATE_USER_2" )
51
+ nativeInstance .UpdateLabelIfChanged ("usb_status_label " , "Disconnected" )
52
+ _ , _ = nativeInstance .ObjSetState ("usb_status " , "LV_STATE_USER_2" )
43
53
}
44
54
if lastVideoState .Ready {
45
- nativeInstance .UpdateLabelIfChanged ("ui_Home_Footer_Hdmi_Status_Label " , "Connected" )
46
- _ , _ = nativeInstance .ObjSetState ("ui_Home_Footer_Hdmi_Status_Label " , "LV_STATE_DEFAULT" )
55
+ nativeInstance .UpdateLabelIfChanged ("hdmi_status_label " , "Connected" )
56
+ _ , _ = nativeInstance .ObjSetState ("hdmi_status " , "LV_STATE_DEFAULT" )
47
57
} else {
48
- nativeInstance .UpdateLabelIfChanged ("ui_Home_Footer_Hdmi_Status_Label " , "Disconnected" )
49
- _ , _ = nativeInstance .ObjSetState ("ui_Home_Footer_Hdmi_Status_Label " , "LV_STATE_USER_2" )
58
+ nativeInstance .UpdateLabelIfChanged ("hdmi_status_label " , "Disconnected" )
59
+ _ , _ = nativeInstance .ObjSetState ("hdmi_status " , "LV_STATE_USER_2" )
50
60
}
51
- nativeInstance .UpdateLabelIfChanged ("ui_Home_Header_Cloud_Status_Label " , fmt .Sprintf ("%d active" , actionSessions ))
61
+ nativeInstance .UpdateLabelIfChanged ("cloud_status_label " , fmt .Sprintf ("%d active" , actionSessions ))
52
62
53
63
if networkState .IsUp () {
54
64
nativeInstance .SwitchToScreenIf ("home_screen" , []string {"no_network_screen" , "boot_screen" })
@@ -57,20 +67,20 @@ func updateDisplay() {
57
67
}
58
68
59
69
if cloudConnectionState == CloudConnectionStateNotConfigured {
60
- _ , _ = nativeInstance .ObjHide ("ui_Home_Header_Cloud_Status_Icon " )
70
+ _ , _ = nativeInstance .ObjHide ("cloud_status_icon " )
61
71
} else {
62
- _ , _ = nativeInstance .ObjShow ("ui_Home_Header_Cloud_Status_Icon " )
72
+ _ , _ = nativeInstance .ObjShow ("cloud_status_icon " )
63
73
}
64
74
65
75
switch cloudConnectionState {
66
76
case CloudConnectionStateDisconnected :
67
- _ , _ = nativeInstance .ImgSetSrc ("ui_Home_Header_Cloud_Status_Icon " , "cloud_disconnected.png " )
77
+ _ , _ = nativeInstance .ImgSetSrc ("cloud_status_icon " , "cloud_disconnected" )
68
78
stopCloudBlink ()
69
79
case CloudConnectionStateConnecting :
70
- _ , _ = nativeInstance .ImgSetSrc ("ui_Home_Header_Cloud_Status_Icon " , "cloud.png " )
80
+ _ , _ = nativeInstance .ImgSetSrc ("cloud_status_icon " , "cloud" )
71
81
startCloudBlink ()
72
82
case CloudConnectionStateConnected :
73
- _ , _ = nativeInstance .ImgSetSrc ("ui_Home_Header_Cloud_Status_Icon " , "cloud.png " )
83
+ _ , _ = nativeInstance .ImgSetSrc ("cloud_status_icon " , "cloud" )
74
84
stopCloudBlink ()
75
85
}
76
86
}
@@ -94,9 +104,9 @@ func startCloudBlink() {
94
104
if cloudConnectionState != CloudConnectionStateConnecting {
95
105
continue
96
106
}
97
- _ , _ = nativeInstance .ObjFadeOut ("ui_Home_Header_Cloud_Status_Icon " , 1000 )
107
+ _ , _ = nativeInstance .ObjFadeOut ("cloud_status_icon " , 1000 )
98
108
time .Sleep (1000 * time .Millisecond )
99
- _ , _ = nativeInstance .ObjFadeIn ("ui_Home_Header_Cloud_Status_Icon " , 1000 )
109
+ _ , _ = nativeInstance .ObjFadeIn ("cloud_status_icon " , 1000 )
100
110
time .Sleep (1000 * time .Millisecond )
101
111
}
102
112
}()
@@ -146,14 +156,14 @@ func waitCtrlAndRequestDisplayUpdate(shouldWakeDisplay bool) {
146
156
147
157
func updateStaticContents () {
148
158
//contents that never change
149
- nativeInstance .UpdateLabelIfChanged ("ui_Home_Content_Mac " , networkState .MACString ())
159
+ nativeInstance .UpdateLabelIfChanged ("home_info_mac_addr " , networkState .MACString ())
150
160
systemVersion , appVersion , err := GetLocalVersion ()
151
161
if err == nil {
152
- nativeInstance .UpdateLabelIfChanged ("ui_About_Content_Operating_System_Version_ContentLabel " , systemVersion .String ())
153
- nativeInstance .UpdateLabelIfChanged ("ui_About_Content_App_Version_Content_Label " , appVersion .String ())
162
+ nativeInstance .UpdateLabelIfChanged ("boot_screen_version " , systemVersion .String ())
163
+ nativeInstance .UpdateLabelIfChanged ("boot_screen_app_version " , appVersion .String ())
154
164
}
155
165
156
- nativeInstance .UpdateLabelIfChanged ("ui_Status_Content_Device_Id_Content_Label " , GetDeviceID ())
166
+ nativeInstance .UpdateLabelIfChanged ("boot_screen_device_id " , GetDeviceID ())
157
167
}
158
168
159
169
// setDisplayBrightness sets /sys/class/backlight/backlight/brightness to alter
0 commit comments