1、增加充电电流、光伏电压显示

This commit is contained in:
weidong 2025-01-03 21:12:41 +08:00
parent 4852f47a06
commit 9b2e367410
4 changed files with 13 additions and 1 deletions

View File

@ -50,8 +50,12 @@ public class GnssStatusMsg {
@ExcelProperty("信号强度")
Short rssi;
@ExcelProperty("")
@ExcelProperty("池电")
Integer voltage;
@ExcelProperty("光伏电压")
Integer solarvoltage;
@ExcelProperty("充电电流")
Integer chargecurrency;
@ExcelProperty("温度")
Float temperature;

View File

@ -91,6 +91,10 @@ public class D3F0SelfCheckMessage extends BaseMessage {
year+"-"+month+"-"+day+" "+hour+":"+munite;
}
}
if(src.readableBytes()>=4){
statusMsg.setSolarvoltage(src.readUnsignedShort());
statusMsg.setChargecurrency(src.readUnsignedShort());
}
// read 会移动 bytebuf 的指针所以保存原始码流需要将此指针挑拨回开始处
src.readerIndex(0);

View File

@ -194,6 +194,8 @@ CREATE TABLE IF NOT EXISTS `gnssstatusmsg` (
`dtustate` smallint DEFAULT NULL,
`rssi` smallint DEFAULT NULL,
`voltage` int DEFAULT NULL,
`solarvoltage` int DEFAULT NULL,
`chargecurrency` int DEFAULT NULL,
`temperature` float DEFAULT NULL,
`humidity` float DEFAULT NULL,
PRIMARY KEY (`id`)

View File

@ -63,6 +63,8 @@
{field: 'yaw', title: 'yaw'},
{field: 'rssi', title: '信号强度'},
{field: 'voltage', title: '电压(mV)'},
{field: 'solarvoltage', title: '光伏电压(mV)'},
{field: 'chargecurrency', title: '充电电流(mA)'},
{field: 'temperature', title: '温度(°C)'},
{field: 'humidity', title: '湿度(%)'}
];