Open ftyers opened 2 years ago
The INA237-specific code in INA_Class::initDevice() does not compile here, because variables are declared after the case label. If the case statements are enclosed in an {} block, then it compiles.
The (RESOLVED BELOW) Hey Limhes - can you explain in a bit more detail where to place the {} block?
In the .cpp file, at what lines? Sorry, I can't seem to figure it out. Thanks!
Heck yeah, figured it out. Literally just as you explained... my apologies on the confusion. Literally after each case INAxxx
e.g.
case INA219:
add a {
at start and }
at end of every single one of them.
I included the .zip of the working code with ina237
Description
This is code to add support for INA237, from @ghcoleman who is working at Grobotic Systems. The code has been tested and works, but I do not have access to the testing environment.
I realise the PR is a bit bare and perhaps based on a version that isn't
main
. I definitely do not expect it to be merged as is, but I submitted it as it might be useful to someone in the future, for example the author of issue #78.Fixes #78
Type of change
Checklist: