Skip to content

Add averaging to AMACv2's readAM and getADC functions.

Karol Krizka requested to merge kk_avgreadAM into activeTB

Optional argument to the readAM and getADC functions that specifies how many times to read and average a channel. Useful for noisy channels (ie: Cur10V). The default value of read is 1.

There is now a 2 ms sleep before any AM read, even when not necessary. This is to ensure that the value is fresh.

Also adds a few conversion functions that convert AM counts to physical units:

  • AMACv2::convertCur10V: mA
  • AMACv2::convertCur1V: mA
  • AMACv2::convertVDCDC: V
Edited by Karol Krizka

Merge request reports