Skip to content

Build errors on PlatformIO #6

@ShuffleBit

Description

@ShuffleBit

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions