harp-tech / device.behavior

A multi-purpose device tailored to behavioral experiments. It allows control of pokes, RGB LEDs, LEDs, cameras, servo motors and a quadrature counter.
1 stars 0 forks source link

Expose second ADC channel in the high-level interface #6

Closed bruno-f-cruz closed 1 year ago

bruno-f-cruz commented 1 year ago

This PR adds the second ADC channel, only present in the behavior boards >2.0 hw versions, to the high-level bonsai interface.

Since the current firmware is shared across all hardware versions of the boards, the parsing method will not crash when attempting to read from a device without the second ADC. In this case, the device (if <2.0) will pad the register's third position value with a default value.

For backward compatibility, the payloadSpec name of the first ADC channel remained unchanged (AnalogInput).