mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_ADC: ADS1115: coding style fixes
- Clean trailing whitespaces - Fix switch - Use pragma once
This commit is contained in:
parent
c1d19fa4dc
commit
4562c0cffc
@ -88,15 +88,14 @@
|
|||||||
#define error(fmt, args ...)
|
#define error(fmt, args ...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const AP_HAL::HAL& hal;
|
extern const AP_HAL::HAL &hal;
|
||||||
|
|
||||||
#define ADS1115_CHANNELS_COUNT 6
|
#define ADS1115_CHANNELS_COUNT 6
|
||||||
|
|
||||||
const uint8_t AP_ADC_ADS1115::_channels_number = ADS1115_CHANNELS_COUNT;
|
const uint8_t AP_ADC_ADS1115::_channels_number = ADS1115_CHANNELS_COUNT;
|
||||||
|
|
||||||
/* Only two differential channels used */
|
/* Only two differential channels used */
|
||||||
static const uint16_t mux_table[ADS1115_CHANNELS_COUNT] =
|
static const uint16_t mux_table[ADS1115_CHANNELS_COUNT] = {
|
||||||
{
|
|
||||||
ADS1115_MUX_P1_N3,
|
ADS1115_MUX_P1_N3,
|
||||||
ADS1115_MUX_P2_N3,
|
ADS1115_MUX_P2_N3,
|
||||||
ADS1115_MUX_P0_NG,
|
ADS1115_MUX_P0_NG,
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||||
#ifndef __AP_ADC_ADS1115_H__
|
#pragma once
|
||||||
#define __AP_ADC_ADS1115_H__
|
|
||||||
|
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "AP_ADC.h"
|
#include "AP_ADC.h"
|
||||||
@ -43,5 +41,3 @@ private:
|
|||||||
|
|
||||||
float _convert_register_data_to_mv(int16_t word) const;
|
float _convert_register_data_to_mv(int16_t word) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user