chore: update logging

This commit is contained in:
Siyuan Miao
2025-04-11 12:55:36 +02:00
parent 924b55059f
commit 0ba7902f82
13 changed files with 246 additions and 105 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"os"
"strconv"
"sync"
"time"
)
@@ -70,9 +71,15 @@ func updateDisplay() {
}
}
var displayInited = false
var (
displayInited = false
displayUpdateLock = sync.Mutex{}
)
func requestDisplayUpdate() {
displayUpdateLock.Lock()
defer displayUpdateLock.Unlock()
if !displayInited {
displayLogger.Info().Msg("display not inited, skipping updates")
return