@@ -195,13 +195,6 @@ func waitCtrlAndRequestDisplayUpdate(shouldWakeDisplay bool) {
195
195
func updateStaticContents () {
196
196
//contents that never change
197
197
nativeInstance .UpdateLabelIfChanged ("home_info_mac_addr" , networkState .MACString ())
198
- systemVersion , appVersion , err := GetLocalVersion ()
199
- if err == nil {
200
- nativeInstance .UpdateLabelIfChanged ("boot_screen_version" , systemVersion .String ())
201
- nativeInstance .UpdateLabelIfChanged ("boot_screen_app_version" , appVersion .String ())
202
- nativeInstance .UpdateLabelAndChangeVisibility ("system_version" , systemVersion .String ())
203
- nativeInstance .UpdateLabelAndChangeVisibility ("app_version" , appVersion .String ())
204
- }
205
198
206
199
// get cpu info
207
200
cpuInfo , err := os .ReadFile ("/proc/cpuinfo" )
@@ -308,34 +301,6 @@ func wakeDisplay(force bool) {
308
301
backlightState = 0
309
302
}
310
303
311
- // watchTsEvents monitors the touchscreen for events and simply calls wakeDisplay() to ensure the
312
- // touchscreen interface still works even with LCD dimming/off.
313
- // TODO: This is quite a hack, really we should be getting an event from jetkvm_native, or the whole display backlight
314
- // control should be hoisted up to jetkvm_native.
315
- func watchTsEvents () {
316
- ts , err := os .OpenFile (touchscreenDevice , os .O_RDONLY , 0666 )
317
- if err != nil {
318
- displayLogger .Warn ().Err (err ).Msg ("failed to open touchscreen device" )
319
- return
320
- }
321
-
322
- defer ts .Close ()
323
-
324
- // This buffer is set to 24 bytes as that's the normal size of events on /dev/input
325
- // Reference: https://www.kernel.org/doc/Documentation/input/input.txt
326
- // This could potentially be set higher, to require multiple events to wake the display.
327
- buf := make ([]byte , 24 )
328
- for {
329
- _ , err := ts .Read (buf )
330
- if err != nil {
331
- displayLogger .Warn ().Err (err ).Msg ("failed to read from touchscreen device" )
332
- return
333
- }
334
-
335
- wakeDisplay (false )
336
- }
337
- }
338
-
339
304
// startBacklightTickers starts the two tickers for dimming and switching off the display
340
305
// if they're not already set. This is done separately to the init routine as the "never dim"
341
306
// option has the value set to zero, but time.NewTicker only accept positive values.
@@ -389,14 +354,11 @@ func initDisplay() {
389
354
go func () {
390
355
displayLogger .Info ().Msg ("setting initial display contents" )
391
356
time .Sleep (500 * time .Millisecond )
392
- _ , _ = nativeInstance .DisplaySetRotation (config .DisplayRotation )
393
357
updateStaticContents ()
394
358
displayInited = true
395
359
displayLogger .Info ().Msg ("display inited" )
396
360
startBacklightTickers ()
397
361
wakeDisplay (true )
398
362
requestDisplayUpdate (true )
399
363
}()
400
-
401
- go watchTsEvents ()
402
364
}
0 commit comments