ecl_tools: add error message if topic not found in logfile

This commit is contained in:
CarlOlsson 2018-10-08 10:14:45 +02:00 committed by Daniel Agar
parent 3424e73aa3
commit 8058878566
1 changed files with 12 additions and 3 deletions

View File

@ -39,13 +39,22 @@ ulog = ULog(args.filename, None)
data = ulog.data_list
# extract data from EKF status message
estimator_status_data = ulog.get_dataset('estimator_status').data;
try:
estimator_status_data = ulog.get_dataset('estimator_status').data;
except (KeyError, IndexError, ValueError) as error:
print(type(error), "(estimator_status):", error)
# extract data from EKF innovations message
ekf2_innovations_data = ulog.get_dataset('ekf2_innovations').data;
try:
ekf2_innovations_data = ulog.get_dataset('ekf2_innovations').data;
except (KeyError, IndexError, ValueError) as error:
print(type(error), "(ekf2_innovations):", error)
# extract data from sensor preflight check message
sensor_preflight_data = ulog.get_dataset('sensor_preflight').data;
try:
sensor_preflight_data = ulog.get_dataset('sensor_preflight').data;
except (KeyError, IndexError, ValueError) as error:
print(type(error), "(sensor_preflight):", error)
if args.check_level_thresholds:
check_level_dict_filename = args.check_level_thresholds