Fixed vector and pointer problems

Some code was left over from when ch and val were vectors.
adc.ch should've been adc->ch (and similar)