@@ -153,13 +153,6 @@ func waitCtrlAndRequestDisplayUpdate(shouldWakeDisplay bool) {
153
153
func updateStaticContents () {
154
154
//contents that never change
155
155
nativeInstance .UpdateLabelIfChanged ("home_info_mac_addr" , networkState .MACString ())
156
- systemVersion , appVersion , err := GetLocalVersion ()
157
- if err == nil {
158
- nativeInstance .UpdateLabelIfChanged ("boot_screen_version" , systemVersion .String ())
159
- nativeInstance .UpdateLabelIfChanged ("boot_screen_app_version" , appVersion .String ())
160
- nativeInstance .UpdateLabelAndChangeVisibility ("system_version" , systemVersion .String ())
161
- nativeInstance .UpdateLabelAndChangeVisibility ("app_version" , appVersion .String ())
162
- }
163
156
164
157
// get cpu info
165
158
cpuInfo , err := os .ReadFile ("/proc/cpuinfo" )
@@ -266,34 +259,6 @@ func wakeDisplay(force bool) {
266
259
backlightState = 0
267
260
}
268
261
269
- // watchTsEvents monitors the touchscreen for events and simply calls wakeDisplay() to ensure the
270
- // touchscreen interface still works even with LCD dimming/off.
271
- // TODO: This is quite a hack, really we should be getting an event from jetkvm_native, or the whole display backlight
272
- // control should be hoisted up to jetkvm_native.
273
- func watchTsEvents () {
274
- ts , err := os .OpenFile (touchscreenDevice , os .O_RDONLY , 0666 )
275
- if err != nil {
276
- displayLogger .Warn ().Err (err ).Msg ("failed to open touchscreen device" )
277
- return
278
- }
279
-
280
- defer ts .Close ()
281
-
282
- // This buffer is set to 24 bytes as that's the normal size of events on /dev/input
283
- // Reference: https://www.kernel.org/doc/Documentation/input/input.txt
284
- // This could potentially be set higher, to require multiple events to wake the display.
285
- buf := make ([]byte , 24 )
286
- for {
287
- _ , err := ts .Read (buf )
288
- if err != nil {
289
- displayLogger .Warn ().Err (err ).Msg ("failed to read from touchscreen device" )
290
- return
291
- }
292
-
293
- wakeDisplay (false )
294
- }
295
- }
296
-
297
262
// startBacklightTickers starts the two tickers for dimming and switching off the display
298
263
// if they're not already set. This is done separately to the init routine as the "never dim"
299
264
// option has the value set to zero, but time.NewTicker only accept positive values.
@@ -347,14 +312,11 @@ func initDisplay() {
347
312
go func () {
348
313
displayLogger .Info ().Msg ("setting initial display contents" )
349
314
time .Sleep (500 * time .Millisecond )
350
- _ , _ = nativeInstance .DisplaySetRotation (config .DisplayRotation )
351
315
updateStaticContents ()
352
316
displayInited = true
353
317
displayLogger .Info ().Msg ("display inited" )
354
318
startBacklightTickers ()
355
319
wakeDisplay (true )
356
320
requestDisplayUpdate (true )
357
321
}()
358
-
359
- go watchTsEvents ()
360
322
}
0 commit comments