MyLab-odyssey / ED_BMSdiag

Retrieve battery diagnostic data from your smart electric drive EV.
MIT License
50 stars 19 forks source link

Update AvgNew.h for consistency #16

Closed cdn closed 6 years ago

cdn commented 6 years ago

Either header or source has int16_t percentile(int[16_t] pos) declared incorrectly

MyLab-odyssey commented 6 years ago

Thanks cdn for your PR, but I will currently not maintain the code unless I merged Jim Sokoloffs PR-sub-branch! I have to review his code and after that I will look into the libs. BTW using an int / int16_t for a position declared as byte will also not fix a possible fault. The main code will only use 93 entries, so there is actually not a problem. In the AvgNew 0.4.0 from ED4scan I already fixed some of those issues. Will merge them including the sub-dev of Jim's PR in some time...

cdn commented 6 years ago

I only noticed when compiling EDm_BLE for RFduino; the ED_BMSdiag code compiled fine for Mega2560.

MyLab-odyssey commented 6 years ago

You are welcome! Whatever you find, please report!

EDm_BLE is version 0.1.0 and so the AvgNew-Lib of it. Really, really old and unfortunately no progress in the "Work in Progress" of the project - sorry. I wanted to adapt EDm_BLE for the new 453ED/EQ and will reactivate my old module, so maybe we get it even to work with some updates on the ED3?!

Do you have a working EDm to test those future changes? I sold my ED3 and can't test it beside a simulator I made.

cdn commented 6 years ago

I have EDm boards coming, and a cart at mouser waiting to go. The ED_BMSdiag is working, need to take a picture of the CANbus Shield (with minimally soldered connectors) and put it somewhere.

My ED3 is sitting with 14.5% SOC waiting for another sunny day for PV charging…

Was I compiling with the wrong libraries? : ]

cdn commented 6 years ago

Perhaps some libraries should be submodules?

To use ED4scan’s AvgNew with EDm_BLE, _BMS_dfs.h does need a few updates for uint16_t : )

MyLab-odyssey commented 6 years ago

I know. Before publishing the first project I tried submodules and it didn't work - was to lazy to get it up, because finishing the project was the main task. Everything is running - but remember it's not my full time job to maintain the stuff! Currently getting into the fast charger of the ED4/EQ has highest priority, then I will update ED BMSdiag and after that I will look into EDm...

When you get to your EDm's let me know if it still works ;-)

cdn commented 6 years ago

img_0946 boards!

Can you tell me if there’s anything special about R3 cf R1, 5, 6 or 7?

MyLab-odyssey commented 6 years ago

Congrats! As far as I remember there is nothing special. Form factor 0603 and 1k resistance. You may increase R1, R5 adapting to your LED's. Some high efficiency types will require a higher series resistor to dim them - about 4.7k or so?!