Skip to content

Commit 7097124

Browse files
committed
chore: fix some start-up timing issues
1 parent 10cc089 commit 7097124

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

display.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func watchTsEvents() {
210210
func startBacklightTickers() {
211211
LoadConfig()
212212
if dimTicker == nil && config.DisplayDimAfterSec != 0 {
213-
fmt.Printf("display: dim_ticker has started.")
213+
fmt.Printf("display: dim_ticker has started\n")
214214
dimTicker = time.NewTicker(time.Duration(config.DisplayDimAfterSec) * time.Second)
215215
defer dimTicker.Stop()
216216

@@ -225,7 +225,7 @@ func startBacklightTickers() {
225225
}
226226

227227
if offTicker == nil && config.DisplayOffAfterSec != 0 {
228-
fmt.Printf("display: off_ticker has started.")
228+
fmt.Printf("display: off_ticker has started\n")
229229
offTicker = time.NewTicker(time.Duration(config.DisplayOffAfterSec) * time.Second)
230230
defer offTicker.Stop()
231231

@@ -243,14 +243,14 @@ func startBacklightTickers() {
243243
func init() {
244244
go func() {
245245
waitCtrlClientConnected()
246+
startBacklightTickers()
246247
fmt.Println("setting initial display contents")
247248
time.Sleep(500 * time.Millisecond)
248249
updateStaticContents()
249250
displayInited = true
250251
fmt.Println("display inited")
251-
wakeDisplay(false)
252+
wakeDisplay(true)
252253
requestDisplayUpdate()
253-
startBacklightTickers()
254254
}()
255255

256256
go watchTsEvents()

0 commit comments

Comments
 (0)