1、修改发送配置工作周期的指令bug

This commit is contained in:
weidong 2025-03-31 08:54:23 +08:00
parent 7c5bcfea5d
commit dd9c0bb8c6

View File

@ -105,16 +105,7 @@ public class APIController extends BasicController{
warningMsg.setInfo(WarningCfg.TYPE_NAME_CFG_ABNORMAL); warningMsg.setInfo(WarningCfg.TYPE_NAME_CFG_ABNORMAL);
warningMsgMapper.insert(warningMsg); warningMsgMapper.insert(warningMsg);
//重新配置 //重新配置
String sendCmd = HexUtil.Byte2HexString(gnssGroup.getWork_cycle().byteValue())+ String sendCmd = gnssGroup.getConfigCmd(device);
HexUtil.Byte2HexString(gnssGroup.getActive_time().byteValue())+
HexUtil.Byte2HexString(gnssGroup.getActive_offset().byteValue())+
HexUtil.Byte2HexString(gnssGroup.getRs_adv().byteValue())+
HexUtil.Byte2HexString(gnssGroup.getPower_mode().byteValue())+
HexUtil.Byte2HexString(gnssGroup.getGnss_sample_s().byteValue());
short len = (short) (sendCmd.length()/2+4);
sendCmd = "d311" + HexUtil.Short2HexString(len)+
HexUtil.Int2HexString(Integer.parseInt(device.getDeviceid()))+
HexUtil.String2HexString(sendCmd);
rtcmClient.config(device.getDeviceid(), sendCmd); rtcmClient.config(device.getDeviceid(), sendCmd);
// 保存 // 保存
saveMsg(device.getDeviceid(), device.getTenantid(),0xD311, sendCmd, true); saveMsg(device.getDeviceid(), device.getTenantid(),0xD311, sendCmd, true);