mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 14:08:45 -04:00
BattMon: example sketch reads from SMBus
This commit is contained in:
parent
aecc8aac1f
commit
3951e4d99b
@ -39,9 +39,11 @@ uint32_t timer;
|
||||
void setup() {
|
||||
hal.console->println("Battery monitor library test");
|
||||
|
||||
// set battery monitor to smbus
|
||||
battery_mon.set_monitoring(0, AP_BattMonitor::BattMonitor_TYPE_SMBUS);
|
||||
|
||||
// initialise the battery monitor
|
||||
battery_mon.init();
|
||||
battery_mon.set_monitoring(0, BattMonitor_TYPE_ANALOG_VOLTAGE_AND_CURRENT);
|
||||
|
||||
hal.scheduler->delay(1000);
|
||||
timer = hal.scheduler->millis();
|
||||
|
Loading…
Reference in New Issue
Block a user