From 6f5497cac37a2b3444a8c4e55eba1683000d7888 Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Mon, 11 Feb 2019 00:10:43 -0800 Subject: [PATCH] Rover: rename dataflash to logger --- APMrover2/Parameters.cpp | 2 +- APMrover2/config.h | 2 +- APMrover2/crash_check.cpp | 1 - APMrover2/ekf_check.cpp | 4 +--- APMrover2/failsafe.cpp | 2 +- APMrover2/fence.cpp | 1 - 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/APMrover2/Parameters.cpp b/APMrover2/Parameters.cpp index 2694cc1f14..e1bed1fb11 100644 --- a/APMrover2/Parameters.cpp +++ b/APMrover2/Parameters.cpp @@ -18,7 +18,7 @@ const AP_Param::Info Rover::var_info[] = { // @Param: 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 // @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 diff --git a/APMrover2/config.h b/APMrover2/config.h index 89b8e0c212..876dcef228 100644 --- a/APMrover2/config.h +++ b/APMrover2/config.h @@ -145,7 +145,7 @@ #endif ////////////////////////////////////////////////////////////////////////////// -// Dataflash logging control +// Logging control // #ifndef LOGGING_ENABLED #define LOGGING_ENABLED ENABLED diff --git a/APMrover2/crash_check.cpp b/APMrover2/crash_check.cpp index e0113819e9..e4d378efe3 100644 --- a/APMrover2/crash_check.cpp +++ b/APMrover2/crash_check.cpp @@ -45,7 +45,6 @@ void Rover::crash_check() } if (crashed) { - // log an error in the dataflash AP::logger().Write_Error(LogErrorSubsystem::CRASH_CHECK, LogErrorCode::CRASH_CHECK_CRASH); diff --git a/APMrover2/ekf_check.cpp b/APMrover2/ekf_check.cpp index 4b51b7c5ec..16287908aa 100644 --- a/APMrover2/ekf_check.cpp +++ b/APMrover2/ekf_check.cpp @@ -52,7 +52,7 @@ void Rover::ekf_check() // limit count from climbing too high ekf_check_state.fail_count = EKF_CHECK_ITERATIONS_MAX; ekf_check_state.bad_variance = true; - // log an error in the dataflash + AP::logger().Write_Error(LogErrorSubsystem::EKFCHECK, LogErrorCode::EKFCHECK_BAD_VARIANCE); // 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 (ekf_check_state.bad_variance && ekf_check_state.fail_count == 0) { ekf_check_state.bad_variance = false; - // log recovery in the dataflash AP::logger().Write_Error(LogErrorSubsystem::EKFCHECK, LogErrorCode::EKFCHECK_VARIANCE_CLEARED); // clear failsafe @@ -181,7 +180,6 @@ void Rover::failsafe_ekf_off_event(void) return; } - // clear flag and log recovery failsafe.ekf = false; AP::logger().Write_Error(LogErrorSubsystem::FAILSAFE_EKFINAV, LogErrorCode::FAILSAFE_RESOLVED); diff --git a/APMrover2/failsafe.cpp b/APMrover2/failsafe.cpp index ff9d294b66..d367f4dae6 100644 --- a/APMrover2/failsafe.cpp +++ b/APMrover2/failsafe.cpp @@ -32,7 +32,7 @@ void Rover::failsafe_check() // we have gone at least 0.2 seconds since the main loop // ran. That means we're in trouble, or perhaps are in // an initialisation routine or log erase. disarm the motors - // To-Do: log error to dataflash + // To-Do: log error if (arming.is_armed()) { // disarm motors disarm_motors(); diff --git a/APMrover2/fence.cpp b/APMrover2/fence.cpp index c858435a7a..792ed75f16 100644 --- a/APMrover2/fence.cpp +++ b/APMrover2/fence.cpp @@ -28,7 +28,6 @@ void Rover::fence_check() set_mode(mode_hold, MODE_REASON_FENCE_BREACH); } } - // log an error in the dataflash AP::logger().Write_Error(LogErrorSubsystem::FAILSAFE_FENCE, LogErrorCode(new_breaches)); } else if (orig_breaches) {