From 15a66c01fa9710753e84f94196dc535c0a754a87 Mon Sep 17 00:00:00 2001 From: Florian Agbuya Date: Tue, 20 Aug 2024 16:35:49 +0800 Subject: [PATCH] dac: fix initialization order --- fast-servo/pyfastservo/dac.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fast-servo/pyfastservo/dac.py b/fast-servo/pyfastservo/dac.py index 4de7240..9a376c7 100644 --- a/fast-servo/pyfastservo/dac.py +++ b/fast-servo/pyfastservo/dac.py @@ -127,13 +127,13 @@ def configure_ad9117(): configure_dac(spi) dac_self_calibration(spi) + # Enable DAC outputs + spi_write(spi, 0x01, spi_read(spi, 0x01) & ~((1 << 4) | (1 << 3))) + power_down(0, False) power_down(1, False) manual_override(True) - # Enable DAC outputs - spi_write(spi, 0x01, spi_read(spi, 0x01) & ~((1 << 4) | (1 << 3))) - print("AD9117 configuration completed successfully") return True