From 31e4f8ab4fabf45198832e731cc90f524aab0732 Mon Sep 17 00:00:00 2001 From: Anders Hoglund Date: Sat, 7 Oct 2017 00:07:53 +0200 Subject: [PATCH] Camera control. Added forced OSD timeout so camera menues are alone on display. --- src/main/drivers/camera_control.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/drivers/camera_control.c b/src/main/drivers/camera_control.c index 50d68e818a..596e89b372 100644 --- a/src/main/drivers/camera_control.c +++ b/src/main/drivers/camera_control.c @@ -56,6 +56,9 @@ #define CAMERA_CONTROL_PIN NONE #endif +#ifdef OSD +#include "io/osd.h" +#endif PG_REGISTER_WITH_RESET_TEMPLATE(cameraControlConfig_t, cameraControlConfig, PG_CAMERA_CONTROL_CONFIG, 0); @@ -190,6 +193,11 @@ void cameraControlKeyPress(cameraControlKey_e key, uint32_t holdDurationMs) (void) holdDurationMs; #endif +#ifdef OSD + // Force OSD timeout so we are alone on the display. + resumeRefreshAt = 0; +#endif + if (CAMERA_CONTROL_MODE_HARDWARE_PWM == cameraControlConfig()->mode) { #ifdef CAMERA_CONTROL_HARDWARE_PWM_AVAILABLE *cameraControlRuntime.channel.ccr = lrintf(dutyCycle * cameraControlRuntime.period);