added setup method to constructor of camera interfaces

Conflicts:
	PX4/src/drivers/camera_trigger/interfaces/src/pwm.cpp
This commit is contained in:
Kelly Steich
2016-06-17 22:39:02 +02:00
committed by Lorenz Meier
parent adffb85962
commit 2ec1e508d2
5 changed files with 11 additions and 9 deletions
@@ -18,11 +18,6 @@ public:
*/ */
virtual ~CameraInterface(); virtual ~CameraInterface();
/**
* setup the interface
*/
virtual void setup() {};
/** /**
* trigger the camera * trigger the camera
* @param trigger: * @param trigger:
@@ -50,5 +45,9 @@ public:
protected: protected:
/**
* setup the interface
*/
virtual void setup() {};
}; };
@@ -33,6 +33,7 @@ CameraInterfacePWM::CameraInterfacePWM():
pin_list /= 10; pin_list /= 10;
i++; i++;
} }
setup();
} }
CameraInterfacePWM::~CameraInterfacePWM() CameraInterfacePWM::~CameraInterfacePWM()
@@ -31,8 +31,6 @@ public:
CameraInterfacePWM(); CameraInterfacePWM();
virtual ~CameraInterfacePWM(); virtual ~CameraInterfacePWM();
void setup();
void trigger(bool enable); void trigger(bool enable);
int powerOn(); int powerOn();
@@ -40,6 +38,7 @@ public:
int _pins[6]; int _pins[6];
private: private:
void setup();
int _vehicle_status_sub; int _vehicle_status_sub;
struct vehicle_status_s _vehicle_status; struct vehicle_status_s _vehicle_status;
@@ -34,6 +34,8 @@ CameraInterfaceRelay::CameraInterfaceRelay():
pin_list /= 10; pin_list /= 10;
i++; i++;
} }
setup();
} }
CameraInterfaceRelay::~CameraInterfaceRelay() CameraInterfaceRelay::~CameraInterfaceRelay()
@@ -19,8 +19,6 @@ public:
CameraInterfaceRelay(); CameraInterfaceRelay();
virtual ~CameraInterfaceRelay(); virtual ~CameraInterfaceRelay();
void setup();
void trigger(bool enable); void trigger(bool enable);
void info(); void info();
@@ -29,6 +27,9 @@ public:
int _polarity; int _polarity;
private: private:
void setup();
param_t _p_pin; param_t _p_pin;
param_t _p_polarity; param_t _p_polarity;