Skip to content

Commit

Permalink
report devID in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
SalimTerryLi committed Sep 8, 2020
1 parent f21cc77 commit 8c479d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/drivers/adc/ADS1115/ads1115_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@
#include <drivers/drv_adc.h>

ADS1115::ADS1115(I2CSPIBusOption bus_option, int bus, int addr, int bus_frequency) :
I2C(MODULE_NAME, nullptr, bus, addr, bus_frequency),
I2C(DRV_ADC_DEVTYPE_ADS1115, nullptr, bus, addr, bus_frequency),
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus, addr),
_cycle_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": single-sample"))
{
set_device_type(DRV_ADC_DEVTYPE_ADS1115);

_adc_report.device_id = this->get_device_id();
_adc_report.resolution = 32768;
_adc_report.v_ref = 6.144f;
Expand Down

0 comments on commit 8c479d7

Please sign in to comment.