Junjie
2023-06-16 6d25ccf7d7a582ab861e4b9dc0a38cb6cbf21588
提升机状态读取
6个文件已修改
23 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/ShuttleController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/ShuttleMsgTableVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/ShuttleThread.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/shuttle.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ShuttleController.java
@@ -115,7 +115,7 @@
            vo.setCurrentOrBeforeCode(shuttleProtocol.getCurrentOrBeforeCode());//当前或者之前读到的二维码值
            vo.setCodeOffsetX(shuttleProtocol.getCodeOffsetX());//读到的二维码X方向偏移量
            vo.setCodeOffsetY(shuttleProtocol.getCodeOffsetY());//读到的二维码Y方向偏移量
            vo.setCurrentVoltage(shuttleProtocol.getCurrentVoltage() * 0.1);//当前的电压值
            vo.setCurrentVoltage(shuttleProtocol.getCurrentVoltage());//当前的电压值
            vo.setCurrentAnalogValue(shuttleProtocol.getCurrentAnalogValue());//当前的模拟量值
            vo.setCurrentLiftServoSpeed(shuttleProtocol.getCurrentLiftServoSpeed());//当前的升降伺服速度
            vo.setCurrentMoveServoSpeed(shuttleProtocol.getCurrentMoveServoSpeed());//当前的行走伺服速度
src/main/java/com/zy/asrs/domain/vo/ShuttleMsgTableVo.java
@@ -40,7 +40,7 @@
    /**
     * 当前的电压值
     */
    private Short currentVoltage;
    private Integer currentVoltage;
    /**
     * 当前的模拟量值
src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java
@@ -129,7 +129,7 @@
    /**
     * 当前的电压值
     */
    private Double currentVoltage;
    private Integer currentVoltage;
    /**
     * 当前的模拟量值
@@ -216,4 +216,11 @@
        return ShuttleProtocolStatusType.get(this.status).desc;
    }
    public String getCurrentVoltage$() {
        if (this.currentVoltage == null) {
            return "";
        }
        return (this.currentVoltage / 1000.0) + "V";
    }
}
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -84,7 +84,7 @@
    /**
     * 电池温度
     */
    private Short batteryTemp;
    private Integer batteryTemp;
    /**
     * 错误编号
@@ -149,7 +149,7 @@
    /**
     * 当前的电压值
     */
    private Short currentVoltage;
    private Integer currentVoltage;
    /**
     * 当前的模拟量值
src/main/java/com/zy/core/thread/ShuttleThread.java
@@ -129,7 +129,7 @@
                //电池电量百分比
                shuttleProtocol.setBatteryPower(modbusTcpNet.getByteTransform().TransInt16(content,4));
                //电池温度
                shuttleProtocol.setBatteryTemp(modbusTcpNet.getByteTransform().TransInt16(content,6));
                shuttleProtocol.setBatteryTemp(modbusTcpNet.getByteTransform().TransUInt16(content, 6));
                //错误编号
                shuttleProtocol.setErrorCode(modbusTcpNet.getByteTransform().TransInt16(content,8));
                //Plc输出状态IO
@@ -150,7 +150,7 @@
                //读到的二维码Y方向偏移量
                shuttleProtocol.setCodeOffsetY(modbusTcpNet.getByteTransform().TransInt16(content,20));
                //当前的电压值
                shuttleProtocol.setCurrentVoltage(modbusTcpNet.getByteTransform().TransInt16(content,22));
                shuttleProtocol.setCurrentVoltage(modbusTcpNet.getByteTransform().TransUInt16(content, 22));
                //当前的模拟量值
                shuttleProtocol.setCurrentAnalogValue(modbusTcpNet.getByteTransform().TransInt16(content,24));
                //当前的升降伺服速度
src/main/webapp/views/shuttle.html
@@ -590,7 +590,7 @@
                        setVal(tr.children("td").eq(13), table[i-1].currentOrBeforeCode);
                        setVal(tr.children("td").eq(14), table[i-1].codeOffsetX);
                        setVal(tr.children("td").eq(15), table[i-1].codeOffsetY);
                        setVal(tr.children("td").eq(16), table[i-1].currentVoltage ? table[i-1].currentVoltage + "V" : "");
                        setVal(tr.children("td").eq(16), table[i-1].currentVoltage$);
                        setVal(tr.children("td").eq(17), table[i-1].currentAnalogValue);
                    }
                } else if (res.code === 403){