Commit 57fd2a34 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Fix UTF-8 in python3

parent 46c42632
......@@ -131,7 +131,7 @@ class telescope():
(ra, dec) = setpoint.to_string('hmsdms').split()
cmd = '{:s}\t{:s}\n'.format(ra, dec.strip('+'))
cmd = bytes('{:s}\t{:s}\n'.format(ra, dec.strip('+')), 'UTF-8')
logging.info('J2000 setpoint sent to DT: {}'.format(cmd))
self._outsocket.send(cmd)
......@@ -151,7 +151,7 @@ class telescope():
if isinstance(el, u.Quantity):
el = el.to(u.deg).value
cmd = '{:f}\t{:f}\n'.format(az, el)
cmd = bytes('{:f}\t{:f}\n'.format(az, el), 'UTF-8')
logging.info('AzEl sent to DT: {}'.format(cmd))
self._outsocket.send(cmd)
......@@ -174,7 +174,7 @@ class telescope():
else:
off_el = np.deg2rad(off_el)
cmd = '{:f}\t{:f}\n'.format(off_az, off_el)
cmd = bytes('{:f}\t{:f}\n'.format(off_az, off_el), 'UTF-8')
logging.info('Offset sent to DT: {}'.format(cmd))
self._offsetsocket.send(cmd)
......
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