mirror of https://github.com/ArduPilot/ardupilot
Tracker: Show battery parameters, support battery logging
This commit is contained in:
parent
02a660e0ce
commit
8094198767
|
@ -270,8 +270,8 @@ const AP_Param::Info Tracker::var_info[] = {
|
||||||
// @Param: LOG_BITMASK
|
// @Param: LOG_BITMASK
|
||||||
// @DisplayName: Log bitmask
|
// @DisplayName: Log bitmask
|
||||||
// @Description: 4 byte bitmap of log types to enable
|
// @Description: 4 byte bitmap of log types to enable
|
||||||
// @Values: 63:Default,0:Disabled
|
// @Values: 127:Default,0:Disabled
|
||||||
// @Bitmask: 0:ATTITUDE,1:GPS,2:RCIN,3:IMU,4:RCOUT,5:COMPASS
|
// @Bitmask: 0:ATTITUDE,1:GPS,2:RCIN,3:IMU,4:RCOUT,5:COMPASS,6:Battery
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
GSCALAR(log_bitmask, "LOG_BITMASK", DEFAULT_LOG_BITMASK),
|
GSCALAR(log_bitmask, "LOG_BITMASK", DEFAULT_LOG_BITMASK),
|
||||||
|
|
||||||
|
@ -385,6 +385,9 @@ const AP_Param::Info Tracker::var_info[] = {
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
GSCALAR(command_total, "CMD_TOTAL", 0),
|
GSCALAR(command_total, "CMD_TOTAL", 0),
|
||||||
|
|
||||||
|
// @Group: BATT
|
||||||
|
// @Path: ../libraries/AP_BattMonitor/AP_BattMonitor.cpp
|
||||||
|
GOBJECT(battery, "BATT", AP_BattMonitor),
|
||||||
|
|
||||||
AP_VAREND
|
AP_VAREND
|
||||||
};
|
};
|
||||||
|
|
|
@ -93,6 +93,7 @@ public:
|
||||||
k_param_log_bitmask, // 140
|
k_param_log_bitmask, // 140
|
||||||
k_param_notify,
|
k_param_notify,
|
||||||
k_param_BoardConfig_CAN,
|
k_param_BoardConfig_CAN,
|
||||||
|
k_param_battery,
|
||||||
|
|
||||||
//
|
//
|
||||||
// 150: Telemetry control
|
// 150: Telemetry control
|
||||||
|
|
|
@ -151,7 +151,7 @@ private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Battery Sensors
|
// Battery Sensors
|
||||||
AP_BattMonitor battery;
|
AP_BattMonitor battery{MASK_LOG_CURRENT};
|
||||||
|
|
||||||
struct Location current_loc;
|
struct Location current_loc;
|
||||||
|
|
||||||
|
|
|
@ -76,5 +76,6 @@
|
||||||
MASK_LOG_RCIN | \
|
MASK_LOG_RCIN | \
|
||||||
MASK_LOG_IMU | \
|
MASK_LOG_IMU | \
|
||||||
MASK_LOG_RCOUT | \
|
MASK_LOG_RCOUT | \
|
||||||
MASK_LOG_COMPASS
|
MASK_LOG_COMPASS | \
|
||||||
|
MASK_LOG_CURRENT
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,6 +40,7 @@ enum AltSource {
|
||||||
#define MASK_LOG_IMU (1<<3)
|
#define MASK_LOG_IMU (1<<3)
|
||||||
#define MASK_LOG_RCOUT (1<<4)
|
#define MASK_LOG_RCOUT (1<<4)
|
||||||
#define MASK_LOG_COMPASS (1<<5)
|
#define MASK_LOG_COMPASS (1<<5)
|
||||||
|
#define MASK_LOG_CURRENT (1<<6)
|
||||||
#define MASK_LOG_ANY 0xFFFF
|
#define MASK_LOG_ANY 0xFFFF
|
||||||
|
|
||||||
// Logging messages
|
// Logging messages
|
||||||
|
|
Loading…
Reference in New Issue