Skip to content

improve ADC software to allow multiple conversions with a single read_reg call

Joseph Reichert requested to merge ADC_improvements into master

This will let us set multiple conversions at one time. Currently only up to three at once, which corresponds to 24 bits (as we otherwise would need to store multiple return values from the register read).

Right now the function for a single conversion, setNextConversion, also sends 24-bits worth of 0s after the command, which seems suboptimal. It might be best to change this to either send only the command itself OR to always send exactly 24-bits (to keep in sync with the reads). It might also be a good idea to be able to send an arbitrary number of conversions at once, and store the return values in a vector. I would probably refactor some things to do this (e.g. make a struct for result, chanID, and span info), but should think more these improvements first.

Merge request reports