Explorar el Código

fix: 修正室外机器人master关闭逻辑

HeWang hace 5 meses
padre
commit
e0233780dd
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      aarch64/pjibot_delivery/control/main.go

+ 1 - 3
aarch64/pjibot_delivery/control/main.go

@@ -132,7 +132,7 @@ func initRenew() {
 func renew() {
 	for {
 		time.Sleep(time.Duration(renewTurnLength) * time.Second)
-		if localStatus == "running" && launchedFlag && !renewedFlag { // 设备处于运行状态,数采程序已启动,且尚未续约
+		if localStatus == "running" && launchedFlag && !renewedFlag && timeAllowedFlag && !limitReachedFlag { // 设备处于运行状态,数采程序已启动,且尚未续约
 			c_log.GlobalLogger.Info("设备仍处于运行状态,续约 - 开始。")
 			if renewTimer != nil {
 				renewTimer.Stop()
@@ -251,8 +251,6 @@ func main() {
 		} else if localStatus == "error" {
 			c_log.GlobalLogger.Error("设备运行状态出错,停止数采程序。")
 			stopMasterNode()
-		} else {
-			c_log.GlobalLogger.Error("未知的设备运行状态。【status】=", localStatus)
 		}
 	}
 }