Actualizar Gt06ProtocolDecoder.java

Co-authored-by: Anton Tananaev <anton.tananaev@gmail.com>
This commit is contained in:
jcardus 2024-12-08 05:21:59 +00:00 committed by GitHub
parent 5443747272
commit 3c4f028d04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -850,7 +850,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
} else {
int battery = buf.readUnsignedByte();
if ("NT20".equals(model) && type == MSG_GPS_LBS_2) {
battery = (int) (battery * 0.1);
battery = battery / 10;
}
if (battery <= 6) {
position.set(Position.KEY_BATTERY_LEVEL, battery * 100 / 6);