Added changes to use additional ADC channels#222
Conversation
|
I think this is perfectly reasonable. It is not really in the spirit of the simplefoc api but at least it will enable using this board a bit more optimally in the mean time. Did you notice any performance issues when you do 5 conversions instead of 3? |
|
Ooof... lots of thoughts on this topic, but the important one for this specific PR is that if it is working we should merge it in the G431-specific code because it is something many users ask about and could use. In general, as you know I've been working on the ADC code for RP2040 and SAMD, and I think we need to do another refactoring in the future, to enable the APIs to deal with things like
|
|
No, I did not notice any performance issues, but haven‘t tried it a lot with the latest dev branch. |
|
OK, I'm merging this for v.2.2.3 |
|
Excellent, thank you! |
Now, that all the ADC stuff for the B-G431B-ESC1 board is in hardware specific files anyway, I see no value in not supporting the additional ADC channels for the bus voltage, temp sensor and poti. The code for these was proposed long time ago already by @HoeckDK on the SimpleFOC community forum. To read e.g. the temp sensor of the board, apply this PR and the call
float Temp = _readADCVoltageInline(A_TEMPERATURE, currentSense.params);
It would be cool if this PR was accepted, this would safe me quite some time to apply it to all new versions over and over again...