diff --git a/AntennaTracker/Parameters.cpp b/AntennaTracker/Parameters.cpp index 5dd419ea6c..4283d49030 100644 --- a/AntennaTracker/Parameters.cpp +++ b/AntennaTracker/Parameters.cpp @@ -270,8 +270,8 @@ const AP_Param::Info Tracker::var_info[] = { // @Param: LOG_BITMASK // @DisplayName: Log bitmask // @Description: 4 byte bitmap of log types to enable - // @Values: 63:Default,0:Disabled - // @Bitmask: 0:ATTITUDE,1:GPS,2:RCIN,3:IMU,4:RCOUT,5:COMPASS + // @Values: 127:Default,0:Disabled + // @Bitmask: 0:ATTITUDE,1:GPS,2:RCIN,3:IMU,4:RCOUT,5:COMPASS,6:Battery // @User: Standard GSCALAR(log_bitmask, "LOG_BITMASK", DEFAULT_LOG_BITMASK), @@ -385,6 +385,9 @@ const AP_Param::Info Tracker::var_info[] = { // @User: Advanced GSCALAR(command_total, "CMD_TOTAL", 0), + // @Group: BATT + // @Path: ../libraries/AP_BattMonitor/AP_BattMonitor.cpp + GOBJECT(battery, "BATT", AP_BattMonitor), AP_VAREND }; diff --git a/AntennaTracker/Parameters.h b/AntennaTracker/Parameters.h index d001cc3a66..c7a7ee68bb 100644 --- a/AntennaTracker/Parameters.h +++ b/AntennaTracker/Parameters.h @@ -93,6 +93,7 @@ public: k_param_log_bitmask, // 140 k_param_notify, k_param_BoardConfig_CAN, + k_param_battery, // // 150: Telemetry control diff --git a/AntennaTracker/Tracker.h b/AntennaTracker/Tracker.h index 9b3ad9d6de..936046c8d7 100644 --- a/AntennaTracker/Tracker.h +++ b/AntennaTracker/Tracker.h @@ -151,7 +151,7 @@ private: #endif // Battery Sensors - AP_BattMonitor battery; + AP_BattMonitor battery{MASK_LOG_CURRENT}; struct Location current_loc; diff --git a/AntennaTracker/config.h b/AntennaTracker/config.h index a788c9f85e..764040fb72 100644 --- a/AntennaTracker/config.h +++ b/AntennaTracker/config.h @@ -76,5 +76,6 @@ MASK_LOG_RCIN | \ MASK_LOG_IMU | \ MASK_LOG_RCOUT | \ - MASK_LOG_COMPASS + MASK_LOG_COMPASS | \ + MASK_LOG_CURRENT #endif diff --git a/AntennaTracker/defines.h b/AntennaTracker/defines.h index f614cf815c..6f9dc67ec2 100644 --- a/AntennaTracker/defines.h +++ b/AntennaTracker/defines.h @@ -40,6 +40,7 @@ enum AltSource { #define MASK_LOG_IMU (1<<3) #define MASK_LOG_RCOUT (1<<4) #define MASK_LOG_COMPASS (1<<5) +#define MASK_LOG_CURRENT (1<<6) #define MASK_LOG_ANY 0xFFFF // Logging messages