mirror of https://github.com/rusefi/RomRaider.git
Fix method getVbattery as it incorrectly expected the channelID rather than DeviceID
This commit is contained in:
parent
5b82a3ad26
commit
e4903b2b4a
|
@ -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);
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue