mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_HAL_Linux: AnalogIn_ADS1115: return 5V on board_voltage
board voltage is not available - don't return 0V since that prevents arming.
This commit is contained in:
parent
59135fc615
commit
47d2f8dc6d
@ -25,14 +25,13 @@ private:
|
||||
class AnalogIn_ADS1115: public AP_HAL::AnalogIn {
|
||||
public:
|
||||
AnalogIn_ADS1115();
|
||||
void init();
|
||||
AP_HAL::AnalogSource* channel(int16_t n);
|
||||
|
||||
void init() override;
|
||||
AP_HAL::AnalogSource *channel(int16_t n) override;
|
||||
|
||||
/* Board voltage is not available */
|
||||
float board_voltage(void)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
float board_voltage() override { return 5.0f; }
|
||||
|
||||
private:
|
||||
uint8_t _channels_number;
|
||||
void _update();
|
||||
|
Loading…
Reference in New Issue
Block a user