Browse Source

AP_HAL_PX4: use init() method without arguments

Override the init() method from parent class that doesn't have a
parameter since it's not used here.
master
Lucas De Marchi 9 years ago
parent
commit
0c3733601b
  1. 2
      libraries/AP_HAL_PX4/AnalogIn.cpp
  2. 2
      libraries/AP_HAL_PX4/AnalogIn.h
  3. 8
      libraries/AP_HAL_PX4/HAL_PX4_Class.cpp
  4. 2
      libraries/AP_HAL_PX4/RCInput.cpp
  5. 2
      libraries/AP_HAL_PX4/RCInput.h
  6. 2
      libraries/AP_HAL_PX4/RCOutput.cpp
  7. 2
      libraries/AP_HAL_PX4/RCOutput.h
  8. 2
      libraries/AP_HAL_PX4/Scheduler.cpp
  9. 2
      libraries/AP_HAL_PX4/Scheduler.h
  10. 2
      libraries/AP_HAL_PX4/Storage.h

2
libraries/AP_HAL_PX4/AnalogIn.cpp

@ -198,7 +198,7 @@ PX4AnalogIn::PX4AnalogIn() :
_power_flags(0) _power_flags(0)
{} {}
void PX4AnalogIn::init(void* machtnichts) void PX4AnalogIn::init()
{ {
_adc_fd = open(ADC0_DEVICE_PATH, O_RDONLY | O_NONBLOCK); _adc_fd = open(ADC0_DEVICE_PATH, O_RDONLY | O_NONBLOCK);
if (_adc_fd == -1) { if (_adc_fd == -1) {

2
libraries/AP_HAL_PX4/AnalogIn.h

@ -55,7 +55,7 @@ private:
class PX4::PX4AnalogIn : public AP_HAL::AnalogIn { class PX4::PX4AnalogIn : public AP_HAL::AnalogIn {
public: public:
PX4AnalogIn(); PX4AnalogIn();
void init(void* implspecific); void init();
AP_HAL::AnalogSource* channel(int16_t pin); AP_HAL::AnalogSource* channel(int16_t pin);
void _timer_tick(void); void _timer_tick(void);
float board_voltage(void) { return _board_voltage; } float board_voltage(void) { return _board_voltage; }

8
libraries/AP_HAL_PX4/HAL_PX4_Class.cpp

@ -123,10 +123,10 @@ static int main_loop(int argc, char **argv)
hal.uartC->begin(57600); hal.uartC->begin(57600);
hal.uartD->begin(57600); hal.uartD->begin(57600);
hal.uartE->begin(57600); hal.uartE->begin(57600);
hal.scheduler->init(NULL); hal.scheduler->init();
hal.rcin->init(NULL); hal.rcin->init();
hal.rcout->init(NULL); hal.rcout->init();
hal.analogin->init(NULL); hal.analogin->init();
hal.gpio->init(); hal.gpio->init();

2
libraries/AP_HAL_PX4/RCInput.cpp

@ -12,7 +12,7 @@ using namespace PX4;
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;
void PX4RCInput::init(void* unused) void PX4RCInput::init()
{ {
_perf_rcin = perf_alloc(PC_ELAPSED, "APM_rcin"); _perf_rcin = perf_alloc(PC_ELAPSED, "APM_rcin");
_rc_sub = orb_subscribe(ORB_ID(input_rc)); _rc_sub = orb_subscribe(ORB_ID(input_rc));

2
libraries/AP_HAL_PX4/RCInput.h

@ -14,7 +14,7 @@
class PX4::PX4RCInput : public AP_HAL::RCInput { class PX4::PX4RCInput : public AP_HAL::RCInput {
public: public:
void init(void* machtnichts); void init();
bool new_input(); bool new_input();
uint8_t num_channels(); uint8_t num_channels();
uint16_t read(uint8_t ch); uint16_t read(uint8_t ch);

2
libraries/AP_HAL_PX4/RCOutput.cpp

@ -18,7 +18,7 @@ extern const AP_HAL::HAL& hal;
using namespace PX4; using namespace PX4;
void PX4RCOutput::init(void* unused) void PX4RCOutput::init()
{ {
_perf_rcout = perf_alloc(PC_ELAPSED, "APM_rcout"); _perf_rcout = perf_alloc(PC_ELAPSED, "APM_rcout");
_pwm_fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR); _pwm_fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR);

2
libraries/AP_HAL_PX4/RCOutput.h

@ -12,7 +12,7 @@
class PX4::PX4RCOutput : public AP_HAL::RCOutput class PX4::PX4RCOutput : public AP_HAL::RCOutput
{ {
public: public:
void init(void* machtnichts); void init();
void set_freq(uint32_t chmask, uint16_t freq_hz); void set_freq(uint32_t chmask, uint16_t freq_hz);
uint16_t get_freq(uint8_t ch); uint16_t get_freq(uint8_t ch);
void enable_ch(uint8_t ch); void enable_ch(uint8_t ch);

2
libraries/AP_HAL_PX4/Scheduler.cpp

@ -37,7 +37,7 @@ PX4Scheduler::PX4Scheduler() :
_perf_delay(perf_alloc(PC_ELAPSED, "APM_delay")) _perf_delay(perf_alloc(PC_ELAPSED, "APM_delay"))
{} {}
void PX4Scheduler::init(void *unused) void PX4Scheduler::init()
{ {
_main_task_pid = getpid(); _main_task_pid = getpid();

2
libraries/AP_HAL_PX4/Scheduler.h

@ -45,7 +45,7 @@ public:
PX4Scheduler(); PX4Scheduler();
/* AP_HAL::Scheduler methods */ /* AP_HAL::Scheduler methods */
void init(void *unused); void init();
void delay(uint16_t ms); void delay(uint16_t ms);
void delay_microseconds(uint16_t us); void delay_microseconds(uint16_t us);
void delay_microseconds_boost(uint16_t us); void delay_microseconds_boost(uint16_t us);

2
libraries/AP_HAL_PX4/Storage.h

@ -17,7 +17,7 @@ class PX4::PX4Storage : public AP_HAL::Storage {
public: public:
PX4Storage(); PX4Storage();
void init(void* machtnichts) {} void init() {}
void read_block(void *dst, uint16_t src, size_t n); void read_block(void *dst, uint16_t src, size_t n);
void write_block(uint16_t dst, const void* src, size_t n); void write_block(uint16_t dst, const void* src, size_t n);

Loading…
Cancel
Save