mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_BattMonitor: replace header guard with pragma once
This commit is contained in:
parent
6623246cf5
commit
62f50aede7
@ -1,6 +1,5 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
#ifndef AP_BATTMONITOR_H
|
||||
#define AP_BATTMONITOR_H
|
||||
#pragma once
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
@ -126,4 +125,3 @@ private:
|
||||
AP_BattMonitor_Backend *drivers[AP_BATT_MONITOR_MAX_INSTANCES];
|
||||
uint8_t _num_instances; /// number of monitors
|
||||
};
|
||||
#endif // AP_BATTMONITOR_H
|
||||
|
@ -1,6 +1,5 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
#ifndef AP_BATTMONITOR_ANALOG_H
|
||||
#define AP_BATTMONITOR_ANALOG_H
|
||||
#pragma once
|
||||
|
||||
#include <AP_ADC/AP_ADC.h> // ArduPilot Mega Analog to Digital Converter Library
|
||||
#include "AP_BattMonitor.h"
|
||||
@ -97,4 +96,3 @@ protected:
|
||||
AP_HAL::AnalogSource *_volt_pin_analog_source;
|
||||
AP_HAL::AnalogSource *_curr_pin_analog_source;
|
||||
};
|
||||
#endif // AP_BATTMONITOR_ANALOG_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __AP_BATTMONITOR_BACKEND_H__
|
||||
#define __AP_BATTMONITOR_BACKEND_H__
|
||||
#pragma once
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
@ -48,4 +46,3 @@ protected:
|
||||
AP_BattMonitor::BattMonitor_State &_state; // reference to this instances state (held in the front-end)
|
||||
uint8_t _instance; // this instance
|
||||
};
|
||||
#endif // __AP_BATTMONITOR_BACKEND_H__
|
||||
|
@ -13,9 +13,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __AP_BATTMONITOR_BEBOP_H__
|
||||
#define __AP_BATTMONITOR_BEBOP_H__
|
||||
#pragma once
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
@ -48,4 +46,3 @@ private:
|
||||
float _filter_voltage(float vbat_raw);
|
||||
float _compute_battery_percentage(float vbat);
|
||||
};
|
||||
#endif // __AP_BATTMONITOR_BEBOP_H__
|
||||
|
@ -1,6 +1,5 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
#ifndef AP_BATTMONITOR_SMBUS_H
|
||||
#define AP_BATTMONITOR_SMBUS_H
|
||||
#pragma once
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
@ -26,5 +25,3 @@ public:
|
||||
// include specific implementations
|
||||
#include "AP_BattMonitor_SMBus_PX4.h"
|
||||
#include "AP_BattMonitor_SMBus_I2C.h"
|
||||
|
||||
#endif // AP_BATTMONITOR_SMBUS_H
|
||||
|
@ -1,6 +1,5 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
#ifndef AP_BATTMONITOR_SMBUS_I2C_H
|
||||
#define AP_BATTMONITOR_SMBUS_I2C_H
|
||||
#pragma once
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
@ -30,5 +29,3 @@ private:
|
||||
// buff is the data that was read or will be written
|
||||
uint8_t get_PEC(const uint8_t i2c_addr, uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len) const;
|
||||
};
|
||||
|
||||
#endif // AP_BATTMONITOR_SMBUS_I2C_H
|
||||
|
@ -15,8 +15,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef AP_BATTMONITOR_SMBUS_PX4_H
|
||||
#define AP_BATTMONITOR_SMBUS_PX4_H
|
||||
#pragma once
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_Param/AP_Param.h>
|
||||
@ -40,5 +39,3 @@ private:
|
||||
int _batt_fd; // file descriptor
|
||||
bool _capacity_updated; // capacity info read
|
||||
};
|
||||
|
||||
#endif // AP_BATTMONITOR_SMBUS_PX4_H
|
||||
|
Loading…
Reference in New Issue
Block a user