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.
This commit is contained in:
Lucas De Marchi 2015-12-02 13:14:20 -02:00
parent 2439826c19
commit 0c3733601b
10 changed files with 13 additions and 13 deletions

View File

@ -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) {

View File

@ -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; }

View File

@ -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();

View File

@ -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));

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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);