@@ -35,24 +35,24 @@ func updateDisplay() {
35
35
nativeInstance .UpdateLabelIfChanged ("home_info_ipv4_addr" , networkState .IPv4String ())
36
36
nativeInstance .UpdateLabelAndChangeVisibility ("home_info_ipv6_addr" , networkState .IPv6String ())
37
37
38
- nativeInstance .ObjHide ("menu_btn_network" )
39
- nativeInstance .ObjHide ("menu_btn_access" )
38
+ nativeInstance .UIObjHide ("menu_btn_network" )
39
+ nativeInstance .UIObjHide ("menu_btn_access" )
40
40
41
41
nativeInstance .UpdateLabelIfChanged ("home_info_mac_addr" , networkState .MACString ())
42
42
43
43
if usbState == "configured" {
44
44
nativeInstance .UpdateLabelIfChanged ("usb_status_label" , "Connected" )
45
- _ , _ = nativeInstance .ObjSetState ("usb_status" , "LV_STATE_DEFAULT" )
45
+ _ , _ = nativeInstance .UIObjSetState ("usb_status" , "LV_STATE_DEFAULT" )
46
46
} else {
47
47
nativeInstance .UpdateLabelIfChanged ("usb_status_label" , "Disconnected" )
48
- _ , _ = nativeInstance .ObjSetState ("usb_status" , "LV_STATE_DISABLED" )
48
+ _ , _ = nativeInstance .UIObjSetState ("usb_status" , "LV_STATE_DISABLED" )
49
49
}
50
50
if lastVideoState .Ready {
51
51
nativeInstance .UpdateLabelIfChanged ("hdmi_status_label" , "Connected" )
52
- _ , _ = nativeInstance .ObjSetState ("hdmi_status" , "LV_STATE_DEFAULT" )
52
+ _ , _ = nativeInstance .UIObjSetState ("hdmi_status" , "LV_STATE_DEFAULT" )
53
53
} else {
54
54
nativeInstance .UpdateLabelIfChanged ("hdmi_status_label" , "Disconnected" )
55
- _ , _ = nativeInstance .ObjSetState ("hdmi_status" , "LV_STATE_DISABLED" )
55
+ _ , _ = nativeInstance .UIObjSetState ("hdmi_status" , "LV_STATE_DISABLED" )
56
56
}
57
57
nativeInstance .UpdateLabelIfChanged ("cloud_status_label" , fmt .Sprintf ("%d active" , actionSessions ))
58
58
@@ -63,20 +63,20 @@ func updateDisplay() {
63
63
}
64
64
65
65
if cloudConnectionState == CloudConnectionStateNotConfigured {
66
- _ , _ = nativeInstance .ObjHide ("cloud_status_icon" )
66
+ _ , _ = nativeInstance .UIObjHide ("cloud_status_icon" )
67
67
} else {
68
- _ , _ = nativeInstance .ObjShow ("cloud_status_icon" )
68
+ _ , _ = nativeInstance .UIObjShow ("cloud_status_icon" )
69
69
}
70
70
71
71
switch cloudConnectionState {
72
72
case CloudConnectionStateDisconnected :
73
- _ , _ = nativeInstance .ImgSetSrc ("cloud_status_icon" , "cloud_disconnected" )
73
+ _ , _ = nativeInstance .UIObjSetImageSrc ("cloud_status_icon" , "cloud_disconnected" )
74
74
stopCloudBlink ()
75
75
case CloudConnectionStateConnecting :
76
- _ , _ = nativeInstance .ImgSetSrc ("cloud_status_icon" , "cloud" )
76
+ _ , _ = nativeInstance .UIObjSetImageSrc ("cloud_status_icon" , "cloud" )
77
77
startCloudBlink ()
78
78
case CloudConnectionStateConnected :
79
- _ , _ = nativeInstance .ImgSetSrc ("cloud_status_icon" , "cloud" )
79
+ _ , _ = nativeInstance .UIObjSetImageSrc ("cloud_status_icon" , "cloud" )
80
80
stopCloudBlink ()
81
81
}
82
82
}
@@ -100,9 +100,9 @@ func startCloudBlink() {
100
100
if cloudConnectionState != CloudConnectionStateConnecting {
101
101
continue
102
102
}
103
- _ , _ = nativeInstance .ObjFadeOut ("cloud_status_icon" , 1000 )
103
+ _ , _ = nativeInstance .UIObjFadeOut ("cloud_status_icon" , 1000 )
104
104
time .Sleep (1000 * time .Millisecond )
105
- _ , _ = nativeInstance .ObjFadeIn ("cloud_status_icon" , 1000 )
105
+ _ , _ = nativeInstance .UIObjFadeIn ("cloud_status_icon" , 1000 )
106
106
time .Sleep (1000 * time .Millisecond )
107
107
}
108
108
}()
@@ -347,7 +347,7 @@ func initDisplay() {
347
347
go func () {
348
348
displayLogger .Info ().Msg ("setting initial display contents" )
349
349
time .Sleep (500 * time .Millisecond )
350
- _ , _ = nativeInstance .DispSetRotation (config .DisplayRotation )
350
+ _ , _ = nativeInstance .DisplaySetRotation (config .DisplayRotation )
351
351
updateStaticContents ()
352
352
displayInited = true
353
353
displayLogger .Info ().Msg ("display inited" )
0 commit comments