Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors on PlatformIO #6

Open
ShuffleBit opened this issue Oct 19, 2020 · 1 comment
Open

Build errors on PlatformIO #6

ShuffleBit opened this issue Oct 19, 2020 · 1 comment

Comments

@ShuffleBit
Copy link

The file bms.cpp contains several errors in calls to the OverkillSolarBms::write() method.

The data and length arguments are reversed from the definition in bms.h. It will cause no end of trouble.

These errors are at lines 310, 354, 475, 501, & 523 of the code I cloned.

Also, the calls to min() compare defined values to uint8_t (unsigned char) type. MACROS are treated as int by default, and the min() declaration is min(int, int), so the uint8_t values should be cast as (int) to prevent warnings or the 'no overload found' errors that I saw.

With those changes, it builds silently and does ... something (completely untested so far) on the Espressif ESP32 boards.

I'm working on a project that uses your library (patched) a counter and SN74LV4052A 4-way UART muxes so I can monitor/control lots of BMSes from a web page served up by the same ESP that's doing the monitoring. I think I can do that mux stuff outside of this library, using only Serial1, so having the corrections on here will make future pulls easier there, wink wink.

Thanks for taking the time to make this available!

@jbatx
Copy link

jbatx commented Sep 26, 2021

Did you sort this out with your esp32s? I discovered the same bugs and patched them locally too. ...Then found your issue when trying to debug the serial checksum errors that now get. What was your solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants