mirror of https://github.com/rusefi/RomRaider.git
add j2534 support
git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@141 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
parent
18b51e1b7f
commit
287d554faf
Binary file not shown.
|
@ -15,9 +15,10 @@ public interface J2534 {
|
|||
|
||||
int startPassMsgFilter(int channelId, byte mask, byte pattern);
|
||||
|
||||
void writeMsgs(int channelId, byte[] data);
|
||||
void writeMsg(int channelId, byte[] data);
|
||||
|
||||
byte[] readMsgs(int channelId);
|
||||
// FIX - Needs to return msg type, etc. Create Response object.
|
||||
byte[] readMsg(int channelId);
|
||||
|
||||
void stopMsgFilter(int channelId, int msgId);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class TestJ2534 {
|
|||
try {
|
||||
|
||||
byte[] ecuInit = {(byte) 0x80, (byte) 0x10, (byte) 0xF0, (byte) 0x01, (byte) 0xBF};
|
||||
api.writeMsgs(channelId, ecuInit);
|
||||
api.writeMsg(channelId, ecuInit);
|
||||
|
||||
} finally {
|
||||
api.stopMsgFilter(channelId, msgId);
|
||||
|
|
|
@ -78,14 +78,14 @@ public final class J2534OpenPort20 implements J2534 {
|
|||
return msgId[0];
|
||||
}
|
||||
|
||||
public void writeMsgs(int channelId, byte[] data) {
|
||||
public void writeMsg(int channelId, byte[] data) {
|
||||
PassThruMessage msg = passThruMessage(data);
|
||||
int[] pNumMsgs = {1};
|
||||
int status = PassThruWriteMsgs(channelId, msg, pNumMsgs, 55);
|
||||
if (status != STATUS_NOERROR) handleError(status);
|
||||
}
|
||||
|
||||
public byte[] readMsgs(int channelId) {
|
||||
public byte[] readMsg(int channelId) {
|
||||
PassThruMessage msg = passThruMessage();
|
||||
int[] pNumMsgs = {1};
|
||||
int status = PassThruReadMsgs(channelId, msg, pNumMsgs, 0);
|
||||
|
|
Loading…
Reference in New Issue