Commit adbd3b8d authored by Projects's avatar Projects

pulsegen: More verbose output when runnning the script

parent cb4df0a3
......@@ -305,14 +305,18 @@ if __name__ == '__main__':
try:
gen = PulseGen(device, baud)
gen.reset()
gen.pulse(count, freq, width, samples)
print('Signal generation started')
gen.trigger()
gen.wait()
print('Finished successfully')
except serial.SerialException as err:
print(err.strerror)
sys.exit(2)
except RuntimeError as err:
print(err.strerror)
sys.exit(2)
except:
print('Error occurred')
sys.exit(2)
gen.reset()
gen.pulse(count, freq, width, samples)
gen.wait()
print('Finished successfully')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment