diff --git a/src/main/java/com/romraider/io/j2534/api/J2534.java b/src/main/java/com/romraider/io/j2534/api/J2534.java index efec0fa9..b0403273 100644 --- a/src/main/java/com/romraider/io/j2534/api/J2534.java +++ b/src/main/java/com/romraider/io/j2534/api/J2534.java @@ -43,7 +43,7 @@ public interface J2534 { byte[] fastInit(int channelId, byte[] input); - double getVbattery(int channelId); + double getVbattery(int deviceId); void writeMsg(int channelId, byte[] data, long timeout, TxFlags flag); diff --git a/src/main/java/com/romraider/io/j2534/api/J2534Impl.java b/src/main/java/com/romraider/io/j2534/api/J2534Impl.java index 11fe01ca..b5ca3b10 100644 --- a/src/main/java/com/romraider/io/j2534/api/J2534Impl.java +++ b/src/main/java/com/romraider/io/j2534/api/J2534Impl.java @@ -786,13 +786,13 @@ public final class J2534Impl implements J2534 { /** * This function reads the battery voltage on pin 16 of the J2534 interface. - * @param channelId - handle to the open communications channel + * @param deviceId - handle to the PassThru device * @return battery voltage in VDC */ - public double getVbattery(int channelId) { + public double getVbattery(int deviceId) { NativeLongByReference vBatt = new NativeLongByReference(); NativeLong ret = lib.PassThruIoctl( - new NativeLong(channelId), + new NativeLong(deviceId), new NativeLong(IOCtl.READ_VBATT.getValue()), null, vBatt.getPointer()