Browse Source

AP_NavEKF: give a sensible error for no such file on replay

mission-4.1.18
Andrew Tridgell 11 years ago
parent
commit
295cd9adba
  1. 7
      libraries/AP_NavEKF/examples/AP_NavEKF/AP_NavEKF.pde

7
libraries/AP_NavEKF/examples/AP_NavEKF/AP_NavEKF.pde

@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
#include <AP_NavEKF.h>
#include <stdio.h>
#include <getopt.h>
#include <errno.h>
#include "LogReader.h"
@ -109,7 +110,11 @@ void setup() @@ -109,7 +110,11 @@ void setup()
if (update_rate != 0) {
hal.console->printf("Using an update rate of %u Hz\n", update_rate);
}
LogReader.open_log(filename);
if (!LogReader.open_log(filename)) {
perror(filename);
exit(1);
}
LogReader.wait_type(LOG_GPS_MSG);
LogReader.wait_type(LOG_IMU_MSG);

Loading…
Cancel
Save