mirror of https://github.com/ArduPilot/ardupilot
AP_NavEKF: give a sensible error for no such file on replay
This commit is contained in:
parent
854f013146
commit
295cd9adba
|
@ -44,6 +44,7 @@
|
||||||
#include <AP_NavEKF.h>
|
#include <AP_NavEKF.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#include "LogReader.h"
|
#include "LogReader.h"
|
||||||
|
|
||||||
|
@ -109,7 +110,11 @@ void setup()
|
||||||
if (update_rate != 0) {
|
if (update_rate != 0) {
|
||||||
hal.console->printf("Using an update rate of %u Hz\n", update_rate);
|
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_GPS_MSG);
|
||||||
LogReader.wait_type(LOG_IMU_MSG);
|
LogReader.wait_type(LOG_IMU_MSG);
|
||||||
|
|
Loading…
Reference in New Issue