|
@@ -64,7 +64,7 @@ func Tick(c *gin.Context) {
|
|
|
c.JSON(http.StatusBadRequest, commonEntity.Response{Code: 500, Msg: "保存比赛开始时间报错。"})
|
|
|
return
|
|
|
}
|
|
|
- } else if !util.ContainsKey(cacheTeamName, teamName) && math.Abs(positionX-InitialPositionX) > 5.00 || math.Abs(positionY-InitialPositionY) > 5.00 { // 不在起点(开始)
|
|
|
+ } else if !util.ContainsKey(cacheTeamName, teamName) && (math.Abs(positionX-InitialPositionX) > 5.00 || math.Abs(positionY-InitialPositionY) > 5.00) { // 不在起点(开始)
|
|
|
// 车辆不是在起点启动的自动驾驶模式
|
|
|
selectSql, err := util.ReadFile(c_db.SqlFilesMap["exam-select-latest-by-team_name.sql"])
|
|
|
if err != nil {
|
|
@@ -94,6 +94,7 @@ func Tick(c *gin.Context) {
|
|
|
c_log.GlobalLogger.Infof("队伍 %v 的考试在中途中断后重新开始。", teamName)
|
|
|
} else if util.ContainsKey(cacheTeamName, teamName) { // 进行中
|
|
|
cacheTeamName[teamName] = time.Now()
|
|
|
+ c_log.GlobalLogger.Errorf("接收到心跳信息,队伍名字为 %s,x坐标为 %.f,y坐标为 %.f ", teamName, positionX, positionY)
|
|
|
} else {
|
|
|
c_log.GlobalLogger.Errorf("接收到心跳信息但考试并未开始,队伍名字为 %s,x坐标为 %.f,y坐标为 %.f ", teamName, positionX, positionY)
|
|
|
}
|