forked from Archive/PX4-Autopilot
Made parameter error messages pickier
This commit is contained in:
parent
1538247a72
commit
2b9f3a4845
|
@ -189,9 +189,9 @@ static int mavlink_pm_save_eeprom()
|
|||
int result = param_export(fd, false);
|
||||
close(fd);
|
||||
|
||||
if (result < 0) {
|
||||
if (result != 0) {
|
||||
unlink(mavlink_parameter_file);
|
||||
warn("error exporting parameters to '%s'", mavlink_parameter_file);
|
||||
warn(result, "error exporting parameters to '%s'", mavlink_parameter_file);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ mavlink_pm_load_eeprom()
|
|||
int result = param_load(fd);
|
||||
close(fd);
|
||||
|
||||
if (result < 0) {
|
||||
if (result != 0) {
|
||||
warn("error reading parameters from '%s'", mavlink_parameter_file);
|
||||
return -2;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue