diff --git a/fast-servo/pyfastservo/loopback.py b/fast-servo/pyfastservo/loopback.py index 12f0a8e..13ee77b 100644 --- a/fast-servo/pyfastservo/loopback.py +++ b/fast-servo/pyfastservo/loopback.py @@ -1,25 +1,24 @@ import time from pyfastservo import adc, dac from pyfastservo.common import ( - ADC_CH0_HIGH_ADDR, - ADC_CH0_LOW_ADDR, - CH0_HIGH_WORD_ADDR, - CH0_LOW_WORD_ADDR, + ADC_CH1_HIGH_ADDR, + ADC_CH1_LOW_ADDR, + CH1_HIGH_WORD_ADDR, + CH1_LOW_WORD_ADDR, read_from_memory, write_to_memory ) -### def read_adc(): - adc_value = adc.read_adc_channel(ADC_CH0_HIGH_ADDR, ADC_CH0_LOW_ADDR) + adc_value = adc.read_adc_channel(ADC_CH1_HIGH_ADDR, ADC_CH1_LOW_ADDR) return adc_value def write_dac(value): dac.set_dac_output(value) def read_dac(): - high_word = read_from_memory(CH0_HIGH_WORD_ADDR, 1)[0] - low_word = read_from_memory(CH0_LOW_WORD_ADDR, 1)[0] + high_word = read_from_memory(CH1_HIGH_WORD_ADDR, 1)[0] + low_word = read_from_memory(CH1_LOW_WORD_ADDR, 1)[0] return (high_word << 8) | low_word def perform_loopback_test(test_value):