Grr.. So my Java skills are a little rusty (and I've never read binary data before). Right now I'm just trying to read all the relevent data in an ECU image, and then I'll worry about making it useful. I started by trying to pull the RPM for the timing table, and of course, I'm stuck right there. Random (or seemingly) values are coming out negative and I can't figure out why.
//populate rpm values
System.out.println("RPM Values");
for (int i = 0; i < 30; i = i + 2) {
rpmValues[i / 2] = ecuImage[i + Integer.parseInt(new String("293AA"),16)];
System.out.print(rpmValues[i / 2] * 50 + " ");
}
This segment of the code returns this:
RPM Values
800 1200 1600 2000 2400 2800 3200 3600 4000 4400 4800 5200 5600 6000 -6400
If anyone can tell me what I'm doing wrong I'd appreciate it. Thanks!