From 177df04d2b7f357ebe41f1a9809ab68b6f948082 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 27 Jul 2022 09:55:17 +0100 Subject: ipa: raspberrypi: Code refactoring to match style guidelines Refactor all the source files in src/ipa/raspberrypi/ to match the recommended formatting guidelines for the libcamera project. The vast majority of changes in this commit comprise of switching from snake_case to CamelCase, and starting class member functions with a lower case character. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/cam_helper_ov9281.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/ipa/raspberrypi/cam_helper_ov9281.cpp') diff --git a/src/ipa/raspberrypi/cam_helper_ov9281.cpp b/src/ipa/raspberrypi/cam_helper_ov9281.cpp index 9de868c3..130450af 100644 --- a/src/ipa/raspberrypi/cam_helper_ov9281.cpp +++ b/src/ipa/raspberrypi/cam_helper_ov9281.cpp @@ -15,10 +15,10 @@ class CamHelperOv9281 : public CamHelper { public: CamHelperOv9281(); - uint32_t GainCode(double gain) const override; - double Gain(uint32_t gain_code) const override; - void GetDelays(int &exposure_delay, int &gain_delay, - int &vblank_delay) const override; + uint32_t gainCode(double gain) const override; + double gain(uint32_t gainCode) const override; + void getDelays(int &exposureDelay, int &gainDelay, + int &vblankDelay) const override; private: /* @@ -38,28 +38,28 @@ CamHelperOv9281::CamHelperOv9281() { } -uint32_t CamHelperOv9281::GainCode(double gain) const +uint32_t CamHelperOv9281::gainCode(double gain) const { return static_cast(gain * 16.0); } -double CamHelperOv9281::Gain(uint32_t gain_code) const +double CamHelperOv9281::gain(uint32_t gainCode) const { - return static_cast(gain_code) / 16.0; + return static_cast(gainCode) / 16.0; } -void CamHelperOv9281::GetDelays(int &exposure_delay, int &gain_delay, - int &vblank_delay) const +void CamHelperOv9281::getDelays(int &exposureDelay, int &gainDelay, + int &vblankDelay) const { /* The driver appears to behave as follows: */ - exposure_delay = 2; - gain_delay = 2; - vblank_delay = 2; + exposureDelay = 2; + gainDelay = 2; + vblankDelay = 2; } -static CamHelper *Create() +static CamHelper *create() { return new CamHelperOv9281(); } -static RegisterCamHelper reg("ov9281", &Create); +static RegisterCamHelper reg("ov9281", &create); -- cgit v1.2.1