Skip to content

Commit 6989854

Browse files
committed
Changed access modified indentation
1 parent 40d45d9 commit 6989854

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+175
-175
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Language: Cpp
3-
AccessModifierOffset: 2
3+
AccessModifierOffset: -2
44
AlignAfterOpenBracket: Align
55
AlignConsecutiveMacros: true
66
AlignConsecutiveAssignments: false

src/BootloaderVersion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Pinetime {
44
class BootloaderVersion {
5-
public:
5+
public:
66
static uint32_t Major();
77
static uint32_t Minor();
88
static uint32_t Patch();

src/components/battery/BatteryController.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Pinetime {
1212
is given as the template parameter N.
1313
*/
1414
template <int N> class CircBuffer {
15-
public:
15+
public:
1616
CircBuffer() : arr {}, sz {}, cap {N}, head {} {
1717
}
1818
/**
@@ -32,15 +32,15 @@ namespace Pinetime {
3232
return (sum / sz);
3333
}
3434

35-
private:
35+
private:
3636
std::array<int, N> arr; /**< internal array used to store the values*/
3737
uint8_t sz; /**< The current size of the array.*/
3838
uint8_t cap; /**< Total capacity of the CircBuffer.*/
3939
uint8_t head; /**< The current head of the CircBuffer*/
4040
};
4141

4242
class Battery {
43-
public:
43+
public:
4444
Battery();
4545

4646
void Init();
@@ -61,7 +61,7 @@ namespace Pinetime {
6161
return isPowerPresent;
6262
}
6363

64-
private:
64+
private:
6565
static Battery* instance;
6666
nrf_saadc_value_t saadc_value;
6767

src/components/ble/AlertNotificationClient.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Pinetime {
1919
class NotificationManager;
2020

2121
class AlertNotificationClient : public BleClient {
22-
public:
22+
public:
2323
explicit AlertNotificationClient(Pinetime::System::SystemTask& systemTask,
2424
Pinetime::Controllers::NotificationManager& notificationManager);
2525

@@ -34,7 +34,7 @@ namespace Pinetime {
3434
void Reset();
3535
void Discover(uint16_t connectionHandle, std::function<void(uint16_t)> lambda) override;
3636

37-
private:
37+
private:
3838
static constexpr uint16_t ansServiceId {0x1811};
3939
static constexpr uint16_t supportedNewAlertCategoryId = 0x2a47;
4040
static constexpr uint16_t supportedUnreadAlertCategoryId = 0x2a48;

src/components/ble/AlertNotificationService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Pinetime {
2020
class NotificationManager;
2121

2222
class AlertNotificationService {
23-
public:
23+
public:
2424
AlertNotificationService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager);
2525
void Init();
2626

@@ -32,7 +32,7 @@ namespace Pinetime {
3232

3333
enum class IncomingCallResponses : uint8_t { Reject = 0x00, Answer = 0x01, Mute = 0x02 };
3434

35-
private:
35+
private:
3636
enum class Categories : uint8_t {
3737
SimpleAlert = 0x00,
3838
Email = 0x01,

src/components/ble/BatteryInformationService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ namespace Pinetime {
1212
namespace Controllers {
1313
class Battery;
1414
class BatteryInformationService {
15-
public:
15+
public:
1616
BatteryInformationService(Controllers::Battery& batteryController);
1717
void Init();
1818

1919
int OnBatteryServiceRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
2020

21-
private:
21+
private:
2222
Controllers::Battery& batteryController;
2323
static constexpr uint16_t batteryInformationServiceId {0x180F};
2424
static constexpr uint16_t batteryLevelId {0x2A19};

src/components/ble/BleClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Pinetime {
66
namespace Controllers {
77
class BleClient {
8-
public:
8+
public:
99
virtual void Discover(uint16_t connectionHandle, std::function<void(uint16_t)> lambda) = 0;
1010
};
1111
}

src/components/ble/BleController.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Pinetime {
77
namespace Controllers {
88
class Ble {
9-
public:
9+
public:
1010
using BleAddress = std::array<uint8_t, 6>;
1111
enum class FirmwareUpdateStates { Idle, Running, Validated, Error };
1212
enum class AddressTypes { Public, Random };
@@ -49,7 +49,7 @@ namespace Pinetime {
4949
addressType = t;
5050
}
5151

52-
private:
52+
private:
5353
bool isConnected = false;
5454
bool isFirmwareUpdating = false;
5555
uint32_t firmwareUpdateTotalBytes = 0;

src/components/ble/CurrentTimeClient.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Pinetime {
1212
class DateTime;
1313

1414
class CurrentTimeClient : public BleClient {
15-
public:
15+
public:
1616
explicit CurrentTimeClient(DateTime& dateTimeController);
1717
void Init();
1818
void Reset();
@@ -27,7 +27,7 @@ namespace Pinetime {
2727
}
2828
void Discover(uint16_t connectionHandle, std::function<void(uint16_t)> lambda) override;
2929

30-
private:
30+
private:
3131
typedef struct __attribute__((packed)) {
3232
uint16_t year;
3333
uint8_t month;

src/components/ble/CurrentTimeService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
namespace Pinetime {
1313
namespace Controllers {
1414
class CurrentTimeService {
15-
public:
15+
public:
1616
CurrentTimeService(DateTime& dateTimeController);
1717
void Init();
1818

1919
int OnTimeAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
2020

21-
private:
21+
private:
2222
static constexpr uint16_t ctsId {0x1805};
2323
static constexpr uint16_t ctsCharId {0x2a2b};
2424

src/components/ble/DeviceInformationService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
namespace Pinetime {
1010
namespace Controllers {
1111
class DeviceInformationService {
12-
public:
12+
public:
1313
DeviceInformationService();
1414
void Init();
1515

1616
int OnDeviceInfoRequested(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
1717

18-
private:
18+
private:
1919
static constexpr uint16_t deviceInfoId {0x180a};
2020
static constexpr uint16_t manufacturerNameId {0x2a29};
2121
static constexpr uint16_t modelNumberId {0x2a24};

src/components/ble/DfuService.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Pinetime {
2020
class Ble;
2121

2222
class DfuService {
23-
public:
23+
public:
2424
DfuService(Pinetime::System::SystemTask& systemTask,
2525
Pinetime::Controllers::Ble& bleController,
2626
Pinetime::Drivers::SpiNorFlash& spiNorFlash);
@@ -30,24 +30,24 @@ namespace Pinetime {
3030
void Reset();
3131

3232
class NotificationManager {
33-
public:
33+
public:
3434
NotificationManager();
3535
bool AsyncSend(uint16_t connection, uint16_t charactHandle, uint8_t* data, size_t size);
3636
void Send(uint16_t connection, uint16_t characteristicHandle, const uint8_t* data, const size_t s);
3737

38-
private:
38+
private:
3939
TimerHandle_t timer;
4040
uint16_t connectionHandle = 0;
4141
uint16_t characteristicHandle = 0;
4242
size_t size = 0;
4343
uint8_t buffer[10];
4444

45-
public:
45+
public:
4646
void OnNotificationTimer();
4747
void Reset();
4848
};
4949
class DfuImage {
50-
public:
50+
public:
5151
DfuImage(Pinetime::Drivers::SpiNorFlash& spiNorFlash) : spiNorFlash {spiNorFlash} {
5252
}
5353
void Init(size_t chunkSize, size_t totalSize, uint16_t expectedCrc);
@@ -56,7 +56,7 @@ namespace Pinetime {
5656
bool Validate();
5757
bool IsComplete();
5858

59-
private:
59+
private:
6060
Pinetime::Drivers::SpiNorFlash& spiNorFlash;
6161
static constexpr size_t bufferSize = 200;
6262
bool ready = false;
@@ -73,7 +73,7 @@ namespace Pinetime {
7373
uint16_t ComputeCrc(uint8_t const* p_data, uint32_t size, uint16_t const* p_crc);
7474
};
7575

76-
private:
76+
private:
7777
Pinetime::System::SystemTask& systemTask;
7878
Pinetime::Controllers::Ble& bleController;
7979
DfuImage dfuImage;

src/components/ble/HeartRateService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ namespace Pinetime {
1212
namespace Controllers {
1313
class HeartRateController;
1414
class HeartRateService {
15-
public:
15+
public:
1616
HeartRateService(Pinetime::System::SystemTask& system, Controllers::HeartRateController& heartRateController);
1717
void Init();
1818
int OnHeartRateRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
1919
void OnNewHeartRateValue(uint8_t hearRateValue);
2020

21-
private:
21+
private:
2222
Pinetime::System::SystemTask& system;
2323
Controllers::HeartRateController& heartRateController;
2424
static constexpr uint16_t heartRateServiceId {0x180D};

src/components/ble/ImmediateAlertService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ namespace Pinetime {
1212
namespace Controllers {
1313
class NotificationManager;
1414
class ImmediateAlertService {
15-
public:
15+
public:
1616
enum class Levels : uint8_t { NoAlert = 0, MildAlert = 1, HighAlert = 2 };
1717

1818
ImmediateAlertService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager);
1919
void Init();
2020
int OnAlertLevelChanged(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
2121

22-
private:
22+
private:
2323
Pinetime::System::SystemTask& systemTask;
2424
NotificationManager& notificationManager;
2525

src/components/ble/MusicService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Pinetime {
3737
namespace Controllers {
3838

3939
class MusicService {
40-
public:
40+
public:
4141
explicit MusicService(Pinetime::System::SystemTask& system);
4242

4343
void Init();
@@ -70,7 +70,7 @@ namespace Pinetime {
7070

7171
enum MusicStatus { NotPlaying = 0x00, Playing = 0x01 };
7272

73-
private:
73+
private:
7474
static constexpr uint8_t msId[2] = {0x00, 0x00};
7575
static constexpr uint8_t msEventCharId[2] = {0x01, 0x00};
7676
static constexpr uint8_t msStatusCharId[2] = {0x02, 0x00};

src/components/ble/NavigationService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Pinetime {
3737
namespace Controllers {
3838

3939
class NavigationService {
40-
public:
40+
public:
4141
explicit NavigationService(Pinetime::System::SystemTask& system);
4242

4343
void Init();
@@ -52,7 +52,7 @@ namespace Pinetime {
5252

5353
int getProgress();
5454

55-
private:
55+
private:
5656
static constexpr uint8_t navId[2] = {0x01, 0x00};
5757
static constexpr uint8_t navFlagCharId[2] = {0x01, 0x00};
5858
static constexpr uint8_t navNarrativeCharId[2] = {0x02, 0x00};

src/components/ble/NimbleController.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace Pinetime {
3636

3737
class NimbleController {
3838

39-
public:
39+
public:
4040
NimbleController(Pinetime::System::SystemTask& systemTask,
4141
Pinetime::Controllers::Ble& bleController,
4242
DateTime& dateTimeController,
@@ -71,7 +71,7 @@ namespace Pinetime {
7171

7272
uint16_t connHandle();
7373

74-
private:
74+
private:
7575
static constexpr const char* deviceName = "InfiniTime";
7676
Pinetime::System::SystemTask& systemTask;
7777
Pinetime::Controllers::Ble& bleController;

src/components/ble/NotificationManager.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Pinetime {
99
namespace Controllers {
1010
class NotificationManager {
11-
public:
11+
public:
1212
enum class Categories {
1313
Unknown,
1414
SimpleAlert,
@@ -52,7 +52,7 @@ namespace Pinetime {
5252
};
5353
size_t NbNotifications() const;
5454

55-
private:
55+
private:
5656
Notification::Id GetNextId();
5757
static constexpr uint8_t TotalNbNotifications = 5;
5858
std::array<Notification, TotalNbNotifications> notifications;

src/components/ble/ServiceDiscovery.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ namespace Pinetime {
88
class BleClient;
99

1010
class ServiceDiscovery {
11-
public:
11+
public:
1212
ServiceDiscovery(std::array<BleClient*, 2>&& bleClients);
1313

1414
void StartDiscovery(uint16_t connectionHandle);
1515

16-
private:
16+
private:
1717
BleClient** clientIterator;
1818
std::array<BleClient*, 2> clients;
1919
void OnServiceDiscovered(uint16_t connectionHandle);

src/components/brightness/BrightnessController.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Pinetime {
66
namespace Controllers {
77
class BrightnessController {
8-
public:
8+
public:
99
enum class Levels { Off, Low, Medium, High };
1010
void Init();
1111

@@ -21,7 +21,7 @@ namespace Pinetime {
2121
const char* GetIcon();
2222
const char* ToString();
2323

24-
private:
24+
private:
2525
static constexpr uint8_t pinLcdBacklight1 = 14;
2626
static constexpr uint8_t pinLcdBacklight2 = 22;
2727
static constexpr uint8_t pinLcdBacklight3 = 23;

src/components/datetime/DateTimeController.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Pinetime {
99
}
1010
namespace Controllers {
1111
class DateTime {
12-
public:
12+
public:
1313
enum class Days : uint8_t { Unknown, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday };
1414
enum class Months : uint8_t {
1515
Unknown,
@@ -75,7 +75,7 @@ namespace Pinetime {
7575
return uptime;
7676
}
7777

78-
private:
78+
private:
7979
System::SystemTask& systemTask;
8080
uint16_t year = 0;
8181
Months month = Months::Unknown;

0 commit comments

Comments
 (0)