Browse Source

AP_BattMonitor: replace header guard with pragma once

mission-4.1.18
Lucas De Marchi 9 years ago
parent
commit
62f50aede7
  1. 4
      libraries/AP_BattMonitor/AP_BattMonitor.h
  2. 4
      libraries/AP_BattMonitor/AP_BattMonitor_Analog.h
  3. 5
      libraries/AP_BattMonitor/AP_BattMonitor_Backend.h
  4. 5
      libraries/AP_BattMonitor/AP_BattMonitor_Bebop.h
  5. 5
      libraries/AP_BattMonitor/AP_BattMonitor_SMBus.h
  6. 5
      libraries/AP_BattMonitor/AP_BattMonitor_SMBus_I2C.h
  7. 5
      libraries/AP_BattMonitor/AP_BattMonitor_SMBus_PX4.h

4
libraries/AP_BattMonitor/AP_BattMonitor.h

@ -1,6 +1,5 @@ @@ -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: @@ -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

4
libraries/AP_BattMonitor/AP_BattMonitor_Analog.h

@ -1,6 +1,5 @@ @@ -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: @@ -97,4 +96,3 @@ protected:
AP_HAL::AnalogSource *_volt_pin_analog_source;
AP_HAL::AnalogSource *_curr_pin_analog_source;
};
#endif // AP_BATTMONITOR_ANALOG_H

5
libraries/AP_BattMonitor/AP_BattMonitor_Backend.h

@ -13,9 +13,7 @@ @@ -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: @@ -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__

5
libraries/AP_BattMonitor/AP_BattMonitor_Bebop.h

@ -13,9 +13,7 @@ @@ -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: @@ -48,4 +46,3 @@ private:
float _filter_voltage(float vbat_raw);
float _compute_battery_percentage(float vbat);
};
#endif // __AP_BATTMONITOR_BEBOP_H__

5
libraries/AP_BattMonitor/AP_BattMonitor_SMBus.h

@ -1,6 +1,5 @@ @@ -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: @@ -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

5
libraries/AP_BattMonitor/AP_BattMonitor_SMBus_I2C.h

@ -1,6 +1,5 @@ @@ -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: @@ -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

5
libraries/AP_BattMonitor/AP_BattMonitor_SMBus_PX4.h

@ -15,8 +15,7 @@ @@ -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: @@ -40,5 +39,3 @@ private:
int _batt_fd; // file descriptor
bool _capacity_updated; // capacity info read
};
#endif // AP_BATTMONITOR_SMBUS_PX4_H

Loading…
Cancel
Save