Closed krausmt closed 10 years ago
Please put the updated OBD library into your Arduino's "libraries" directory. Obviously the library there is out-dated.
Hmm....I'm using your CodeBlocks distribution, not the Arduino IDE. I didn't add any of your OBD stuff to Arduino's "libraries" directory before and it worked fine. The problem is with the getState() function not being defined.
Where in your (ArduinoOBD)https://github.com/stanleyhuangyc/ArduinoOBD github source is getState() defined? You call this from COBDLogger::dataIdleLoop() but I can't find the implementation of getState().
Right now, according to the online github repository, getState() is not defined in any of:
Are you sure you don't mean something like this:
if (state | OBD_CONNECTED)
instead of
if (getState() == OBD_CONNECTED)
And if so, where is OBD_CONNECTED defined?
I am running the megalogger/megalogger.cbp CodeBlocks project file. Thanks.
Just do a search for 'getState' on your ArduinoOBD github site and you'll see what I mean:
https://github.com/stanleyhuangyc/ArduinoOBD/search?q=getState&ref=cmdform&type=Code
And while we're at it, where is the declaration for 'm_state'? Here's a search:
https://github.com/stanleyhuangyc/ArduinoOBD/search?q=m_state&type=Code
As you can see, it's used twice in libraries/OBD/OBD.cpp (lines 255 and 292), but never declared.
Obviously you need to declare m_state before it can be used.
Just comitted. Please check out latest OBD.h.
That fixed it. I knew it was something simple. Thanks!
I noticed the addition of getState() and OBD_CONNECTED in the 9/9/2013 push called "sync with library update."
This causes the following compile errors:
Looks like there might be some other OBD_ #defines missing (like OBD_CONNECTING) in other places in the code.
Is everything pushed to github? I'm guessing that something's not quite updated...I cloned a fresh copy and get the same results as above.