We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32eb838 commit f79da4cCopy full SHA for f79da4c
display.go
@@ -160,8 +160,17 @@ func wakeDisplay(force bool) {
160
fmt.Printf("display wake failed, %s\n", err)
161
}
162
163
- dim_ticker.Reset(time.Duration(config.DisplayDimAfterMs) * time.Millisecond)
164
- off_ticker.Reset(time.Duration(config.DisplayOffAfterMs) * time.Millisecond)
+ if config.DisplayDimAfterSec == 0 {
+ dim_ticker.Stop()
165
+ } else {
166
+ dim_ticker.Reset(time.Duration(config.DisplayDimAfterSec) * time.Second)
167
+ }
168
+
169
+ if config.DisplayOffAfterSec == 0 {
170
+ off_ticker.Stop()
171
172
+ off_ticker.Reset(time.Duration(config.DisplayOffAfterSec) * time.Second)
173
174
backlightState = 0
175
176
0 commit comments