zhangzengfei
2024-10-22 4ca3791590a7bf50222aa5f80e53edf04739108a
fix 1400 post floor farmat
2个文件已修改
19 ■■■■ 已修改文件
nvcs/cache.go 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
repository/captureRepo.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
nvcs/cache.go
@@ -115,17 +115,26 @@
    node := c.data.Back() // 从链表尾部开始
    for node != nil {
        if data, ok := node.Value.(ElevatorRunData); ok {
            if data.Timestamp >= timestamp {
            if data.Timestamp < timestamp {
                runData = data
                node = node.Prev() // 向前移动节点
            } else {
                break
            } else {
                node = node.Prev() // 向前移动节点
            }
        } else {
            break
        }
    }
    logger.Debug("getPositionByTime %v ,time %d", runData, timestamp)
    if node == nil {
        fmt.Printf("get position failuer, query time %d cache len %d", timestamp, c.data.Len())
        if c.data.Back() != nil {
            logger.Warn("last node %+v", c.data.Back().Value)
        }
    }
    return
}
repository/captureRepo.go
@@ -358,8 +358,8 @@
    // 比较两个整数的大小
    if num1 > num2 {
        return "out"
        return "2"
    } else {
        return "in"
        return "1"
    }
}