mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Rover: rename dataflash to logger
This commit is contained in:
parent
e9ba121467
commit
6f5497cac3
@ -18,7 +18,7 @@ const AP_Param::Info Rover::var_info[] = {
|
|||||||
|
|
||||||
// @Param: LOG_BITMASK
|
// @Param: LOG_BITMASK
|
||||||
// @DisplayName: Log bitmask
|
// @DisplayName: Log bitmask
|
||||||
// @Description: Bitmap of what log types to enable in dataflash. This values is made up of the sum of each of the log types you want to be saved on dataflash. On boards supporting microSD cards or other large block-storage devices it is usually best just to enable all log types by setting this to 65535. On boards with on-board "DataFlash storage" you need to be more selective in your logging or you may run out of log space while flying (in which case it will wrap and overwrite the start of the log). The individual bits are ATTITUDE_FAST=1, ATTITUDE_MEDIUM=2, GPS=4, PerformanceMonitoring=8, ControlTuning=16, NavigationTuning=32, Mode=64, IMU=128, Commands=256, Battery=512, Compass=1024, TECS=2048, Camera=4096, RCandServo=8192, Rangefinder=16384, Arming=32768, FullLogs=65535
|
// @Description: Bitmap of what log types to enable in on-board logger. This value is made up of the sum of each of the log types you want to be saved. On boards supporting microSD cards or other large block-storage devices it is usually best just to enable all log types by setting this to 65535. The individual bits are ATTITUDE_FAST=1, ATTITUDE_MEDIUM=2, GPS=4, PerformanceMonitoring=8, ControlTuning=16, NavigationTuning=32, Mode=64, IMU=128, Commands=256, Battery=512, Compass=1024, TECS=2048, Camera=4096, RCandServo=8192, Rangefinder=16384, Arming=32768, FullLogs=65535
|
||||||
// @Values: 0:Disabled,65535:Default
|
// @Values: 0:Disabled,65535:Default
|
||||||
// @Bitmask: 0:ATTITUDE_FAST,1:ATTITUDE_MED,2:GPS,3:PM,4:THR,5:NTUN,7:IMU,8:CMD,9:CURRENT,10:RANGEFINDER,11:COMPASS,12:CAMERA,13:STEERING,14:RC,15:ARM/DISARM,19:IMU_RAW
|
// @Bitmask: 0:ATTITUDE_FAST,1:ATTITUDE_MED,2:GPS,3:PM,4:THR,5:NTUN,7:IMU,8:CMD,9:CURRENT,10:RANGEFINDER,11:COMPASS,12:CAMERA,13:STEERING,14:RC,15:ARM/DISARM,19:IMU_RAW
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Dataflash logging control
|
// Logging control
|
||||||
//
|
//
|
||||||
#ifndef LOGGING_ENABLED
|
#ifndef LOGGING_ENABLED
|
||||||
#define LOGGING_ENABLED ENABLED
|
#define LOGGING_ENABLED ENABLED
|
||||||
|
@ -45,7 +45,6 @@ void Rover::crash_check()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (crashed) {
|
if (crashed) {
|
||||||
// log an error in the dataflash
|
|
||||||
AP::logger().Write_Error(LogErrorSubsystem::CRASH_CHECK,
|
AP::logger().Write_Error(LogErrorSubsystem::CRASH_CHECK,
|
||||||
LogErrorCode::CRASH_CHECK_CRASH);
|
LogErrorCode::CRASH_CHECK_CRASH);
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void Rover::ekf_check()
|
|||||||
// limit count from climbing too high
|
// limit count from climbing too high
|
||||||
ekf_check_state.fail_count = EKF_CHECK_ITERATIONS_MAX;
|
ekf_check_state.fail_count = EKF_CHECK_ITERATIONS_MAX;
|
||||||
ekf_check_state.bad_variance = true;
|
ekf_check_state.bad_variance = true;
|
||||||
// log an error in the dataflash
|
|
||||||
AP::logger().Write_Error(LogErrorSubsystem::EKFCHECK,
|
AP::logger().Write_Error(LogErrorSubsystem::EKFCHECK,
|
||||||
LogErrorCode::EKFCHECK_BAD_VARIANCE);
|
LogErrorCode::EKFCHECK_BAD_VARIANCE);
|
||||||
// send message to gcs
|
// send message to gcs
|
||||||
@ -71,7 +71,6 @@ void Rover::ekf_check()
|
|||||||
// if variance is flagged as bad and the counter reaches zero then clear flag
|
// if variance is flagged as bad and the counter reaches zero then clear flag
|
||||||
if (ekf_check_state.bad_variance && ekf_check_state.fail_count == 0) {
|
if (ekf_check_state.bad_variance && ekf_check_state.fail_count == 0) {
|
||||||
ekf_check_state.bad_variance = false;
|
ekf_check_state.bad_variance = false;
|
||||||
// log recovery in the dataflash
|
|
||||||
AP::logger().Write_Error(LogErrorSubsystem::EKFCHECK,
|
AP::logger().Write_Error(LogErrorSubsystem::EKFCHECK,
|
||||||
LogErrorCode::EKFCHECK_VARIANCE_CLEARED);
|
LogErrorCode::EKFCHECK_VARIANCE_CLEARED);
|
||||||
// clear failsafe
|
// clear failsafe
|
||||||
@ -181,7 +180,6 @@ void Rover::failsafe_ekf_off_event(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear flag and log recovery
|
|
||||||
failsafe.ekf = false;
|
failsafe.ekf = false;
|
||||||
AP::logger().Write_Error(LogErrorSubsystem::FAILSAFE_EKFINAV,
|
AP::logger().Write_Error(LogErrorSubsystem::FAILSAFE_EKFINAV,
|
||||||
LogErrorCode::FAILSAFE_RESOLVED);
|
LogErrorCode::FAILSAFE_RESOLVED);
|
||||||
|
@ -32,7 +32,7 @@ void Rover::failsafe_check()
|
|||||||
// we have gone at least 0.2 seconds since the main loop
|
// we have gone at least 0.2 seconds since the main loop
|
||||||
// ran. That means we're in trouble, or perhaps are in
|
// ran. That means we're in trouble, or perhaps are in
|
||||||
// an initialisation routine or log erase. disarm the motors
|
// an initialisation routine or log erase. disarm the motors
|
||||||
// To-Do: log error to dataflash
|
// To-Do: log error
|
||||||
if (arming.is_armed()) {
|
if (arming.is_armed()) {
|
||||||
// disarm motors
|
// disarm motors
|
||||||
disarm_motors();
|
disarm_motors();
|
||||||
|
@ -28,7 +28,6 @@ void Rover::fence_check()
|
|||||||
set_mode(mode_hold, MODE_REASON_FENCE_BREACH);
|
set_mode(mode_hold, MODE_REASON_FENCE_BREACH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// log an error in the dataflash
|
|
||||||
AP::logger().Write_Error(LogErrorSubsystem::FAILSAFE_FENCE, LogErrorCode(new_breaches));
|
AP::logger().Write_Error(LogErrorSubsystem::FAILSAFE_FENCE, LogErrorCode(new_breaches));
|
||||||
|
|
||||||
} else if (orig_breaches) {
|
} else if (orig_breaches) {
|
||||||
|
Loading…
Reference in New Issue
Block a user