From 99d1e2534b170d0789d937403156ab0007822f74 Mon Sep 17 00:00:00 2001 From: popoviciri Date: Thu, 15 Aug 2019 21:41:21 +0200 Subject: [PATCH] patch motion with mmal updates for greyworld AWB mode motion could use a full upgrade of the mmal lib. Tried the last userland files but got stuck at some point. Compiling error I couldn't fix. Will be waiting for someone capable of doing this. --- .../motion/0001-enable-awb-greyworld.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/motion/0001-enable-awb-greyworld.patch diff --git a/package/motion/0001-enable-awb-greyworld.patch b/package/motion/0001-enable-awb-greyworld.patch new file mode 100644 index 0000000000..1fcb219f69 --- /dev/null +++ b/package/motion/0001-enable-awb-greyworld.patch @@ -0,0 +1,35 @@ +diff --git a/raspicam/RaspiCamControl.c b/raspicam/RaspiCamControl.c +index 073d657..ad0e405 100644 +--- a/raspicam/RaspiCamControl.c ++++ b/raspicam/RaspiCamControl.c +@@ -73,7 +73,8 @@ static XREF_T awb_map[] = + {"fluorescent", MMAL_PARAM_AWBMODE_FLUORESCENT}, + {"incandescent", MMAL_PARAM_AWBMODE_INCANDESCENT}, + {"flash", MMAL_PARAM_AWBMODE_FLASH}, +- {"horizon", MMAL_PARAM_AWBMODE_HORIZON} ++ {"horizon", MMAL_PARAM_AWBMODE_HORIZON}, ++ {"greyworld", MMAL_PARAM_AWBMODE_GREYWORLD} + }; + + static const int awb_map_size = sizeof(awb_map) / sizeof(awb_map[0]); +@@ -1196,6 +1197,7 @@ int raspicamcontrol_set_exposure_mode(MMAL_COMPONENT_T *camera, MMAL_PARAM_EXPOS + * - MMAL_PARAM_AWBMODE_INCANDESCENT, + * - MMAL_PARAM_AWBMODE_FLASH, + * - MMAL_PARAM_AWBMODE_HORIZON, ++ * - MMAL_PARAM_AWBMODE_GREYWORLD, + * @return 0 if successful, non-zero if any parameters out of range + */ + int raspicamcontrol_set_awb_mode(MMAL_COMPONENT_T *camera, MMAL_PARAM_AWBMODE_T awb_mode) +diff --git a/raspicam/RaspiCamControl.h b/raspicam/RaspiCamControl.h +index f4c189a..e7a847f 100644 +--- a/raspicam/RaspiCamControl.h ++++ b/raspicam/RaspiCamControl.h +@@ -57,6 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + MMAL_PARAM_AWBMODE_INCANDESCENT, + MMAL_PARAM_AWBMODE_FLASH, + MMAL_PARAM_AWBMODE_HORIZON, ++ MMAL_PARAM_AWBMODE_GREYWORLD, + * + * Image FX + MMAL_PARAM_IMAGEFX_NONE, +