mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_BattMonitor: add and use an AP_BattMonitor_Config.h
This commit is contained in:
parent
3e0ca818a3
commit
6b088c6a83
@ -6,6 +6,7 @@
|
||||
#include <AP_TemperatureSensor/AP_TemperatureSensor_config.h>
|
||||
#include <GCS_MAVLink/GCS_MAVLink.h>
|
||||
#include "AP_BattMonitor_Params.h"
|
||||
#include "AP_BattMonitor_config.h"
|
||||
|
||||
// maximum number of battery monitors
|
||||
#ifndef AP_BATT_MONITOR_MAX_INSTANCES
|
||||
@ -28,26 +29,6 @@
|
||||
#define AP_BATT_MONITOR_CELLS_MAX 12
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_SMBUS_ENABLE
|
||||
#define AP_BATTMON_SMBUS_ENABLE 1
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_FUELFLOW_ENABLE
|
||||
#define AP_BATTMON_FUELFLOW_ENABLE (BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_FUELLEVEL_PWM_ENABLE
|
||||
#define AP_BATTMON_FUELLEVEL_PWM_ENABLE (BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_FUELLEVEL_ANALOG_ENABLE
|
||||
#define AP_BATTMON_FUELLEVEL_ANALOG_ENABLE (BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_SYNTHETIC_CURRENT_ENABLED
|
||||
#define AP_BATTMON_SYNTHETIC_CURRENT_ENABLED 1
|
||||
#endif
|
||||
|
||||
// declare backend class
|
||||
class AP_BattMonitor_Backend;
|
||||
class AP_BattMonitor_Analog;
|
||||
|
22
libraries/AP_BattMonitor/AP_BattMonitor_config.h
Normal file
22
libraries/AP_BattMonitor/AP_BattMonitor_config.h
Normal file
@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef AP_BATTMON_SMBUS_ENABLE
|
||||
#define AP_BATTMON_SMBUS_ENABLE 1
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_FUELFLOW_ENABLE
|
||||
#define AP_BATTMON_FUELFLOW_ENABLE (BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_FUELLEVEL_PWM_ENABLE
|
||||
#define AP_BATTMON_FUELLEVEL_PWM_ENABLE (BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_FUELLEVEL_ANALOG_ENABLE
|
||||
#define AP_BATTMON_FUELLEVEL_ANALOG_ENABLE (BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
|
||||
#ifndef AP_BATTMON_SYNTHETIC_CURRENT_ENABLED
|
||||
#define AP_BATTMON_SYNTHETIC_CURRENT_ENABLED 1
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user