diff --git a/src/drivers/camera_trigger/interfaces/src/camera_interface.h b/src/drivers/camera_trigger/interfaces/src/camera_interface.h index f1dda66802..4e1fb511ce 100644 --- a/src/drivers/camera_trigger/interfaces/src/camera_interface.h +++ b/src/drivers/camera_trigger/interfaces/src/camera_interface.h @@ -27,7 +27,7 @@ public: * trigger the camera * @param enable */ - virtual void trigger(bool enable) {} + virtual void trigger(bool trigger_on_true) {} /** * send command to turn the camera on/off diff --git a/src/drivers/camera_trigger/interfaces/src/gpio.h b/src/drivers/camera_trigger/interfaces/src/gpio.h index d4d9cbf005..6582316c03 100644 --- a/src/drivers/camera_trigger/interfaces/src/gpio.h +++ b/src/drivers/camera_trigger/interfaces/src/gpio.h @@ -18,7 +18,7 @@ public: CameraInterfaceGPIO(); virtual ~CameraInterfaceGPIO(); - void trigger(bool enable); + void trigger(bool trigger_on_true); void info(); diff --git a/src/drivers/camera_trigger/interfaces/src/pwm.cpp b/src/drivers/camera_trigger/interfaces/src/pwm.cpp index 7d3a2ba2ff..04ca8f7251 100644 --- a/src/drivers/camera_trigger/interfaces/src/pwm.cpp +++ b/src/drivers/camera_trigger/interfaces/src/pwm.cpp @@ -46,12 +46,12 @@ void CameraInterfacePWM::setup() } -void CameraInterfacePWM::trigger(bool enable) +void CameraInterfacePWM::trigger(bool trigger_on_true) { for (unsigned i = 0; i < arraySize(_pins); i++) { if (_pins[i] >= 0) { // Set all valid pins to shoot or neutral levels - up_pwm_trigger_set(_pins[i], math::constrain(enable ? PWM_CAMERA_SHOOT : PWM_CAMERA_NEUTRAL, 1000, 2000)); + up_pwm_trigger_set(_pins[i], math::constrain(trigger_on_true ? PWM_CAMERA_SHOOT : PWM_CAMERA_NEUTRAL, 1000, 2000)); } } } diff --git a/src/drivers/camera_trigger/interfaces/src/pwm.h b/src/drivers/camera_trigger/interfaces/src/pwm.h index e008466756..5319f4f154 100644 --- a/src/drivers/camera_trigger/interfaces/src/pwm.h +++ b/src/drivers/camera_trigger/interfaces/src/pwm.h @@ -20,7 +20,7 @@ public: CameraInterfacePWM(); virtual ~CameraInterfacePWM(); - void trigger(bool enable); + void trigger(bool trigger_on_true); void info(); diff --git a/src/drivers/camera_trigger/interfaces/src/seagull_map2.cpp b/src/drivers/camera_trigger/interfaces/src/seagull_map2.cpp index be7e2e4fed..3d2dd54177 100644 --- a/src/drivers/camera_trigger/interfaces/src/seagull_map2.cpp +++ b/src/drivers/camera_trigger/interfaces/src/seagull_map2.cpp @@ -52,7 +52,7 @@ void CameraInterfaceSeagull::setup() PX4_ERR("Bad pin configuration - Seagull MAP2 requires 2 consecutive pins for control."); } -void CameraInterfaceSeagull::trigger(bool enable) +void CameraInterfaceSeagull::trigger(bool trigger_on_true) { if (!_camera_is_on) { @@ -62,7 +62,7 @@ void CameraInterfaceSeagull::trigger(bool enable) for (unsigned i = 0; i < arraySize(_pins); i = i + 2) { if (_pins[i] >= 0 && _pins[i + 1] >= 0) { // Set channel 1 to shoot or neutral levels - up_pwm_trigger_set(_pins[i + 1], enable ? PWM_1_CAMERA_INSTANT_SHOOT : PWM_CAMERA_NEUTRAL); + up_pwm_trigger_set(_pins[i + 1], trigger_on_true ? PWM_1_CAMERA_INSTANT_SHOOT : PWM_CAMERA_NEUTRAL); } } } diff --git a/src/drivers/camera_trigger/interfaces/src/seagull_map2.h b/src/drivers/camera_trigger/interfaces/src/seagull_map2.h index 6a7a5e4551..3c306c2155 100644 --- a/src/drivers/camera_trigger/interfaces/src/seagull_map2.h +++ b/src/drivers/camera_trigger/interfaces/src/seagull_map2.h @@ -18,7 +18,7 @@ public: CameraInterfaceSeagull(); virtual ~CameraInterfaceSeagull(); - void trigger(bool enable); + void trigger(bool trigger_on_true); void send_keep_alive(bool enable);