dblume commited on 2024-04-10 00:00:43
Showing 3 changed files, with 27 additions and 21 deletions.
... | ... |
@@ -193,8 +193,11 @@ function onKeyEvent(key as String, press as Boolean) as Boolean |
193 | 193 |
if update_ui |
194 | 194 |
doUpdateFocus() |
195 | 195 |
endif |
196 |
- dt = Mid(CreateObject("roDateTime").ToISOString(), 12, 8) |
|
197 |
- updateTextLower(dt + " " + key) |
|
196 |
+ |
|
197 |
+ dt = CreateObject("roDateTime") |
|
198 |
+ dt.ToLocalTime() |
|
199 |
+ hms = Mid(dt.ToISOString(), 12, 8) |
|
200 |
+ updateTextLower(hms + " " + key) |
|
198 | 201 |
handled = true |
199 | 202 |
end if |
200 | 203 |
end if |
... | ... |
@@ -112,18 +112,21 @@ function executeTask() as void |
112 | 112 |
if not success then m.top.updateTextLower = "EnableAudioOutputEvent failure" |
113 | 113 |
endif |
114 | 114 |
|
115 |
+ dt = CreateObject("roDateTime") |
|
115 | 116 |
while(true) |
116 | 117 |
msg = wait(0, port) |
117 | 118 |
msgType = type(msg) |
118 | 119 |
|
119 |
- dt = Mid(CreateObject("roDateTime").ToISOString(), 12, 8) |
|
120 |
+ dt.Mark() |
|
121 |
+ dt.ToLocalTime() |
|
122 |
+ hms = Mid(dt.ToISOString(), 12, 8) |
|
120 | 123 |
|
121 | 124 |
if msgType = "roHdmiStatusEvent" |
122 | 125 |
aa = msg.GetInfo() |
123 | 126 |
plugged = aa.LookupCI("Plugged") |
124 | 127 |
portnum = aa.LookupCI("PortNumber") |
125 | 128 |
porttype = aa.LookupCI("PortType") |
126 |
- s = dt + " HDMI " |
|
129 |
+ s = hms + " HDMI " |
|
127 | 130 |
if porttype <> invalid then s = s + porttype + " " |
128 | 131 |
if portnum <> invalid then s = s + portnum.ToStr() + " " |
129 | 132 |
if plugged <> invalid then |
... | ... |
@@ -133,42 +136,42 @@ function executeTask() as void |
133 | 136 |
elseif msgType = "roCECStatusEvent" |
134 | 137 |
aa = msg.GetInfo() |
135 | 138 |
v = aa.LookupCI("Active") |
136 |
- if v <> invalid then m.top.updateTextLower = dt + " CEC Active " + v.toStr() |
|
139 |
+ if v <> invalid then m.top.updateTextLower = hms + " CEC Active " + v.toStr() |
|
137 | 140 |
elseif msgType = "roDeviceInfoEvent" |
138 | 141 |
aa = msg.GetInfo() |
139 | 142 |
v = aa.LookupCI("Mute") |
140 |
- if v <> invalid then m.top.updateTextLower = dt + " Mute " + v.toStr() |
|
143 |
+ if v <> invalid then m.top.updateTextLower = hms + " Mute " + v.toStr() |
|
141 | 144 |
v = aa.LookupCI("Mode") |
142 |
- if v <> invalid then m.top.updateTextLower = dt + " Caption Mode " + v.toStr() |
|
145 |
+ if v <> invalid then m.top.updateTextLower = hms + " Caption Mode " + v.toStr() |
|
143 | 146 |
v = aa.LookupCI("linkStatus") |
144 |
- if v <> invalid then m.top.updateTextLower = dt + " LinkStatus " + v.toStr() |
|
147 |
+ if v <> invalid then m.top.updateTextLower = hms + " LinkStatus " + v.toStr() |
|
145 | 148 |
v = aa.LookupCI("audioGuideEnabled") |
146 |
- if v <> invalid then m.top.updateTextLower = dt + " AudioGuide " + v.toStr() |
|
149 |
+ if v <> invalid then m.top.updateTextLower = hms + " AudioGuide " + v.toStr() |
|
147 | 150 |
v = aa.LookupCI("appFocused") |
148 |
- if v <> invalid then m.top.updateTextLower = dt + " AppFocused " + v.toStr() |
|
151 |
+ if v <> invalid then m.top.updateTextLower = hms + " AppFocused " + v.toStr() |
|
149 | 152 |
v = aa.LookupCI("audioCodecCapabilityChanged") |
150 |
- if v <> invalid then m.top.updateTextLower = dt + " AudioCodecCapabilityChanged " + v.toStr() |
|
153 |
+ if v <> invalid then m.top.updateTextLower = hms + " AudioCodecCapabilityChanged " + v.toStr() |
|
151 | 154 |
v = aa.LookupCI("videoCodecCapabilityChanged") |
152 |
- if v <> invalid then m.top.updateTextLower = dt + " VideoCodecCapabilityChanged " + v.toStr() |
|
155 |
+ if v <> invalid then m.top.updateTextLower = hms + " VideoCodecCapabilityChanged " + v.toStr() |
|
153 | 156 |
v = aa.LookupCI("exitedScreensaver") |
154 |
- if v <> invalid then m.top.updateTextLower = dt + " ExitedScreensaver " + v.toStr() |
|
157 |
+ if v <> invalid then m.top.updateTextLower = hms + " ExitedScreensaver " + v.toStr() |
|
155 | 158 |
v = aa.LookupCI("appFocus") ' Need to verify it's actually appFocused above |
156 |
- if v <> invalid then m.top.updateTextLower = dt + " AppFocus " + v.toStr() |
|
159 |
+ if v <> invalid then m.top.updateTextLower = hms + " AppFocus " + v.toStr() |
|
157 | 160 |
v = aa.LookupCI("generalMemoryLevel") |
158 |
- if v <> invalid then m.top.updateTextLower = dt + " GeneralMemoryLevel " + v.toStr() |
|
161 |
+ if v <> invalid then m.top.updateTextLower = hms + " GeneralMemoryLevel " + v.toStr() |
|
159 | 162 |
v = aa.LookupCI("internetStatus") |
160 |
- if v <> invalid then m.top.updateTextLower = dt + " InternetStatus " + v.toStr() |
|
163 |
+ if v <> invalid then m.top.updateTextLower = hms + " InternetStatus " + v.toStr() |
|
161 | 164 |
v = aa.LookupCI("audioOutputEvent") |
162 | 165 |
if v <> invalid then |
163 |
- m.top.updateTextLower = dt + " audioOutput " + v.toStr() |
|
166 |
+ m.top.updateTextLower = hms + " audioOutput " + v.toStr() |
|
164 | 167 |
vol = aa.LookupCI("volume") |
165 |
- if vol <> invalid then m.top.updateTextLower = dt + " volume = " + vol.toStr() |
|
168 |
+ if vol <> invalid then m.top.updateTextLower = hms + " volume = " + vol.toStr() |
|
166 | 169 |
end if |
167 | 170 |
elseif msgType = "roInputEvent" |
168 | 171 |
info = msg.GetInfo() |
169 |
- m.top.updateTextLower = dt + " Input " + FormatJSON(info) |
|
172 |
+ m.top.updateTextLower = hms + " Input " + FormatJSON(info) |
|
170 | 173 |
else |
171 |
- m.top.updateTextLower = dt + " msgType " + msgType |
|
174 |
+ m.top.updateTextLower = hms + " msgType " + msgType |
|
172 | 175 |
end if |
173 | 176 |
end while |
174 | 177 |
|