arduino-nissan-consult-library's People
Forkers
slouffka guitarguru102 bestaimer jpknobel hlchau znsoft adonlin mistertwo stephanmantler kpeatop tu5k4rr bashirtowdiee mattcallow fox015 nfrench94 matt2005 fzhdan takolukasan bamboojoearduino-nissan-consult-library's Issues
Little bug found in consult.pp, Consult::readEcuStream
Hi,
just reading your code, with the aim to convert it to "Processing" and run it from my MAC. Well done, your code is crystal clear.
It seems however that I found a little bug in consult.cpp - readEcuStream :
your "readcount" variable is never incremented, when waiting for the start frame byte, so the code could stay stuck in the do ... while loop.
Kind regards
Phil.
boolean Consult::readEcuStream(ConsultRegister myRegisters[], int numRegisters)
{
// Value read from ECU
int ecuByte, readCount = 0, value;
// Flush stream,
// Probably not the best way to do this, but I was worried about
// The arduino not being able to keep up with the data feed from the ECU
// and be reading stale data out of the UART buffer over time
_consultSerial->flush();
// Read until we hit start frame
do {
readEcu(&ecuByte);
// Dont get stuck here forever,
// This should be a a safe max number of reads
if (readCount > (numRegisters * 2) + 10) { // --> modify to readCount++ ??
// Failed to find start frame!
return false;
}
}
while (ecuByte != 0xFF);
Hello, this isn't an issue, I just want to say I'm going to give this a try
Thanks for making this !
If anyone wants to reach me, I'll be at [email protected]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.