From c914ec3a05d7f1208b866be4f988a0f4b7a83157 Mon Sep 17 00:00:00 2001
From: Boudewijn Hut <hut@astron.nl>
Date: Wed, 28 Jun 2017 06:50:32 +0000
Subject: [PATCH] Temperature readings can now be switched on or off by a
 constant

---
 .../apertif/commissioning/dish_status.sh      | 22 ++++++++++---------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/applications/apertif/commissioning/dish_status.sh b/applications/apertif/commissioning/dish_status.sh
index 3935a6d336..4dc2e024d5 100755
--- a/applications/apertif/commissioning/dish_status.sh
+++ b/applications/apertif/commissioning/dish_status.sh
@@ -113,16 +113,18 @@ else
     fi
 
     ###############################################################################
-
-    # read Uniboard sensors per type
-    python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 1  # FPGA temperatures
-    python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 2  # ETH temperatures
-    python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 3  # Current
-    python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 4  # Voltage
-    python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 5  # Power = Current * Voltage
-    
-    # read ADU temperatures
-    python $UPE/peripherals/util_adu_i2c_commander.py -v 3 --unb $UNBS --bn 0:3 --sp 0:3 -n 0
+    READ_TEMPERATURES=False
+    if [ "$READ_TEMPERATURES" == "True" ]; then
+        # read Uniboard sensors per type
+        python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 1  # FPGA temperatures
+        python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 2  # ETH temperatures
+        python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 3  # Current
+        python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 4  # Voltage
+        python $UPE/peripherals/util_unb_sens.py -v 3 --unb $UNBS --fn 0:3 --bn 0:3 -n 5  # Power = Current * Voltage
+        
+        # read ADU temperatures
+        python $UPE/peripherals/util_adu_i2c_commander.py -v 3 --unb $UNBS --bn 0:3 --sp 0:3 -n 0
+    fi
 
     ###############################################################################
 
-- 
GitLab