From 5ddd4d250ee5507bac12eb3338bb9a61f54847d1 Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 6 Dec 2020 23:58:32 +0100 Subject: [PATCH] channels: swap adc inputs Fixes Gitea issue #12 --- src/channels.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/channels.rs b/src/channels.rs index bc5d99f..24d3920 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -39,10 +39,10 @@ impl Channels { adc.set_sync_enable(false).unwrap(); // Setup channels and start ADC - adc.setup_channel(0, ad7172::Input::Ain0, ad7172::Input::Ain1).unwrap(); + adc.setup_channel(0, ad7172::Input::Ain2, ad7172::Input::Ain3).unwrap(); let adc_calibration0 = adc.get_calibration(0) .expect("adc_calibration0"); - adc.setup_channel(1, ad7172::Input::Ain2, ad7172::Input::Ain3).unwrap(); + adc.setup_channel(1, ad7172::Input::Ain0, ad7172::Input::Ain1).unwrap(); let adc_calibration1 = adc.get_calibration(1) .expect("adc_calibration1"); adc.start_continuous_conversion().unwrap();