Arduino - Conflict function / variable / library

0

I'm doing a program on Arduino. I'm using the Freematics OBDII (UART) adapter. They developed a specific library. There is a problem: trying to read a PID, which returns me 2 bytes with a value between 0 and 65535. Supposedly you should save this value in an unsigned variable int (0 to 65535). But the function that makes me return this value only accepts variables of type int (-32768 to 32767). What is the solution? To rectify the whole library? Somehow fetch the value without using the function?

Function - > obd.readPID ("pid", "variable") // obd.readPID(PID_RUNTIME, tempo_motor);

  

COBD :: readPID (pid byte, int & result)

Library - > link

When running the program, with the adapter connected to the car, when it reaches this line of code the program simply stops (it takes a long time to read the PID value) and ends up moving on to the next line of code. If you use a variable other than int, the following error appears:

exit status 1
no matching function for call to 'COBD::readPID(int, unsigned int&)
    
asked by anonymous 18.09.2017 / 00:29

0 answers