Commit d111e83b authored by enfo's avatar enfo

Added DIAG_STS flag for adis

parent a7b5da0f
......@@ -31,7 +31,7 @@ class AdisPackage(object):
def __init__(self, TOV, TOA, TOT, timestamp, prod_id,
deltang, deltvel, temp=None,
mag=None, barometer=None, gyro=None, accl=None, status=None):
mag=None, barometer=None, gyro=None, accl=None, status=None, dig_sts=None):
if gyro is None:
gyro = []
if accl is None:
......@@ -79,7 +79,8 @@ class AdisPackage(object): = [self.tov] + + self.deltang + self.deltvel
self.dict = {'tov': self._tov, 'toa': self._toa, 'tot': self.tot,
'timestamp': self.timestamp, 'temp': self.temp,
'deltvel': self.deltvel, 'deltang': self.deltang, 'status': status}
'deltvel': self.deltvel, 'deltang': self.deltang,
'status': status, 'diag': diag_sts}
if prod_id == 16488:
self.barometer = barom_scale(barometer)
self.mag = [mag_scale(m) for m in mag]
......@@ -118,7 +119,7 @@ class AdisParser(object):
(deltang_x, deltang_y, deltang_z),
(deltvel_x, deltvel_y, deltvel_z),
temp, status=sys_e_flag)
temp, status=sys_e_flag, diag_sts=diag_sts)
elif prod_id == 16488:
if MAG_ON:
temp, \
......@@ -147,7 +148,7 @@ class AdisParser(object):
(deltvel_x, deltvel_y, deltvel_z),
(mag_x, mag_y, mag_z),
barom, status=sys_e_flag)
barom, status=sys_e_flag, diag_sts=diag_sts)
if not (sys_e_flag == 1 or sys_e_flag == 0):
print('\nError: %X %X\n' % (sys_e_flag, diag_sts))
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