Commit 1fdda5a5b608a84c0c4ee9d857917ddbde8ec00e
1 parent
fc277cf1
Exists in
dev
AgentDevice*.py cleaned pour mode DEBUG off
Showing
2 changed files
with
18 additions
and
18 deletions
Show diff stats
src/core/pyros_django/agent/AgentDeviceGemini.py
... | ... | @@ -86,10 +86,10 @@ class AgentDeviceGemini(AgentDevice): |
86 | 86 | ##self._agent_device_telescope_status = get_or_create_unique_row_from_model(AgentDeviceTelescopeStatus) |
87 | 87 | """ |
88 | 88 | if not AgentDeviceTelescopeStatus.objects.exists(): |
89 | - print("CREATE first row") | |
89 | + self.printd("CREATE first row") | |
90 | 90 | self._agent_device_telescope_status = AgentDeviceTelescopeStatus.objects.create(id=1) |
91 | 91 | # Get 1st row (will be updated at each iteration by routine_process() with current device status) |
92 | - print("GET first row") | |
92 | + self.printd("GET first row") | |
93 | 93 | self._agent_device_telescope_status = AgentDeviceTelescopeStatus.objects.get(id=1) |
94 | 94 | """ |
95 | 95 | |
... | ... | @@ -98,7 +98,7 @@ class AgentDeviceGemini(AgentDevice): |
98 | 98 | ##HOST, PORT = "82.64.28.71", 11110 |
99 | 99 | #HOST, PORT = "localhost", 11110 |
100 | 100 | ##self.tele_ctrl = TelescopeControllerGemini(HOST, PORT, True) |
101 | - ##self._log.print(f"init done for {name}") | |
101 | + ##self._log.self.printd(f"init done for {name}") | |
102 | 102 | |
103 | 103 | |
104 | 104 | def init(self): |
... | ... | @@ -149,7 +149,7 @@ class AgentDeviceGemini(AgentDevice): |
149 | 149 | cmd="get_date" |
150 | 150 | res = self._device_ctrl.exec_cmd(cmd) |
151 | 151 | self.printd("result is", str(res)) |
152 | - if res.ok: print("OK") | |
152 | + if res.ok: self.printd("OK") | |
153 | 153 | dev_date = str(res) |
154 | 154 | time.sleep(1) |
155 | 155 | |
... | ... | @@ -157,7 +157,7 @@ class AgentDeviceGemini(AgentDevice): |
157 | 157 | cmd="get_time" |
158 | 158 | res = self._device_ctrl.exec_cmd(cmd) |
159 | 159 | self.printd("result is", str(res)) |
160 | - if res.ok: print("OK") | |
160 | + if res.ok: self.printd("OK") | |
161 | 161 | dev_time = str(res) |
162 | 162 | time.sleep(1) |
163 | 163 | |
... | ... | @@ -169,7 +169,7 @@ class AgentDeviceGemini(AgentDevice): |
169 | 169 | cmd="Mount.get_radec" |
170 | 170 | res = self._device_ctrl.exec_cmd(cmd) |
171 | 171 | self.printd("result is", str(res)) |
172 | - if res.ok: print("OK") | |
172 | + if res.ok: self.printd("OK") | |
173 | 173 | dev_radec = str(res) |
174 | 174 | time.sleep(1) |
175 | 175 | |
... | ... | @@ -180,9 +180,9 @@ class AgentDeviceGemini(AgentDevice): |
180 | 180 | AGENT LEVEL SPECIFIC COMMANDS |
181 | 181 | ''' |
182 | 182 | def do_ad_gemini_specific1(self): |
183 | - print("processing ad_specific1... ") | |
183 | + self.printd("processing ad_specific1... ") | |
184 | 184 | def set_ad_gemini_specific2(self): |
185 | - print("processing set_specific2... ") | |
185 | + self.printd("processing set_specific2... ") | |
186 | 186 | |
187 | 187 | |
188 | 188 | |
... | ... | @@ -204,6 +204,6 @@ if __name__ == "__main__": |
204 | 204 | #agent = AgentX() |
205 | 205 | agent = AgentDeviceTelescopeGemini(configfile, RUN_IN_THREAD) |
206 | 206 | agent.setSimulatorMode(TEST_MODE) |
207 | - print(agent) | |
207 | + self.printd(agent) | |
208 | 208 | ''' |
209 | 209 | agent.run() | ... | ... |
src/core/pyros_django/agent/AgentDeviceSBIG.py
... | ... | @@ -84,10 +84,10 @@ class AgentDeviceSBIG(AgentDevice): |
84 | 84 | ##self._agent_device_telescope_status = get_or_create_unique_row_from_model(AgentDeviceTelescopeStatus) |
85 | 85 | """ |
86 | 86 | if not AgentDeviceTelescopeStatus.objects.exists(): |
87 | - print("CREATE first row") | |
87 | + self.printd("CREATE first row") | |
88 | 88 | self._agent_device_telescope_status = AgentDeviceTelescopeStatus.objects.create(id=1) |
89 | 89 | # Get 1st row (will be updated at each iteration by routine_process() with current device status) |
90 | - print("GET first row") | |
90 | + self.printd("GET first row") | |
91 | 91 | self._agent_device_telescope_status = AgentDeviceTelescopeStatus.objects.get(id=1) |
92 | 92 | """ |
93 | 93 | |
... | ... | @@ -96,7 +96,7 @@ class AgentDeviceSBIG(AgentDevice): |
96 | 96 | ##HOST, PORT = "82.64.28.71", 11110 |
97 | 97 | #HOST, PORT = "localhost", 11110 |
98 | 98 | ##self.tele_ctrl = TelescopeControllerGemini(HOST, PORT, True) |
99 | - ##self._log.print(f"init done for {name}") | |
99 | + ##self._log.self.printd(f"init done for {name}") | |
100 | 100 | |
101 | 101 | |
102 | 102 | def init(self): |
... | ... | @@ -144,9 +144,9 @@ class AgentDeviceSBIG(AgentDevice): |
144 | 144 | AGENT LEVEL SPECIFIC COMMANDS |
145 | 145 | ''' |
146 | 146 | def do_ad_sbig_specific1(self): |
147 | - print("processing do_sbig_specific1... ") | |
147 | + self.printd("processing do_sbig_specific1... ") | |
148 | 148 | def set_ad_sbig_specific2(self): |
149 | - print("processing set_sbig_specific2... ") | |
149 | + self.printd("processing set_sbig_specific2... ") | |
150 | 150 | |
151 | 151 | |
152 | 152 | # @Override |
... | ... | @@ -155,14 +155,14 @@ class AgentDeviceSBIG(AgentDevice): |
155 | 155 | cmd="get_date" |
156 | 156 | res = self._device_ctrl.exec_cmd(cmd) |
157 | 157 | self.printd("result is", str(res)) |
158 | - if res.ok: print("OK") | |
158 | + if res.ok: self.printd("OK") | |
159 | 159 | dev_date = str(res) |
160 | 160 | time.sleep(1) |
161 | 161 | |
162 | 162 | cmd="get_time" |
163 | 163 | res = self._device_ctrl.exec_cmd(cmd) |
164 | 164 | self.printd("result is", str(res)) |
165 | - if res.ok: print("OK") | |
165 | + if res.ok: self.printd("OK") | |
166 | 166 | dev_time = str(res) |
167 | 167 | time.sleep(1) |
168 | 168 | |
... | ... | @@ -170,7 +170,7 @@ class AgentDeviceSBIG(AgentDevice): |
170 | 170 | cmd="get radec" |
171 | 171 | res = self._device_ctrl.execute_cmd(cmd) |
172 | 172 | self.printd("result is", str(res)) |
173 | - if res.ok: print("OK") | |
173 | + if res.ok: self.printd("OK") | |
174 | 174 | dev_radec = str(res) |
175 | 175 | time.sleep(1) |
176 | 176 | |
... | ... | @@ -198,6 +198,6 @@ if __name__ == "__main__": |
198 | 198 | #agent = AgentX() |
199 | 199 | agent = AgentDeviceTelescopeGemini(configfile, RUN_IN_THREAD) |
200 | 200 | agent.setSimulatorMode(TEST_MODE) |
201 | - print(agent) | |
201 | + self.printd(agent) | |
202 | 202 | ''' |
203 | 203 | agent.run() | ... | ... |