mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 17:07:34 +08:00
added setup method to constructor of camera interfaces
Conflicts: PX4/src/drivers/camera_trigger/interfaces/src/pwm.cpp
This commit is contained in:
committed by
Lorenz Meier
parent
adffb85962
commit
2ec1e508d2
@@ -18,11 +18,6 @@ public:
|
||||
*/
|
||||
virtual ~CameraInterface();
|
||||
|
||||
/**
|
||||
* setup the interface
|
||||
*/
|
||||
virtual void setup() {};
|
||||
|
||||
/**
|
||||
* trigger the camera
|
||||
* @param trigger:
|
||||
@@ -50,5 +45,9 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* setup the interface
|
||||
*/
|
||||
virtual void setup() {};
|
||||
|
||||
};
|
||||
|
||||
@@ -33,6 +33,7 @@ CameraInterfacePWM::CameraInterfacePWM():
|
||||
pin_list /= 10;
|
||||
i++;
|
||||
}
|
||||
setup();
|
||||
}
|
||||
|
||||
CameraInterfacePWM::~CameraInterfacePWM()
|
||||
|
||||
@@ -31,8 +31,6 @@ public:
|
||||
CameraInterfacePWM();
|
||||
virtual ~CameraInterfacePWM();
|
||||
|
||||
void setup();
|
||||
|
||||
void trigger(bool enable);
|
||||
|
||||
int powerOn();
|
||||
@@ -40,6 +38,7 @@ public:
|
||||
|
||||
int _pins[6];
|
||||
private:
|
||||
void setup();
|
||||
|
||||
int _vehicle_status_sub;
|
||||
struct vehicle_status_s _vehicle_status;
|
||||
|
||||
@@ -34,6 +34,8 @@ CameraInterfaceRelay::CameraInterfaceRelay():
|
||||
pin_list /= 10;
|
||||
i++;
|
||||
}
|
||||
|
||||
setup();
|
||||
}
|
||||
|
||||
CameraInterfaceRelay::~CameraInterfaceRelay()
|
||||
|
||||
@@ -19,8 +19,6 @@ public:
|
||||
CameraInterfaceRelay();
|
||||
virtual ~CameraInterfaceRelay();
|
||||
|
||||
void setup();
|
||||
|
||||
void trigger(bool enable);
|
||||
|
||||
void info();
|
||||
@@ -29,6 +27,9 @@ public:
|
||||
int _polarity;
|
||||
|
||||
private:
|
||||
|
||||
void setup();
|
||||
|
||||
param_t _p_pin;
|
||||
param_t _p_polarity;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user