Commit 872a2de432bc8305c8d806992cf2a753a78b9caa

Authored by aklotz
1 parent d5e4f9ca
Exists in master

Add platform for TP CCD

Showing 1 changed file with 12 additions and 9 deletions   Show diff stats
gui/tp_audine_elec/tp_audine_elec.py
... ... @@ -115,22 +115,25 @@ if __name__ == "__main__":
115 115 argus.append(f"{expo}")
116 116 argus.append(f"{binn}")
117 117 # --- Launch the acquisition process
118   - psystem = platform.system()
119   - distribution = platform.freedesktop_os_release()
120   - uname = platform.uname()
121   -
  118 + t0 = time.time()
122 119 message = f'subprocess.run({argus},capture_output=True)'
123 120 print(message)
124   - t0 = time.time()
125   - res = subprocess.run(argus, capture_output=True)
126   - stdo = res.stdout
127   - #lstdos = str(stdo).split("\\n")
  121 + uname = platform.uname()
  122 + image = False
  123 + if "raspi" in uname[2]:
  124 + # Launch the process only for Raspberry
  125 + res = subprocess.run(argus, capture_output=True)
  126 + stdo = res.stdout
  127 + #lstdos = str(stdo).split("\\n")
  128 + image = True
  129 + else:
  130 + pass
128 131 dt = time.time() - t0
129 132 message = f"Acquisition done in {dt:.3f} sec"
130 133 print(message)
131 134 print(stdo)
132 135 # ---
133   - if meth=="full_frame":
  136 + if meth=="full_frame" and image==True:
134 137 time.sleep(0.5)
135 138 fullfile = ima1.load("/home/user/Documents/image.fit")
136 139 path_new = os.path.dirname(fullfile)
... ...