summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorAvamander <avamander@gmail.com>2021-04-24 09:00:45 (GMT)
committerAvamander <avamander@gmail.com>2021-04-24 09:00:45 (GMT)
commit69898545193a82f7d72c9f47c9d9de36167b157b (patch)
treecf2bea6d67e8d91a7d6222b8e0b55a0075575003 /src/components
parent40d45d923b033363ff1304b47eac238dd4495a57 (diff)
Changed access modified indentation
Diffstat (limited to 'src/components')
-rw-r--r--src/components/battery/BatteryController.h8
-rw-r--r--src/components/ble/AlertNotificationClient.h4
-rw-r--r--src/components/ble/AlertNotificationService.h4
-rw-r--r--src/components/ble/BatteryInformationService.h4
-rw-r--r--src/components/ble/BleClient.h2
-rw-r--r--src/components/ble/BleController.h4
-rw-r--r--src/components/ble/CurrentTimeClient.h4
-rw-r--r--src/components/ble/CurrentTimeService.h4
-rw-r--r--src/components/ble/DeviceInformationService.h4
-rw-r--r--src/components/ble/DfuService.h14
-rw-r--r--src/components/ble/HeartRateService.h4
-rw-r--r--src/components/ble/ImmediateAlertService.h4
-rw-r--r--src/components/ble/MusicService.h4
-rw-r--r--src/components/ble/NavigationService.h4
-rw-r--r--src/components/ble/NimbleController.h4
-rw-r--r--src/components/ble/NotificationManager.h4
-rw-r--r--src/components/ble/ServiceDiscovery.h4
-rw-r--r--src/components/brightness/BrightnessController.h4
-rw-r--r--src/components/datetime/DateTimeController.h4
-rw-r--r--src/components/firmwarevalidator/FirmwareValidator.h4
-rw-r--r--src/components/gfx/Gfx.h4
-rw-r--r--src/components/heartrate/Biquad.h4
-rw-r--r--src/components/heartrate/HeartRateController.h4
-rw-r--r--src/components/heartrate/Ppg.h4
-rw-r--r--src/components/heartrate/Ptagc.h4
-rw-r--r--src/components/motion/MotionController.h4
-rw-r--r--src/components/motor/MotorController.h4
-rw-r--r--src/components/rle/RleDecoder.h4
-rw-r--r--src/components/settings/Settings.h4
29 files changed, 64 insertions, 64 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h
index e5c734d..04bcf6b 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 <int N> class CircBuffer {
- public:
+ public:
CircBuffer() : arr {}, sz {}, cap {N}, head {} {
}
/**
@@ -32,7 +32,7 @@ namespace Pinetime {
return (sum / sz);
}
- private:
+ private:
std::array<int, N> 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 469bd4a..dfba814 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<void(uint16_t)> 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 66bb9be..5c7d428 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 59ed9c6..7d06090 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 d8a58e1..6067c15 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<void(uint16_t)> lambda) = 0;
};
}
diff --git a/src/components/ble/BleController.h b/src/components/ble/BleController.h
index 6f5c236..2cba26a 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<uint8_t, 6>;
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 c48a016..6424c03 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<void(uint16_t)> 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 0a9a18a..ca87d97 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 3ff48b6..54b3e96 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 b932d80..4708a4a 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 7422445..0b16703 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 6bd11bd..1f778ac 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 5416219..5f5343e 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 dc4f0a0..5aab263 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 6d4aa38..5dd01e4 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 8e8fb37..d4072cc 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<Notification, TotalNbNotifications> notifications;
diff --git a/src/components/ble/ServiceDiscovery.h b/src/components/ble/ServiceDiscovery.h
index 56bb3e4..fc3b38c 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<BleClient*, 2>&& bleClients);
void StartDiscovery(uint16_t connectionHandle);
- private:
+ private:
BleClient** clientIterator;
std::array<BleClient*, 2> clients;
void OnServiceDiscovered(uint16_t connectionHandle);
diff --git a/src/components/brightness/BrightnessController.h b/src/components/brightness/BrightnessController.h
index e8c36e3..c47158a 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 823442b..d0ae727 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 00b5a0b..ce644f9 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 b45fb45..54c4a8b 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 0d62b1f..7c8ca58 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 5558d35..d3a8460 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 51db758..6a2fcf1 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<int, 200> data;
size_t dataIndex = 0;
float offset;
diff --git a/src/components/heartrate/Ptagc.h b/src/components/heartrate/Ptagc.h
index aaa6f1e..3476636 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 1a55119..bf64481 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 4662a8d..df61af7 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 c21f45c..0f607fb 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 05d6e7e..18c87fd 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 {