diff options
Diffstat (limited to 'src/org/traccar/protocol/GlobalSatProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/GlobalSatProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java index 4357c93dc..317a253ec 100644 --- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java +++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java @@ -165,7 +165,12 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { position.setCourse(Double.parseDouble(value)); break; case 'N': - position.set(Position.KEY_BATTERY, value); + if (value.endsWith("mV")) { + position.set(Position.KEY_BATTERY, + Integer.parseInt(value.substring(0, value.length() - 2)) / 1000.0); + } else { + position.set(Position.KEY_BATTERY_LEVEL, Integer.parseInt(value)); + } break; default: // Unsupported |