From 69898545193a82f7d72c9f47c9d9de36167b157b Mon Sep 17 00:00:00 2001 From: Avamander Date: Sat, 24 Apr 2021 12:00:45 +0300 Subject: [PATCH] Changed access modified indentation --- .clang-format | 2 +- src/BootloaderVersion.h | 2 +- src/components/battery/BatteryController.h | 8 ++++---- src/components/ble/AlertNotificationClient.h | 4 ++-- src/components/ble/AlertNotificationService.h | 4 ++-- src/components/ble/BatteryInformationService.h | 4 ++-- src/components/ble/BleClient.h | 2 +- src/components/ble/BleController.h | 4 ++-- src/components/ble/CurrentTimeClient.h | 4 ++-- src/components/ble/CurrentTimeService.h | 4 ++-- src/components/ble/DeviceInformationService.h | 4 ++-- src/components/ble/DfuService.h | 14 +++++++------- src/components/ble/HeartRateService.h | 4 ++-- src/components/ble/ImmediateAlertService.h | 4 ++-- src/components/ble/MusicService.h | 4 ++-- src/components/ble/NavigationService.h | 4 ++-- src/components/ble/NimbleController.h | 4 ++-- src/components/ble/NotificationManager.h | 4 ++-- src/components/ble/ServiceDiscovery.h | 4 ++-- src/components/brightness/BrightnessController.h | 4 ++-- src/components/datetime/DateTimeController.h | 4 ++-- .../firmwarevalidator/FirmwareValidator.h | 4 ++-- src/components/gfx/Gfx.h | 4 ++-- src/components/heartrate/Biquad.h | 4 ++-- src/components/heartrate/HeartRateController.h | 4 ++-- src/components/heartrate/Ppg.h | 4 ++-- src/components/heartrate/Ptagc.h | 4 ++-- src/components/motion/MotionController.h | 4 ++-- src/components/motor/MotorController.h | 4 ++-- src/components/rle/RleDecoder.h | 4 ++-- src/components/settings/Settings.h | 4 ++-- src/displayapp/DisplayApp.h | 4 ++-- src/displayapp/DisplayAppRecovery.h | 4 ++-- src/displayapp/DummyLittleVgl.h | 2 +- src/displayapp/LittleVgl.h | 4 ++-- src/displayapp/screens/ApplicationList.h | 4 ++-- src/displayapp/screens/BatteryIcon.h | 2 +- src/displayapp/screens/BatteryInfo.h | 4 ++-- src/displayapp/screens/BleIcon.h | 2 +- src/displayapp/screens/Brightness.h | 4 ++-- src/displayapp/screens/Clock.h | 4 ++-- src/displayapp/screens/DropDownDemo.h | 4 ++-- src/displayapp/screens/FirmwareUpdate.cpp | 2 +- src/displayapp/screens/FirmwareUpdate.h | 4 ++-- src/displayapp/screens/FirmwareValidation.h | 4 ++-- src/displayapp/screens/FlashLight.h | 4 ++-- src/displayapp/screens/HeartRate.h | 4 ++-- src/displayapp/screens/InfiniPaint.h | 4 ++-- src/displayapp/screens/Label.h | 4 ++-- src/displayapp/screens/List.h | 4 ++-- src/displayapp/screens/Meter.h | 4 ++-- src/displayapp/screens/Motion.h | 4 ++-- src/displayapp/screens/Music.h | 4 ++-- src/displayapp/screens/Navigation.h | 4 ++-- src/displayapp/screens/NotificationIcon.h | 2 +- src/displayapp/screens/Notifications.h | 8 ++++---- src/displayapp/screens/Paddle.h | 4 ++-- src/displayapp/screens/Screen.h | 8 ++++---- src/displayapp/screens/ScreenList.h | 4 ++-- src/displayapp/screens/StopWatch.h | 6 +++--- src/displayapp/screens/SystemInfo.h | 4 ++-- src/displayapp/screens/Tile.h | 4 ++-- src/displayapp/screens/Twos.h | 4 ++-- src/displayapp/screens/WatchFaceAnalog.h | 4 ++-- src/displayapp/screens/WatchFaceDigital.h | 4 ++-- src/displayapp/screens/settings/QuickSettings.h | 4 ++-- src/displayapp/screens/settings/SettingDisplay.h | 4 ++-- .../screens/settings/SettingTimeFormat.h | 4 ++-- src/displayapp/screens/settings/SettingWakeUp.h | 4 ++-- src/displayapp/screens/settings/SettingWatchFace.h | 4 ++-- src/displayapp/screens/settings/Settings.h | 4 ++-- src/drivers/Bma421.h | 4 ++-- src/drivers/BufferProvider.h | 2 +- src/drivers/Cst816s.h | 4 ++-- src/drivers/Hrs3300.h | 4 ++-- src/drivers/InternalFlash.h | 4 ++-- src/drivers/Spi.h | 4 ++-- src/drivers/SpiMaster.h | 4 ++-- src/drivers/SpiNorFlash.h | 4 ++-- src/drivers/St7789.h | 4 ++-- src/drivers/TwiMaster.h | 4 ++-- src/drivers/Watchdog.h | 8 ++++---- src/systemtask/SystemMonitor.h | 8 ++++---- src/systemtask/SystemTask.h | 4 ++-- 84 files changed, 175 insertions(+), 175 deletions(-) diff --git a/.clang-format b/.clang-format index 5ddb7206..7430d4d6 100644 --- a/.clang-format +++ b/.clang-format @@ -1,6 +1,6 @@ --- Language: Cpp -AccessModifierOffset: 2 +AccessModifierOffset: -2 AlignAfterOpenBracket: Align AlignConsecutiveMacros: true AlignConsecutiveAssignments: false diff --git a/src/BootloaderVersion.h b/src/BootloaderVersion.h index f2fd9112..c1ede0f5 100644 --- a/src/BootloaderVersion.h +++ b/src/BootloaderVersion.h @@ -2,7 +2,7 @@ namespace Pinetime { class BootloaderVersion { - public: + public: static uint32_t Major(); static uint32_t Minor(); static uint32_t Patch(); diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index e5c734d2..04bcf6b8 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -12,7 +12,7 @@ namespace Pinetime { is given as the template parameter N. */ template class CircBuffer { - public: + public: CircBuffer() : arr {}, sz {}, cap {N}, head {} { } /** @@ -32,7 +32,7 @@ namespace Pinetime { return (sum / sz); } - private: + private: std::array arr; /**< internal array used to store the values*/ uint8_t sz; /**< The current size of the array.*/ uint8_t cap; /**< Total capacity of the CircBuffer.*/ @@ -40,7 +40,7 @@ namespace Pinetime { }; class Battery { - public: + public: Battery(); void Init(); @@ -61,7 +61,7 @@ namespace Pinetime { return isPowerPresent; } - private: + private: static Battery* instance; nrf_saadc_value_t saadc_value; diff --git a/src/components/ble/AlertNotificationClient.h b/src/components/ble/AlertNotificationClient.h index 469bd4af..dfba8143 100644 --- a/src/components/ble/AlertNotificationClient.h +++ b/src/components/ble/AlertNotificationClient.h @@ -19,7 +19,7 @@ namespace Pinetime { class NotificationManager; class AlertNotificationClient : public BleClient { - public: + public: explicit AlertNotificationClient(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager); @@ -34,7 +34,7 @@ namespace Pinetime { void Reset(); void Discover(uint16_t connectionHandle, std::function lambda) override; - private: + private: static constexpr uint16_t ansServiceId {0x1811}; static constexpr uint16_t supportedNewAlertCategoryId = 0x2a47; static constexpr uint16_t supportedUnreadAlertCategoryId = 0x2a48; diff --git a/src/components/ble/AlertNotificationService.h b/src/components/ble/AlertNotificationService.h index 66bb9be4..5c7d428c 100644 --- a/src/components/ble/AlertNotificationService.h +++ b/src/components/ble/AlertNotificationService.h @@ -20,7 +20,7 @@ namespace Pinetime { class NotificationManager; class AlertNotificationService { - public: + public: AlertNotificationService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager); void Init(); @@ -32,7 +32,7 @@ namespace Pinetime { enum class IncomingCallResponses : uint8_t { Reject = 0x00, Answer = 0x01, Mute = 0x02 }; - private: + private: enum class Categories : uint8_t { SimpleAlert = 0x00, Email = 0x01, diff --git a/src/components/ble/BatteryInformationService.h b/src/components/ble/BatteryInformationService.h index 59ed9c64..7d060909 100644 --- a/src/components/ble/BatteryInformationService.h +++ b/src/components/ble/BatteryInformationService.h @@ -12,13 +12,13 @@ namespace Pinetime { namespace Controllers { class Battery; class BatteryInformationService { - public: + public: BatteryInformationService(Controllers::Battery& batteryController); void Init(); int OnBatteryServiceRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context); - private: + private: Controllers::Battery& batteryController; static constexpr uint16_t batteryInformationServiceId {0x180F}; static constexpr uint16_t batteryLevelId {0x2A19}; diff --git a/src/components/ble/BleClient.h b/src/components/ble/BleClient.h index d8a58e1c..6067c15f 100644 --- a/src/components/ble/BleClient.h +++ b/src/components/ble/BleClient.h @@ -5,7 +5,7 @@ namespace Pinetime { namespace Controllers { class BleClient { - public: + public: virtual void Discover(uint16_t connectionHandle, std::function lambda) = 0; }; } diff --git a/src/components/ble/BleController.h b/src/components/ble/BleController.h index 6f5c2367..2cba26a9 100644 --- a/src/components/ble/BleController.h +++ b/src/components/ble/BleController.h @@ -6,7 +6,7 @@ namespace Pinetime { namespace Controllers { class Ble { - public: + public: using BleAddress = std::array; enum class FirmwareUpdateStates { Idle, Running, Validated, Error }; enum class AddressTypes { Public, Random }; @@ -49,7 +49,7 @@ namespace Pinetime { addressType = t; } - private: + private: bool isConnected = false; bool isFirmwareUpdating = false; uint32_t firmwareUpdateTotalBytes = 0; diff --git a/src/components/ble/CurrentTimeClient.h b/src/components/ble/CurrentTimeClient.h index c48a016d..6424c035 100644 --- a/src/components/ble/CurrentTimeClient.h +++ b/src/components/ble/CurrentTimeClient.h @@ -12,7 +12,7 @@ namespace Pinetime { class DateTime; class CurrentTimeClient : public BleClient { - public: + public: explicit CurrentTimeClient(DateTime& dateTimeController); void Init(); void Reset(); @@ -27,7 +27,7 @@ namespace Pinetime { } void Discover(uint16_t connectionHandle, std::function lambda) override; - private: + private: typedef struct __attribute__((packed)) { uint16_t year; uint8_t month; diff --git a/src/components/ble/CurrentTimeService.h b/src/components/ble/CurrentTimeService.h index 0a9a18a8..ca87d970 100644 --- a/src/components/ble/CurrentTimeService.h +++ b/src/components/ble/CurrentTimeService.h @@ -12,13 +12,13 @@ namespace Pinetime { namespace Controllers { class CurrentTimeService { - public: + public: CurrentTimeService(DateTime& dateTimeController); void Init(); int OnTimeAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt); - private: + private: static constexpr uint16_t ctsId {0x1805}; static constexpr uint16_t ctsCharId {0x2a2b}; diff --git a/src/components/ble/DeviceInformationService.h b/src/components/ble/DeviceInformationService.h index 3ff48b6d..54b3e961 100644 --- a/src/components/ble/DeviceInformationService.h +++ b/src/components/ble/DeviceInformationService.h @@ -9,13 +9,13 @@ namespace Pinetime { namespace Controllers { class DeviceInformationService { - public: + public: DeviceInformationService(); void Init(); int OnDeviceInfoRequested(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt); - private: + private: static constexpr uint16_t deviceInfoId {0x180a}; static constexpr uint16_t manufacturerNameId {0x2a29}; static constexpr uint16_t modelNumberId {0x2a24}; diff --git a/src/components/ble/DfuService.h b/src/components/ble/DfuService.h index b932d80f..4708a4a6 100644 --- a/src/components/ble/DfuService.h +++ b/src/components/ble/DfuService.h @@ -20,7 +20,7 @@ namespace Pinetime { class Ble; class DfuService { - public: + public: DfuService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::Ble& bleController, Pinetime::Drivers::SpiNorFlash& spiNorFlash); @@ -30,24 +30,24 @@ namespace Pinetime { void Reset(); class NotificationManager { - public: + public: NotificationManager(); bool AsyncSend(uint16_t connection, uint16_t charactHandle, uint8_t* data, size_t size); void Send(uint16_t connection, uint16_t characteristicHandle, const uint8_t* data, const size_t s); - private: + private: TimerHandle_t timer; uint16_t connectionHandle = 0; uint16_t characteristicHandle = 0; size_t size = 0; uint8_t buffer[10]; - public: + public: void OnNotificationTimer(); void Reset(); }; class DfuImage { - public: + public: DfuImage(Pinetime::Drivers::SpiNorFlash& spiNorFlash) : spiNorFlash {spiNorFlash} { } void Init(size_t chunkSize, size_t totalSize, uint16_t expectedCrc); @@ -56,7 +56,7 @@ namespace Pinetime { bool Validate(); bool IsComplete(); - private: + private: Pinetime::Drivers::SpiNorFlash& spiNorFlash; static constexpr size_t bufferSize = 200; bool ready = false; @@ -73,7 +73,7 @@ namespace Pinetime { uint16_t ComputeCrc(uint8_t const* p_data, uint32_t size, uint16_t const* p_crc); }; - private: + private: Pinetime::System::SystemTask& systemTask; Pinetime::Controllers::Ble& bleController; DfuImage dfuImage; diff --git a/src/components/ble/HeartRateService.h b/src/components/ble/HeartRateService.h index 7422445a..0b16703f 100644 --- a/src/components/ble/HeartRateService.h +++ b/src/components/ble/HeartRateService.h @@ -12,13 +12,13 @@ namespace Pinetime { namespace Controllers { class HeartRateController; class HeartRateService { - public: + public: HeartRateService(Pinetime::System::SystemTask& system, Controllers::HeartRateController& heartRateController); void Init(); int OnHeartRateRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context); void OnNewHeartRateValue(uint8_t hearRateValue); - private: + private: Pinetime::System::SystemTask& system; Controllers::HeartRateController& heartRateController; static constexpr uint16_t heartRateServiceId {0x180D}; diff --git a/src/components/ble/ImmediateAlertService.h b/src/components/ble/ImmediateAlertService.h index 6bd11bd7..1f778acd 100644 --- a/src/components/ble/ImmediateAlertService.h +++ b/src/components/ble/ImmediateAlertService.h @@ -12,14 +12,14 @@ namespace Pinetime { namespace Controllers { class NotificationManager; class ImmediateAlertService { - public: + public: enum class Levels : uint8_t { NoAlert = 0, MildAlert = 1, HighAlert = 2 }; ImmediateAlertService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager); void Init(); int OnAlertLevelChanged(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context); - private: + private: Pinetime::System::SystemTask& systemTask; NotificationManager& notificationManager; diff --git a/src/components/ble/MusicService.h b/src/components/ble/MusicService.h index 5416219d..5f5343e4 100644 --- a/src/components/ble/MusicService.h +++ b/src/components/ble/MusicService.h @@ -37,7 +37,7 @@ namespace Pinetime { namespace Controllers { class MusicService { - public: + public: explicit MusicService(Pinetime::System::SystemTask& system); void Init(); @@ -70,7 +70,7 @@ namespace Pinetime { enum MusicStatus { NotPlaying = 0x00, Playing = 0x01 }; - private: + private: static constexpr uint8_t msId[2] = {0x00, 0x00}; static constexpr uint8_t msEventCharId[2] = {0x01, 0x00}; static constexpr uint8_t msStatusCharId[2] = {0x02, 0x00}; diff --git a/src/components/ble/NavigationService.h b/src/components/ble/NavigationService.h index dc4f0a0d..5aab263c 100644 --- a/src/components/ble/NavigationService.h +++ b/src/components/ble/NavigationService.h @@ -37,7 +37,7 @@ namespace Pinetime { namespace Controllers { class NavigationService { - public: + public: explicit NavigationService(Pinetime::System::SystemTask& system); void Init(); @@ -52,7 +52,7 @@ namespace Pinetime { int getProgress(); - private: + private: static constexpr uint8_t navId[2] = {0x01, 0x00}; static constexpr uint8_t navFlagCharId[2] = {0x01, 0x00}; static constexpr uint8_t navNarrativeCharId[2] = {0x02, 0x00}; diff --git a/src/components/ble/NimbleController.h b/src/components/ble/NimbleController.h index 6d4aa38a..5dd01e42 100644 --- a/src/components/ble/NimbleController.h +++ b/src/components/ble/NimbleController.h @@ -36,7 +36,7 @@ namespace Pinetime { class NimbleController { - public: + public: NimbleController(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::Ble& bleController, DateTime& dateTimeController, @@ -71,7 +71,7 @@ namespace Pinetime { uint16_t connHandle(); - private: + private: static constexpr const char* deviceName = "InfiniTime"; Pinetime::System::SystemTask& systemTask; Pinetime::Controllers::Ble& bleController; diff --git a/src/components/ble/NotificationManager.h b/src/components/ble/NotificationManager.h index 8e8fb374..d4072cc2 100644 --- a/src/components/ble/NotificationManager.h +++ b/src/components/ble/NotificationManager.h @@ -8,7 +8,7 @@ namespace Pinetime { namespace Controllers { class NotificationManager { - public: + public: enum class Categories { Unknown, SimpleAlert, @@ -52,7 +52,7 @@ namespace Pinetime { }; size_t NbNotifications() const; - private: + private: Notification::Id GetNextId(); static constexpr uint8_t TotalNbNotifications = 5; std::array notifications; diff --git a/src/components/ble/ServiceDiscovery.h b/src/components/ble/ServiceDiscovery.h index 56bb3e44..fc3b38c0 100644 --- a/src/components/ble/ServiceDiscovery.h +++ b/src/components/ble/ServiceDiscovery.h @@ -8,12 +8,12 @@ namespace Pinetime { class BleClient; class ServiceDiscovery { - public: + public: ServiceDiscovery(std::array&& bleClients); void StartDiscovery(uint16_t connectionHandle); - private: + private: BleClient** clientIterator; std::array clients; void OnServiceDiscovered(uint16_t connectionHandle); diff --git a/src/components/brightness/BrightnessController.h b/src/components/brightness/BrightnessController.h index e8c36e3b..c47158a9 100644 --- a/src/components/brightness/BrightnessController.h +++ b/src/components/brightness/BrightnessController.h @@ -5,7 +5,7 @@ namespace Pinetime { namespace Controllers { class BrightnessController { - public: + public: enum class Levels { Off, Low, Medium, High }; void Init(); @@ -21,7 +21,7 @@ namespace Pinetime { const char* GetIcon(); const char* ToString(); - private: + private: static constexpr uint8_t pinLcdBacklight1 = 14; static constexpr uint8_t pinLcdBacklight2 = 22; static constexpr uint8_t pinLcdBacklight3 = 23; diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h index 823442b2..d0ae727e 100644 --- a/src/components/datetime/DateTimeController.h +++ b/src/components/datetime/DateTimeController.h @@ -9,7 +9,7 @@ namespace Pinetime { } namespace Controllers { class DateTime { - public: + public: enum class Days : uint8_t { Unknown, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }; enum class Months : uint8_t { Unknown, @@ -75,7 +75,7 @@ namespace Pinetime { return uptime; } - private: + private: System::SystemTask& systemTask; uint16_t year = 0; Months month = Months::Unknown; diff --git a/src/components/firmwarevalidator/FirmwareValidator.h b/src/components/firmwarevalidator/FirmwareValidator.h index 00b5a0bb..ce644f97 100644 --- a/src/components/firmwarevalidator/FirmwareValidator.h +++ b/src/components/firmwarevalidator/FirmwareValidator.h @@ -5,13 +5,13 @@ namespace Pinetime { namespace Controllers { class FirmwareValidator { - public: + public: void Validate(); bool IsValidated() const; void Reset(); - private: + private: static constexpr uint32_t validBitAdress {0x7BFE8}; static constexpr uint32_t validBitValue {1}; }; diff --git a/src/components/gfx/Gfx.h b/src/components/gfx/Gfx.h index b45fb45c..54c4a8b7 100644 --- a/src/components/gfx/Gfx.h +++ b/src/components/gfx/Gfx.h @@ -12,7 +12,7 @@ namespace Pinetime { } namespace Components { class Gfx : public Pinetime::Drivers::BufferProvider { - public: + public: explicit Gfx(Drivers::St7789& lcd); void Init(); void ClearScreen(); @@ -28,7 +28,7 @@ namespace Pinetime { bool GetNextBuffer(uint8_t** buffer, size_t& size) override; void pixel_draw(uint8_t x, uint8_t y, uint16_t color); - private: + private: static constexpr uint8_t width = 240; static constexpr uint8_t height = 240; diff --git a/src/components/heartrate/Biquad.h b/src/components/heartrate/Biquad.h index 0d62b1fe..7c8ca58f 100644 --- a/src/components/heartrate/Biquad.h +++ b/src/components/heartrate/Biquad.h @@ -4,11 +4,11 @@ namespace Pinetime { namespace Controllers { /// Direct Form II Biquad Filter class Biquad { - public: + public: Biquad(float b0, float b1, float b2, float a1, float a2); float Step(float x); - private: + private: float b0; float b1; float b2; diff --git a/src/components/heartrate/HeartRateController.h b/src/components/heartrate/HeartRateController.h index 5558d355..d3a8460d 100644 --- a/src/components/heartrate/HeartRateController.h +++ b/src/components/heartrate/HeartRateController.h @@ -12,7 +12,7 @@ namespace Pinetime { } namespace Controllers { class HeartRateController { - public: + public: enum class States { Stopped, NotEnoughData, NoTouch, Running }; explicit HeartRateController(System::SystemTask& systemTask); @@ -31,7 +31,7 @@ namespace Pinetime { void SetService(Pinetime::Controllers::HeartRateService* service); - private: + private: System::SystemTask& systemTask; Applications::HeartRateTask* task = nullptr; States state = States::Stopped; diff --git a/src/components/heartrate/Ppg.h b/src/components/heartrate/Ppg.h index 51db7582..6a2fcf18 100644 --- a/src/components/heartrate/Ppg.h +++ b/src/components/heartrate/Ppg.h @@ -7,7 +7,7 @@ namespace Pinetime { namespace Controllers { class Ppg { - public: + public: explicit Ppg(float spl); int Preprocess(float spl); @@ -16,7 +16,7 @@ namespace Pinetime { void SetOffset(uint16_t i); void Reset(); - private: + private: std::array data; size_t dataIndex = 0; float offset; diff --git a/src/components/heartrate/Ptagc.h b/src/components/heartrate/Ptagc.h index aaa6f1e6..3476636b 100644 --- a/src/components/heartrate/Ptagc.h +++ b/src/components/heartrate/Ptagc.h @@ -3,11 +3,11 @@ namespace Pinetime { namespace Controllers { class Ptagc { - public: + public: Ptagc(float start, float decay, float threshold); float Step(float spl); - private: + private: float peak; float decay; float boost; diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index 1a551196..bf644812 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -5,7 +5,7 @@ namespace Pinetime { namespace Controllers { class MotionController { - public: + public: void Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps); uint16_t X() const { @@ -27,7 +27,7 @@ namespace Pinetime { return isSensorOk; } - private: + private: uint32_t nbSteps; int16_t x; int16_t y; diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h index 4662a8da..df61af78 100644 --- a/src/components/motor/MotorController.h +++ b/src/components/motor/MotorController.h @@ -9,12 +9,12 @@ namespace Pinetime { static constexpr uint8_t pinMotor = 16; class MotorController { - public: + public: MotorController(Controllers::Settings& settingsController); void Init(); void SetDuration(uint8_t motorDuration); - private: + private: Controllers::Settings& settingsController; static void vibrate(void* p_context); }; diff --git a/src/components/rle/RleDecoder.h b/src/components/rle/RleDecoder.h index c21f45c2..0f607fb8 100644 --- a/src/components/rle/RleDecoder.h +++ b/src/components/rle/RleDecoder.h @@ -11,13 +11,13 @@ namespace Pinetime { * Code from https://github.com/daniel-thompson/wasp-bootloader by Daniel Thompson released under the MIT license. */ class RleDecoder { - public: + public: RleDecoder(const uint8_t* buffer, size_t size); RleDecoder(const uint8_t* buffer, size_t size, uint16_t foregroundColor, uint16_t backgroundColor); void DecodeNext(uint8_t* output, size_t maxBytes); - private: + private: const uint8_t* buffer; size_t size; diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h index 05d6e7ef..18c87fd4 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -8,7 +8,7 @@ namespace Pinetime { namespace Controllers { class Settings { - public: + public: enum class ClockType { H24, H12 }; enum class Vibration { ON, OFF }; enum class WakeUpMode { None, SingleTap, DoubleTap, RaiseWrist }; @@ -86,7 +86,7 @@ namespace Pinetime { return settings.brightLevel; }; - private: + private: Pinetime::Drivers::SpiNorFlash& spiNorFlash; struct SettingsData { diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h index 03afb4ca..ff5ddac8 100644 --- a/src/displayapp/DisplayApp.h +++ b/src/displayapp/DisplayApp.h @@ -35,7 +35,7 @@ namespace Pinetime { }; namespace Applications { class DisplayApp { - public: + public: enum class States { Idle, Running }; enum class FullRefreshDirections { None, Up, Down, Left, Right, LeftAnim, RightAnim }; enum class TouchModes { Gestures, Polling }; @@ -60,7 +60,7 @@ namespace Pinetime { void SetFullRefresh(FullRefreshDirections direction); void SetTouchMode(TouchModes mode); - private: + private: Pinetime::Drivers::St7789& lcd; Pinetime::Components::LittleVgl& lvgl; Pinetime::Drivers::Cst816S& touchPanel; diff --git a/src/displayapp/DisplayAppRecovery.h b/src/displayapp/DisplayAppRecovery.h index b51d6b67..025be6c0 100644 --- a/src/displayapp/DisplayAppRecovery.h +++ b/src/displayapp/DisplayAppRecovery.h @@ -29,7 +29,7 @@ namespace Pinetime { }; namespace Applications { class DisplayApp { - public: + public: DisplayApp(Drivers::St7789& lcd, Components::LittleVgl& lvgl, Drivers::Cst816S&, @@ -45,7 +45,7 @@ namespace Pinetime { void Start(); void PushMessage(Pinetime::Applications::Display::Messages msg); - private: + private: TaskHandle_t taskHandle; static void Process(void* instance); void DisplayLogo(uint16_t color); diff --git a/src/displayapp/DummyLittleVgl.h b/src/displayapp/DummyLittleVgl.h index dda1f3b8..96cf153f 100644 --- a/src/displayapp/DummyLittleVgl.h +++ b/src/displayapp/DummyLittleVgl.h @@ -9,7 +9,7 @@ namespace Pinetime { namespace Components { class LittleVgl { - public: + public: enum class FullRefreshDirections { None, Up, Down }; LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel) { } diff --git a/src/displayapp/LittleVgl.h b/src/displayapp/LittleVgl.h index b10b14fa..7f7b76e0 100644 --- a/src/displayapp/LittleVgl.h +++ b/src/displayapp/LittleVgl.h @@ -10,7 +10,7 @@ namespace Pinetime { namespace Components { class LittleVgl { - public: + public: enum class FullRefreshDirections { None, Up, Down, Left, Right, LeftAnim, RightAnim }; LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel); @@ -24,7 +24,7 @@ namespace Pinetime { void SetFullRefresh(FullRefreshDirections direction); void SetNewTapEvent(uint16_t x, uint16_t y); - private: + private: void InitDisplay(); void InitTouchpad(); void InitTheme(); diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h index 5d519355..88534ec4 100644 --- a/src/displayapp/screens/ApplicationList.h +++ b/src/displayapp/screens/ApplicationList.h @@ -12,7 +12,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class ApplicationList : public Screen { - public: + public: explicit ApplicationList(DisplayApp* app, Pinetime::Controllers::Settings& settingsController, Pinetime::Controllers::Battery& batteryController, @@ -21,7 +21,7 @@ namespace Pinetime { bool Refresh() override; bool OnTouchEvent(TouchEvents event) override; - private: + private: Controllers::Settings& settingsController; Pinetime::Controllers::Battery& batteryController; Controllers::DateTime& dateTimeController; diff --git a/src/displayapp/screens/BatteryIcon.h b/src/displayapp/screens/BatteryIcon.h index 2a40a9c1..9c192ff7 100644 --- a/src/displayapp/screens/BatteryIcon.h +++ b/src/displayapp/screens/BatteryIcon.h @@ -4,7 +4,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class BatteryIcon { - public: + public: static const char* GetUnknownIcon(); static const char* GetBatteryIcon(int batteryPercent); static const char* GetPlugIcon(bool isCharging); diff --git a/src/displayapp/screens/BatteryInfo.h b/src/displayapp/screens/BatteryInfo.h index e95267bd..8805db58 100644 --- a/src/displayapp/screens/BatteryInfo.h +++ b/src/displayapp/screens/BatteryInfo.h @@ -15,7 +15,7 @@ namespace Pinetime { namespace Screens { class BatteryInfo : public Screen { - public: + public: BatteryInfo(DisplayApp* app, Pinetime::Controllers::Battery& batteryController); ~BatteryInfo() override; @@ -24,7 +24,7 @@ namespace Pinetime { void UpdateScreen(); void UpdateAnim(); - private: + private: Pinetime::Controllers::Battery& batteryController; lv_obj_t* voltage; diff --git a/src/displayapp/screens/BleIcon.h b/src/displayapp/screens/BleIcon.h index 5fe139aa..c1398d2a 100644 --- a/src/displayapp/screens/BleIcon.h +++ b/src/displayapp/screens/BleIcon.h @@ -4,7 +4,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class BleIcon { - public: + public: static const char* GetIcon(bool isConnected); }; } diff --git a/src/displayapp/screens/Brightness.h b/src/displayapp/screens/Brightness.h index e2a5e7a1..9ee33753 100644 --- a/src/displayapp/screens/Brightness.h +++ b/src/displayapp/screens/Brightness.h @@ -9,7 +9,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class Brightness : public Screen { - public: + public: Brightness(DisplayApp* app, Controllers::BrightnessController& brightness); ~Brightness() override; bool Refresh() override; @@ -18,7 +18,7 @@ namespace Pinetime { void OnValueChanged(); - private: + private: Controllers::BrightnessController& brightness; lv_obj_t* slider_label; diff --git a/src/displayapp/screens/Clock.h b/src/displayapp/screens/Clock.h index ef008c8d..9879985f 100644 --- a/src/displayapp/screens/Clock.h +++ b/src/displayapp/screens/Clock.h @@ -23,7 +23,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class Clock : public Screen { - public: + public: Clock(DisplayApp* app, Controllers::DateTime& dateTimeController, Controllers::Battery& batteryController, @@ -38,7 +38,7 @@ namespace Pinetime { bool OnTouchEvent(TouchEvents event) override; - private: + private: Controllers::DateTime& dateTimeController; Controllers::Battery& batteryController; Controllers::Ble& bleController; diff --git a/src/displayapp/screens/DropDownDemo.h b/src/displayapp/screens/DropDownDemo.h index 94be89e4..ff388c57 100644 --- a/src/displayapp/screens/DropDownDemo.h +++ b/src/displayapp/screens/DropDownDemo.h @@ -9,7 +9,7 @@ namespace Pinetime { namespace Screens { class DropDownDemo : public Screen { - public: + public: DropDownDemo(DisplayApp* app); ~DropDownDemo() override; @@ -17,7 +17,7 @@ namespace Pinetime { bool OnTouchEvent(TouchEvents event) override; - private: + private: lv_obj_t* ddlist; bool isDropDownOpened = false; diff --git a/src/displayapp/screens/FirmwareUpdate.cpp b/src/displayapp/screens/FirmwareUpdate.cpp index 1ca9d7ce..4086b152 100644 --- a/src/displayapp/screens/FirmwareUpdate.cpp +++ b/src/displayapp/screens/FirmwareUpdate.cpp @@ -8,7 +8,7 @@ using namespace Pinetime::Applications::Screens; FirmwareUpdate::FirmwareUpdate(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Ble& bleController) : Screen(app), bleController {bleController} { - lv_obj_t * backgroundLabel = lv_label_create(lv_scr_act(), nullptr); + lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr); lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP); lv_obj_set_size(backgroundLabel, 240, 240); lv_obj_set_pos(backgroundLabel, 0, 0); diff --git a/src/displayapp/screens/FirmwareUpdate.h b/src/displayapp/screens/FirmwareUpdate.h index 7e642477..f4d34df0 100644 --- a/src/displayapp/screens/FirmwareUpdate.h +++ b/src/displayapp/screens/FirmwareUpdate.h @@ -11,13 +11,13 @@ namespace Pinetime { namespace Screens { class FirmwareUpdate : public Screen { - public: + public: FirmwareUpdate(DisplayApp* app, Pinetime::Controllers::Ble& bleController); ~FirmwareUpdate() override; bool Refresh() override; - private: + private: enum class States { Idle, Running, Validated, Error }; Pinetime::Controllers::Ble& bleController; lv_obj_t* bar1; diff --git a/src/displayapp/screens/FirmwareValidation.h b/src/displayapp/screens/FirmwareValidation.h index f35a86b5..67662fd9 100644 --- a/src/displayapp/screens/FirmwareValidation.h +++ b/src/displayapp/screens/FirmwareValidation.h @@ -12,7 +12,7 @@ namespace Pinetime { namespace Screens { class FirmwareValidation : public Screen { - public: + public: FirmwareValidation(DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator); ~FirmwareValidation() override; @@ -20,7 +20,7 @@ namespace Pinetime { void OnButtonEvent(lv_obj_t* object, lv_event_t event); - private: + private: Pinetime::Controllers::FirmwareValidator& validator; lv_obj_t* labelVersionInfo; diff --git a/src/displayapp/screens/FlashLight.h b/src/displayapp/screens/FlashLight.h index 5bd188de..a862ffdb 100644 --- a/src/displayapp/screens/FlashLight.h +++ b/src/displayapp/screens/FlashLight.h @@ -12,7 +12,7 @@ namespace Pinetime { namespace Screens { class FlashLight : public Screen { - public: + public: FlashLight(DisplayApp* app, System::SystemTask& systemTask, Controllers::BrightnessController& brightness); ~FlashLight() override; @@ -21,7 +21,7 @@ namespace Pinetime { bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; void OnClickEvent(lv_obj_t* obj, lv_event_t event); - private: + private: Pinetime::System::SystemTask& systemTask; Controllers::BrightnessController& brightness; diff --git a/src/displayapp/screens/HeartRate.h b/src/displayapp/screens/HeartRate.h index 25be427f..a23c5af8 100644 --- a/src/displayapp/screens/HeartRate.h +++ b/src/displayapp/screens/HeartRate.h @@ -16,7 +16,7 @@ namespace Pinetime { namespace Screens { class HeartRate : public Screen { - public: + public: HeartRate(DisplayApp* app, Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask); ~HeartRate() override; @@ -24,7 +24,7 @@ namespace Pinetime { void OnStartStopEvent(lv_event_t event); - private: + private: Controllers::HeartRateController& heartRateController; Pinetime::System::SystemTask& systemTask; void UpdateStartStopButton(bool isRunning); diff --git a/src/displayapp/screens/InfiniPaint.h b/src/displayapp/screens/InfiniPaint.h index 220212b1..6251752a 100644 --- a/src/displayapp/screens/InfiniPaint.h +++ b/src/displayapp/screens/InfiniPaint.h @@ -12,7 +12,7 @@ namespace Pinetime { namespace Screens { class InfiniPaint : public Screen { - public: + public: InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl); ~InfiniPaint() override; @@ -23,7 +23,7 @@ namespace Pinetime { bool OnTouchEvent(uint16_t x, uint16_t y) override; - private: + private: Pinetime::Components::LittleVgl& lvgl; static constexpr uint16_t width = 10; static constexpr uint16_t height = 10; diff --git a/src/displayapp/screens/Label.h b/src/displayapp/screens/Label.h index b648fdb6..62b80bec 100644 --- a/src/displayapp/screens/Label.h +++ b/src/displayapp/screens/Label.h @@ -8,13 +8,13 @@ namespace Pinetime { namespace Screens { class Label : public Screen { - public: + public: Label(uint8_t screenID, uint8_t numScreens, DisplayApp* app, lv_obj_t* labelText); ~Label() override; bool Refresh() override; - private: + private: bool running = true; lv_obj_t* labelText = nullptr; diff --git a/src/displayapp/screens/List.h b/src/displayapp/screens/List.h index 4c2973aa..a45fd1d3 100644 --- a/src/displayapp/screens/List.h +++ b/src/displayapp/screens/List.h @@ -13,7 +13,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class List : public Screen { - public: + public: struct Applications { const char* icon; const char* name; @@ -31,7 +31,7 @@ namespace Pinetime { void OnButtonEvent(lv_obj_t* object, lv_event_t event); - private: + private: Controllers::Settings& settingsController; Pinetime::Applications::Apps apps[MAXLISTITEMS]; diff --git a/src/displayapp/screens/Meter.h b/src/displayapp/screens/Meter.h index 970e4233..24af15ad 100644 --- a/src/displayapp/screens/Meter.h +++ b/src/displayapp/screens/Meter.h @@ -10,13 +10,13 @@ namespace Pinetime { namespace Screens { class Meter : public Screen { - public: + public: Meter(DisplayApp* app); ~Meter() override; bool Refresh() override; - private: + private: lv_style_t style_lmeter; lv_obj_t* lmeter; diff --git a/src/displayapp/screens/Motion.h b/src/displayapp/screens/Motion.h index a06a5d1c..11007866 100644 --- a/src/displayapp/screens/Motion.h +++ b/src/displayapp/screens/Motion.h @@ -13,14 +13,14 @@ namespace Pinetime { namespace Screens { class Motion : public Screen { - public: + public: Motion(DisplayApp* app, Controllers::MotionController& motionController); ~Motion() override; bool Refresh() override; bool OnButtonPushed() override; - private: + private: Controllers::MotionController& motionController; lv_obj_t* chart; lv_chart_series_t* ser1; diff --git a/src/displayapp/screens/Music.h b/src/displayapp/screens/Music.h index c7da233e..ef8f1fec 100644 --- a/src/displayapp/screens/Music.h +++ b/src/displayapp/screens/Music.h @@ -30,7 +30,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class Music : public Screen { - public: + public: Music(DisplayApp* app, Pinetime::Controllers::MusicService& music); ~Music() override; @@ -39,7 +39,7 @@ namespace Pinetime { void OnObjectEvent(lv_obj_t* obj, lv_event_t event); - private: + private: bool OnTouchEvent(TouchEvents event); void UpdateLength(); diff --git a/src/displayapp/screens/Navigation.h b/src/displayapp/screens/Navigation.h index 65a87047..46816c33 100644 --- a/src/displayapp/screens/Navigation.h +++ b/src/displayapp/screens/Navigation.h @@ -31,13 +31,13 @@ namespace Pinetime { namespace Applications { namespace Screens { class Navigation : public Screen { - public: + public: Navigation(DisplayApp* app, Pinetime::Controllers::NavigationService& nav); ~Navigation() override; bool Refresh() override; - private: + private: lv_obj_t* imgFlag; lv_obj_t* txtNarrative; lv_obj_t* txtManDist; diff --git a/src/displayapp/screens/NotificationIcon.h b/src/displayapp/screens/NotificationIcon.h index 40546397..dc34c3f0 100644 --- a/src/displayapp/screens/NotificationIcon.h +++ b/src/displayapp/screens/NotificationIcon.h @@ -4,7 +4,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class NotificationIcon { - public: + public: static const char* GetIcon(bool newNotificationAvailable); }; } diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h index d5ea5dcb..51ca81da 100644 --- a/src/displayapp/screens/Notifications.h +++ b/src/displayapp/screens/Notifications.h @@ -14,7 +14,7 @@ namespace Pinetime { namespace Screens { class Notifications : public Screen { - public: + public: enum class Modes { Normal, Preview }; explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, @@ -26,7 +26,7 @@ namespace Pinetime { bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; class NotificationItem { - public: + public: NotificationItem(const char* title, const char* msg, uint8_t notifNr, @@ -42,7 +42,7 @@ namespace Pinetime { void OnMuteIncomingCall(lv_event_t event); void OnRejectIncomingCall(lv_event_t event); - private: + private: uint8_t notifNr = 0; uint8_t notifNb = 0; char pageText[4]; @@ -62,7 +62,7 @@ namespace Pinetime { Pinetime::Controllers::AlertNotificationService& alertNotificationService; }; - private: + private: struct NotificationData { const char* title; const char* text; diff --git a/src/displayapp/screens/Paddle.h b/src/displayapp/screens/Paddle.h index 438b4992..e133244f 100644 --- a/src/displayapp/screens/Paddle.h +++ b/src/displayapp/screens/Paddle.h @@ -12,7 +12,7 @@ namespace Pinetime { namespace Screens { class Paddle : public Screen { - public: + public: Paddle(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl); ~Paddle() override; @@ -21,7 +21,7 @@ namespace Pinetime { bool OnTouchEvent(TouchEvents event) override; bool OnTouchEvent(uint16_t x, uint16_t y) override; - private: + private: Pinetime::Components::LittleVgl& lvgl; int paddleBottomY = 90; // bottom extreme of the paddle diff --git a/src/displayapp/screens/Screen.h b/src/displayapp/screens/Screen.h index fb453aa8..8e49c9de 100644 --- a/src/displayapp/screens/Screen.h +++ b/src/displayapp/screens/Screen.h @@ -9,7 +9,7 @@ namespace Pinetime { namespace Screens { template class DirtyValue { - public: + public: DirtyValue() = default; // Use NSDMI explicit DirtyValue(T const& v) : value {v} { } // Use MIL and const-lvalue-ref @@ -28,13 +28,13 @@ namespace Pinetime { return *this; } - private: + private: T value {}; // NSDMI - default initialise type bool isUpdated {true}; // NSDMI - use brace initilisation }; class Screen { - public: + public: explicit Screen(DisplayApp* app) : app {app} { } virtual ~Screen() = default; @@ -67,7 +67,7 @@ namespace Pinetime { return false; } - protected: + protected: DisplayApp* app; bool running = true; }; diff --git a/src/displayapp/screens/ScreenList.h b/src/displayapp/screens/ScreenList.h index a9a176b3..73ea4610 100644 --- a/src/displayapp/screens/ScreenList.h +++ b/src/displayapp/screens/ScreenList.h @@ -12,7 +12,7 @@ namespace Pinetime { enum class ScreenListModes { UpDown, RightLeft, LongPress }; template class ScreenList : public Screen { - public: + public: ScreenList(DisplayApp* app, uint8_t initScreen, std::array()>, N>&& screens, @@ -95,7 +95,7 @@ namespace Pinetime { return false; } - private: + private: uint8_t initScreen = 0; std::array()>, N> screens; ScreenListModes mode = ScreenListModes::UpDown; diff --git a/src/displayapp/screens/StopWatch.h b/src/displayapp/screens/StopWatch.h index 18b02069..ff604361 100644 --- a/src/displayapp/screens/StopWatch.h +++ b/src/displayapp/screens/StopWatch.h @@ -54,7 +54,7 @@ namespace Pinetime::Applications::Screens { return nullptr; } - private: + private: std::array buffer; uint8_t currentSize; uint8_t capacity; @@ -62,7 +62,7 @@ namespace Pinetime::Applications::Screens { }; class StopWatch : public Screen { - public: + public: StopWatch(DisplayApp* app); ~StopWatch() override; bool Refresh() override; @@ -70,7 +70,7 @@ namespace Pinetime::Applications::Screens { void playPauseBtnEventHandler(lv_event_t event); void stopLapBtnEventHandler(lv_event_t event); - private: + private: bool running; States currentState; Events currentEvent; diff --git a/src/displayapp/screens/SystemInfo.h b/src/displayapp/screens/SystemInfo.h index 463b8b9c..c0c65554 100644 --- a/src/displayapp/screens/SystemInfo.h +++ b/src/displayapp/screens/SystemInfo.h @@ -21,7 +21,7 @@ namespace Pinetime { namespace Screens { class SystemInfo : public Screen { - public: + public: explicit SystemInfo(DisplayApp* app, Pinetime::Controllers::DateTime& dateTimeController, Pinetime::Controllers::Battery& batteryController, @@ -33,7 +33,7 @@ namespace Pinetime { bool OnButtonPushed() override; bool OnTouchEvent(TouchEvents event) override; - private: + private: bool running = true; Pinetime::Controllers::DateTime& dateTimeController; diff --git a/src/displayapp/screens/Tile.h b/src/displayapp/screens/Tile.h index a372a852..4ebd81cd 100644 --- a/src/displayapp/screens/Tile.h +++ b/src/displayapp/screens/Tile.h @@ -14,7 +14,7 @@ namespace Pinetime { namespace Applications { namespace Screens { class Tile : public Screen { - public: + public: struct Applications { const char* icon; Pinetime::Applications::Apps application; @@ -34,7 +34,7 @@ namespace Pinetime { void UpdateScreen(); void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId); - private: + private: Pinetime::Controllers::Battery& batteryController; Controllers::DateTime& dateTimeController; diff --git a/src/displayapp/screens/Twos.h b/src/displayapp/screens/Twos.h index ade5abb0..3367618f 100644 --- a/src/displayapp/screens/Twos.h +++ b/src/displayapp/screens/Twos.h @@ -11,14 +11,14 @@ namespace Pinetime { }; namespace Screens { class Twos : public Screen { - public: + public: Twos(DisplayApp* app); ~Twos() override; bool Refresh() override; bool OnTouchEvent(TouchEvents event) override; - private: + private: lv_style_t style_cell1; lv_style_t style_cell2; lv_style_t style_cell3; diff --git a/src/displayapp/screens/WatchFaceAnalog.h b/src/displayapp/screens/WatchFaceAnalog.h index 8957aca8..667f6241 100644 --- a/src/displayapp/screens/WatchFaceAnalog.h +++ b/src/displayapp/screens/WatchFaceAnalog.h @@ -22,7 +22,7 @@ namespace Pinetime { namespace Screens { class WatchFaceAnalog : public Screen { - public: + public: WatchFaceAnalog(DisplayApp* app, Controllers::DateTime& dateTimeController, Controllers::Battery& batteryController, @@ -34,7 +34,7 @@ namespace Pinetime { bool Refresh() override; - private: + private: uint8_t sHour, sMinute, sSecond; uint8_t hour; uint8_t minute; diff --git a/src/displayapp/screens/WatchFaceDigital.h b/src/displayapp/screens/WatchFaceDigital.h index fb6d9cbb..246efc95 100644 --- a/src/displayapp/screens/WatchFaceDigital.h +++ b/src/displayapp/screens/WatchFaceDigital.h @@ -22,7 +22,7 @@ namespace Pinetime { namespace Screens { class WatchFaceDigital : public Screen { - public: + public: WatchFaceDigital(DisplayApp* app, Controllers::DateTime& dateTimeController, Controllers::Battery& batteryController, @@ -37,7 +37,7 @@ namespace Pinetime { void OnObjectEvent(lv_obj_t* pObj, lv_event_t i); - private: + private: char displayedChar[5]; uint16_t currentYear = 1970; diff --git a/src/displayapp/screens/settings/QuickSettings.h b/src/displayapp/screens/settings/QuickSettings.h index 693fd757..8d04bec3 100644 --- a/src/displayapp/screens/settings/QuickSettings.h +++ b/src/displayapp/screens/settings/QuickSettings.h @@ -16,7 +16,7 @@ namespace Pinetime { namespace Screens { class QuickSettings : public Screen { - public: + public: QuickSettings(DisplayApp* app, Pinetime::Controllers::Battery& batteryController, Controllers::DateTime& dateTimeController, @@ -32,7 +32,7 @@ namespace Pinetime { void UpdateScreen(); - private: + private: Pinetime::Controllers::Battery& batteryController; Controllers::DateTime& dateTimeController; Controllers::BrightnessController& brightness; diff --git a/src/displayapp/screens/settings/SettingDisplay.h b/src/displayapp/screens/settings/SettingDisplay.h index ecd84465..b8ed87ec 100644 --- a/src/displayapp/screens/settings/SettingDisplay.h +++ b/src/displayapp/screens/settings/SettingDisplay.h @@ -11,14 +11,14 @@ namespace Pinetime { namespace Screens { class SettingDisplay : public Screen { - public: + public: SettingDisplay(DisplayApp* app, Pinetime::Controllers::Settings& settingsController); ~SettingDisplay() override; bool Refresh() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); - private: + private: Controllers::Settings& settingsController; uint8_t optionsTotal; lv_obj_t* cbOption[4]; diff --git a/src/displayapp/screens/settings/SettingTimeFormat.h b/src/displayapp/screens/settings/SettingTimeFormat.h index df08a944..9203b45b 100644 --- a/src/displayapp/screens/settings/SettingTimeFormat.h +++ b/src/displayapp/screens/settings/SettingTimeFormat.h @@ -11,14 +11,14 @@ namespace Pinetime { namespace Screens { class SettingTimeFormat : public Screen { - public: + public: SettingTimeFormat(DisplayApp* app, Pinetime::Controllers::Settings& settingsController); ~SettingTimeFormat() override; bool Refresh() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); - private: + private: Controllers::Settings& settingsController; uint8_t optionsTotal; lv_obj_t* cbOption[2]; diff --git a/src/displayapp/screens/settings/SettingWakeUp.h b/src/displayapp/screens/settings/SettingWakeUp.h index 4f476b0c..8b33eb06 100644 --- a/src/displayapp/screens/settings/SettingWakeUp.h +++ b/src/displayapp/screens/settings/SettingWakeUp.h @@ -11,14 +11,14 @@ namespace Pinetime { namespace Screens { class SettingWakeUp : public Screen { - public: + public: SettingWakeUp(DisplayApp* app, Pinetime::Controllers::Settings& settingsController); ~SettingWakeUp() override; bool Refresh() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); - private: + private: Controllers::Settings& settingsController; uint8_t optionsTotal; lv_obj_t* cbOption[4]; diff --git a/src/displayapp/screens/settings/SettingWatchFace.h b/src/displayapp/screens/settings/SettingWatchFace.h index 0963b4ca..1930a228 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.h +++ b/src/displayapp/screens/settings/SettingWatchFace.h @@ -11,14 +11,14 @@ namespace Pinetime { namespace Screens { class SettingWatchFace : public Screen { - public: + public: SettingWatchFace(DisplayApp* app, Pinetime::Controllers::Settings& settingsController); ~SettingWatchFace() override; bool Refresh() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); - private: + private: Controllers::Settings& settingsController; uint8_t optionsTotal; lv_obj_t* cbOption[2]; diff --git a/src/displayapp/screens/settings/Settings.h b/src/displayapp/screens/settings/Settings.h index 1cec2b09..7e332dfe 100644 --- a/src/displayapp/screens/settings/Settings.h +++ b/src/displayapp/screens/settings/Settings.h @@ -10,7 +10,7 @@ namespace Pinetime { namespace Screens { class Settings : public Screen { - public: + public: Settings(DisplayApp* app, Pinetime::Controllers::Settings& settingsController); ~Settings() override; @@ -19,7 +19,7 @@ namespace Pinetime { void OnButtonEvent(lv_obj_t* object, lv_event_t event); bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; - private: + private: Controllers::Settings& settingsController; ScreenList<2> screens; diff --git a/src/drivers/Bma421.h b/src/drivers/Bma421.h index 3287ed9e..e4d925f5 100644 --- a/src/drivers/Bma421.h +++ b/src/drivers/Bma421.h @@ -5,7 +5,7 @@ namespace Pinetime { namespace Drivers { class TwiMaster; class Bma421 { - public: + public: struct Values { uint32_t steps; int16_t x; @@ -30,7 +30,7 @@ namespace Pinetime { bool IsOk() const; - private: + private: void Reset(); TwiMaster& twiMaster; diff --git a/src/drivers/BufferProvider.h b/src/drivers/BufferProvider.h index fac03bdc..53571133 100644 --- a/src/drivers/BufferProvider.h +++ b/src/drivers/BufferProvider.h @@ -5,7 +5,7 @@ namespace Pinetime { namespace Drivers { class BufferProvider { - public: + public: virtual bool GetNextBuffer(uint8_t** buffer, size_t& size) = 0; }; } diff --git a/src/drivers/Cst816s.h b/src/drivers/Cst816s.h index 7664a83e..14c296ea 100644 --- a/src/drivers/Cst816s.h +++ b/src/drivers/Cst816s.h @@ -5,7 +5,7 @@ namespace Pinetime { namespace Drivers { class Cst816S { - public: + public: enum class Gestures : uint8_t { None = 0x00, SlideDown = 0x01, @@ -38,7 +38,7 @@ namespace Pinetime { void Sleep(); void Wakeup(); - private: + private: static constexpr uint8_t pinIrq = 28; static constexpr uint8_t pinReset = 10; static constexpr uint8_t lastTouchId = 0x0f; diff --git a/src/drivers/Hrs3300.h b/src/drivers/Hrs3300.h index cf87f378..c4f28900 100644 --- a/src/drivers/Hrs3300.h +++ b/src/drivers/Hrs3300.h @@ -5,7 +5,7 @@ namespace Pinetime { namespace Drivers { class Hrs3300 { - public: + public: enum class Registers : uint8_t { Id = 0x00, Enable = 0x01, @@ -35,7 +35,7 @@ namespace Pinetime { void SetGain(uint8_t gain); void SetDrive(uint8_t drive); - private: + private: TwiMaster& twiMaster; uint8_t twiAddress; diff --git a/src/drivers/InternalFlash.h b/src/drivers/InternalFlash.h index cbf9a20b..3a3c79dc 100644 --- a/src/drivers/InternalFlash.h +++ b/src/drivers/InternalFlash.h @@ -5,11 +5,11 @@ namespace Pinetime { namespace Drivers { class InternalFlash { - public: + public: static void ErasePage(uint32_t address); static void WriteWord(uint32_t address, uint32_t value); - private: + private: static inline void Wait(); }; } diff --git a/src/drivers/Spi.h b/src/drivers/Spi.h index 27000755..6875710d 100644 --- a/src/drivers/Spi.h +++ b/src/drivers/Spi.h @@ -6,7 +6,7 @@ namespace Pinetime { namespace Drivers { class Spi { - public: + public: Spi(SpiMaster& spiMaster, uint8_t pinCsn); Spi(const Spi&) = delete; Spi& operator=(const Spi&) = delete; @@ -20,7 +20,7 @@ namespace Pinetime { void Sleep(); void Wakeup(); - private: + private: SpiMaster& spiMaster; uint8_t pinCsn; }; diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h index aa037504..dfc195b7 100644 --- a/src/drivers/SpiMaster.h +++ b/src/drivers/SpiMaster.h @@ -9,7 +9,7 @@ namespace Pinetime { namespace Drivers { class SpiMaster { - public: + public: ; enum class SpiModule : uint8_t { SPI0, SPI1 }; enum class BitOrder : uint8_t { Msb_Lsb, Lsb_Msb }; @@ -42,7 +42,7 @@ namespace Pinetime { void Sleep(); void Wakeup(); - private: + private: void SetupWorkaroundForFtpan58(NRF_SPIM_Type* spim, uint32_t ppi_channel, uint32_t gpiote_channel); void DisableWorkaroundForFtpan58(NRF_SPIM_Type* spim, uint32_t ppi_channel, uint32_t gpiote_channel); void PrepareTx(const volatile uint32_t bufferAddress, const volatile size_t size); diff --git a/src/drivers/SpiNorFlash.h b/src/drivers/SpiNorFlash.h index 77a470b7..ed6ab315 100644 --- a/src/drivers/SpiNorFlash.h +++ b/src/drivers/SpiNorFlash.h @@ -6,7 +6,7 @@ namespace Pinetime { namespace Drivers { class Spi; class SpiNorFlash { - public: + public: explicit SpiNorFlash(Spi& spi); SpiNorFlash(const SpiNorFlash&) = delete; SpiNorFlash& operator=(const SpiNorFlash&) = delete; @@ -38,7 +38,7 @@ namespace Pinetime { void Sleep(); void Wakeup(); - private: + private: enum class Commands : uint8_t { PageProgram = 0x02, Read = 0x03, diff --git a/src/drivers/St7789.h b/src/drivers/St7789.h index cea9cf19..4fbccbeb 100644 --- a/src/drivers/St7789.h +++ b/src/drivers/St7789.h @@ -6,7 +6,7 @@ namespace Pinetime { namespace Drivers { class Spi; class St7789 { - public: + public: explicit St7789(Spi& spi, uint8_t pinDataCommand); St7789(const St7789&) = delete; St7789& operator=(const St7789&) = delete; @@ -28,7 +28,7 @@ namespace Pinetime { void Sleep(); void Wakeup(); - private: + private: Spi& spi; uint8_t pinDataCommand; uint8_t verticalScrollingStartAddress = 0; diff --git a/src/drivers/TwiMaster.h b/src/drivers/TwiMaster.h index fc3bd2a7..1c0648a2 100644 --- a/src/drivers/TwiMaster.h +++ b/src/drivers/TwiMaster.h @@ -7,7 +7,7 @@ namespace Pinetime { namespace Drivers { class TwiMaster { - public: + public: enum class Modules { TWIM1 }; enum class Frequencies { Khz100, Khz250, Khz400 }; enum class ErrorCodes { NoError, TransactionFailed }; @@ -26,7 +26,7 @@ namespace Pinetime { void Sleep(); void Wakeup(); - private: + private: ErrorCodes Read(uint8_t deviceAddress, uint8_t* buffer, size_t size, bool stop); ErrorCodes Write(uint8_t deviceAddress, const uint8_t* data, size_t size, bool stop); void FixHwFreezed(); diff --git a/src/drivers/Watchdog.h b/src/drivers/Watchdog.h index f1741892..03807d61 100644 --- a/src/drivers/Watchdog.h +++ b/src/drivers/Watchdog.h @@ -4,7 +4,7 @@ namespace Pinetime { namespace Drivers { class Watchdog { - public: + public: enum class ResetReasons { ResetPin, Watchdog, SoftReset, CpuLockup, SystemOff, LpComp, DebugInterface, NFC, HardReset }; void Setup(uint8_t timeoutSeconds); void Start(); @@ -14,20 +14,20 @@ namespace Pinetime { } static const char* ResetReasonToString(ResetReasons reason); - private: + private: ResetReasons resetReason; ResetReasons ActualResetReason() const; }; class WatchdogView { - public: + public: WatchdogView(const Watchdog& watchdog) : watchdog {watchdog} { } Watchdog::ResetReasons ResetReason() const { return watchdog.ResetReason(); } - private: + private: const Watchdog& watchdog; }; } diff --git a/src/systemtask/SystemMonitor.h b/src/systemtask/SystemMonitor.h index d24e9bf7..45c02c2c 100644 --- a/src/systemtask/SystemMonitor.h +++ b/src/systemtask/SystemMonitor.h @@ -9,18 +9,18 @@ namespace Pinetime { struct FreeRtosMonitor {}; template class SystemMonitor { - public: + public: SystemMonitor() = delete; }; template <> class SystemMonitor { - public: + public: void Process() const { } }; template <> class SystemMonitor { - public: + public: void Process() const { if (xTaskGetTickCount() - lastTick > 10000) { NRF_LOG_INFO("---------------------------------------\nFree heap : %d", xPortGetFreeHeapSize()); @@ -36,7 +36,7 @@ namespace Pinetime { } } - private: + private: mutable TickType_t lastTick = 0; mutable TaskStatus_t tasksStatus[10]; }; diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h index 67e62a2d..e65fbea0 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -38,7 +38,7 @@ namespace Pinetime { } namespace System { class SystemTask { - public: + public: enum class Messages { GoToSleep, GoToRunning, @@ -83,7 +83,7 @@ namespace Pinetime { return nimbleController; }; - private: + private: TaskHandle_t taskHandle; Pinetime::Drivers::SpiMaster& spi;