From 9f2e609b6e93c6a59f142b5f5704e9b73711ab2a Mon Sep 17 00:00:00 2001 From: linuswck Date: Fri, 8 Nov 2024 15:36:33 +0800 Subject: [PATCH] pyfastservo dac: Change debug MSG --- fast-servo/pyfastservo/dac.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fast-servo/pyfastservo/dac.py b/fast-servo/pyfastservo/dac.py index 609fcf5..d1deed1 100644 --- a/fast-servo/pyfastservo/dac.py +++ b/fast-servo/pyfastservo/dac.py @@ -86,9 +86,9 @@ def dac_self_calibration(spi): def manual_override(enable=True): reg_contents = read_from_memory(CTRL_ADDR, 1)[0] - print(f"REG contents: 0b{reg_contents:03b}") to_write = reg_contents | 0b1 if enable else reg_contents & 0b110 write_to_memory(CTRL_ADDR, to_write) + print(f"Set DAC Output Manual Override: {enable}") def power_down_afe(channel, power_down=True): assert channel in (0, 1) @@ -101,7 +101,7 @@ def power_down_afe(channel, power_down=True): to_write = reg_contents | value write_to_memory(CTRL_ADDR, to_write) reg_contents = read_from_memory(CTRL_ADDR, 1)[0] - print(f"REG contents: 0b{reg_contents:03b}") + print(f"Power Down DAC AFE Ch{channel}: {power_down}") def set_dac_output(value): value = min(value, 0x3FFF)