From 7a7fcd40c213f0cb38490d59f23191d06b1603d4 Mon Sep 17 00:00:00 2001
From: Reinder Kraaij <kraaij@astron.nl>
Date: Tue, 8 Apr 2025 14:11:28 +0200
Subject: [PATCH] field on!

---
 tangostationcontrol/rpc/antennafield.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tangostationcontrol/rpc/antennafield.py b/tangostationcontrol/rpc/antennafield.py
index f8ea954ff..f6d196464 100644
--- a/tangostationcontrol/rpc/antennafield.py
+++ b/tangostationcontrol/rpc/antennafield.py
@@ -149,6 +149,12 @@ class AntennaField(antennafield_pb2_grpc.AntennafieldServicer):
         antenna_field.Initialise()
         antenna_field.On()
 
+        # We need to turn things on - and off - so we check if the
+        # Station is actually having the power on, then set it on
+        stationmanager = create_device_proxy("STAT/StationManager/1")
+        if stationmanager.antennas_powered_on_R:
+            antenna_field.power_hardware_on()
+
     def _update_antenna_property(
         self,
         identifier: Identifier,
-- 
GitLab