将初始屏幕的控制放到最前方用以解决屏幕保留消息触发的屏幕控制被覆盖

This commit is contained in:
2024-12-31 17:38:18 +08:00
parent 1fdf111b86
commit 121c7706fc

View File

@@ -80,6 +80,9 @@ func Run() {
// 应用退出时刷新所有缓冲日志 // 应用退出时刷新所有缓冲日志
defer logger.Sync() defer logger.Sync()
// 启动时关闭屏幕
utils.BlankClose()
topicPrefix := fmt.Sprintf("server/%s/%v/", config.C.Location, config.C.Point) topicPrefix := fmt.Sprintf("server/%s/%v/", config.C.Location, config.C.Point)
publishTopic := fmt.Sprintf("device/%s/%v/status", config.C.Location, config.C.Point) publishTopic := fmt.Sprintf("device/%s/%v/status", config.C.Location, config.C.Point)
@@ -152,8 +155,6 @@ func Run() {
// 启动完成发送一次设备状态 // 启动完成发送一次设备状态
device.PublishStatus() device.PublishStatus()
// 启动完成关闭屏幕
utils.BlankClose()
sig := make(chan os.Signal, 1) sig := make(chan os.Signal, 1)
signal.Notify(sig, os.Interrupt, syscall.SIGTERM) signal.Notify(sig, os.Interrupt, syscall.SIGTERM)