Skip to content

Commit ac7b2da

Browse files
committed
Update includes to to be relative to src directory
Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
1 parent 624429b commit ac7b2da

File tree

140 files changed

+243
-243
lines changed

Some content is hidden

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

140 files changed

+243
-243
lines changed

src/components/alarm/AlarmController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
18-
#include "AlarmController.h"
18+
#include "components/alarm/AlarmController.h"
1919
#include "systemtask/SystemTask.h"
2020
#include "app_timer.h"
2121
#include "task.h"

src/components/battery/BatteryController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "BatteryController.h"
1+
#include "components/battery/BatteryController.h"
22
#include "drivers/PinMap.h"
33
#include <hal/nrf_gpio.h>
44
#include <nrfx_saadc.h>

src/components/ble/AlertNotificationClient.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "AlertNotificationClient.h"
1+
#include "components/ble/AlertNotificationClient.h"
22
#include <algorithm>
3-
#include "NotificationManager.h"
3+
#include "components/ble/NotificationManager.h"
44
#include "systemtask/SystemTask.h"
55

66
using namespace Pinetime::Controllers;

src/components/ble/AlertNotificationClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <host/ble_gap.h>
88
#undef max
99
#undef min
10-
#include "BleClient.h"
10+
#include "components/ble/BleClient.h"
1111

1212
namespace Pinetime {
1313

src/components/ble/AlertNotificationService.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#include "AlertNotificationService.h"
1+
#include "components/ble/AlertNotificationService.h"
22
#include <hal/nrf_rtc.h>
33
#include <cstring>
44
#include <algorithm>
5-
#include "NotificationManager.h"
5+
#include "components/ble/NotificationManager.h"
66
#include "systemtask/SystemTask.h"
77

88
using namespace Pinetime::Controllers;

src/components/ble/BatteryInformationService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <nrf_log.h>
2-
#include "BatteryInformationService.h"
2+
#include "components/ble/BatteryInformationService.h"
33
#include "components/battery/BatteryController.h"
44

55
using namespace Pinetime::Controllers;

src/components/ble/BleController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "BleController.h"
1+
#include "components/ble/BleController.h"
22

33
using namespace Pinetime::Controllers;
44

src/components/ble/CurrentTimeClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "CurrentTimeClient.h"
1+
#include "components/ble/CurrentTimeClient.h"
22
#include <hal/nrf_rtc.h>
33
#include <nrf_log.h>
44
#include "components/datetime/DateTimeController.h"

src/components/ble/CurrentTimeClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#undef max
66
#undef min
77
#include <cstdint>
8-
#include "BleClient.h"
8+
#include "components/ble/BleClient.h"
99

1010
namespace Pinetime {
1111
namespace Controllers {

src/components/ble/CurrentTimeService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "CurrentTimeService.h"
1+
#include "components/ble/CurrentTimeService.h"
22
#include <hal/nrf_rtc.h>
33
#include <nrf_log.h>
44

src/components/ble/DeviceInformationService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "DeviceInformationService.h"
1+
#include "components/ble/DeviceInformationService.h"
22

33
using namespace Pinetime::Controllers;
44

src/components/ble/DfuService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "DfuService.h"
1+
#include "components/ble/DfuService.h"
22
#include <cstring>
33
#include "components/ble/BleController.h"
44
#include "drivers/SpiNorFlash.h"

src/components/ble/HeartRateService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "HeartRateService.h"
1+
#include "components/ble/HeartRateService.h"
22
#include "components/heartrate/HeartRateController.h"
33
#include "systemtask/SystemTask.h"
44

src/components/ble/ImmediateAlertService.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "ImmediateAlertService.h"
1+
#include "components/ble/ImmediateAlertService.h"
22
#include <cstring>
3-
#include "NotificationManager.h"
3+
#include "components/ble/NotificationManager.h"
44
#include "systemtask/SystemTask.h"
55

66
using namespace Pinetime::Controllers;

src/components/ble/MotionService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "MotionService.h"
1+
#include "components/ble/MotionService.h"
22
#include "components/motion//MotionController.h"
33
#include "systemtask/SystemTask.h"
44

src/components/ble/MusicService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
18-
#include "MusicService.h"
18+
#include "components/ble/MusicService.h"
1919
#include "systemtask/SystemTask.h"
2020

2121
namespace {

src/components/ble/NavigationService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
1818

19-
#include "NavigationService.h"
19+
#include "components/ble/NavigationService.h"
2020

2121
#include "systemtask/SystemTask.h"
2222

src/components/ble/NimbleController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "NimbleController.h"
1+
#include "components/ble/NimbleController.h"
22
#include <hal/nrf_rtc.h>
33
#define min // workaround: nimble's min/max macros conflict with libstdc++
44
#define max

src/components/ble/NimbleController.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
#include <host/ble_gap.h>
88
#undef max
99
#undef min
10-
#include "AlertNotificationClient.h"
11-
#include "AlertNotificationService.h"
12-
#include "BatteryInformationService.h"
13-
#include "CurrentTimeClient.h"
14-
#include "CurrentTimeService.h"
15-
#include "DeviceInformationService.h"
16-
#include "DfuService.h"
17-
#include "ImmediateAlertService.h"
18-
#include "MusicService.h"
19-
#include "NavigationService.h"
20-
#include "ServiceDiscovery.h"
21-
#include "HeartRateService.h"
22-
#include "MotionService.h"
10+
#include "components/ble/AlertNotificationClient.h"
11+
#include "components/ble/AlertNotificationService.h"
12+
#include "components/ble/BatteryInformationService.h"
13+
#include "components/ble/CurrentTimeClient.h"
14+
#include "components/ble/CurrentTimeService.h"
15+
#include "components/ble/DeviceInformationService.h"
16+
#include "components/ble/DfuService.h"
17+
#include "components/ble/ImmediateAlertService.h"
18+
#include "components/ble/MusicService.h"
19+
#include "components/ble/NavigationService.h"
20+
#include "components/ble/ServiceDiscovery.h"
21+
#include "components/ble/HeartRateService.h"
22+
#include "components/ble/MotionService.h"
2323

2424
namespace Pinetime {
2525
namespace Drivers {

src/components/ble/NotificationManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "NotificationManager.h"
1+
#include "components/ble/NotificationManager.h"
22
#include <cstring>
33
#include <algorithm>
44

src/components/ble/ServiceDiscovery.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "ServiceDiscovery.h"
1+
#include "components/ble/ServiceDiscovery.h"
22
#include <libraries/log/nrf_log.h>
3-
#include "BleClient.h"
3+
#include "components/ble/BleClient.h"
44

55
using namespace Pinetime::Controllers;
66

src/components/brightness/BrightnessController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "BrightnessController.h"
1+
#include "components/brightness/BrightnessController.h"
22
#include <hal/nrf_gpio.h>
33
#include "displayapp/screens/Symbols.h"
44
#include "drivers/PinMap.h"

src/components/datetime/DateTimeController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "DateTimeController.h"
1+
#include "components/datetime/DateTimeController.h"
22
#include <date/date.h>
33
#include <libraries/log/nrf_log.h>
44
#include <systemtask/SystemTask.h>

src/components/firmwarevalidator/FirmwareValidator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "FirmwareValidator.h"
1+
#include "components/firmwarevalidator/FirmwareValidator.h"
22

33
#include <hal/nrf_rtc.h>
44
#include "drivers/InternalFlash.h"

src/components/fs/FS.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "FS.h"
1+
#include "components/fs/FS.h"
22
#include <cstring>
33
#include <littlefs/lfs.h>
44
#include <lvgl/lvgl.h>

src/components/gfx/Gfx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Gfx.h"
1+
#include "components/gfx/Gfx.h"
22
#include "drivers/St7789.h"
33
using namespace Pinetime::Components;
44

src/components/heartrate/Biquad.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
C++ port Copyright (C) 2021 Jean-François Milants
55
*/
66

7-
#include "Biquad.h"
7+
#include "components/heartrate/Biquad.h"
88

99
using namespace Pinetime::Controllers;
1010

src/components/heartrate/HeartRateController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "HeartRateController.h"
1+
#include "components/heartrate/HeartRateController.h"
22
#include <heartratetask/HeartRateTask.h>
33
#include <systemtask/SystemTask.h>
44

src/components/heartrate/Ppg.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <vector>
88
#include <nrf_log.h>
9-
#include "Ppg.h"
9+
#include "components/heartrate/Ppg.h"
1010
using namespace Pinetime::Controllers;
1111

1212
/** Original implementation from wasp-os : https://github.com/daniel-thompson/wasp-os/blob/master/wasp/ppg.py */

src/components/heartrate/Ppg.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma once
22

33
#include <array>
4-
#include "Biquad.h"
5-
#include "Ptagc.h"
4+
#include "components/heartrate/Biquad.h"
5+
#include "components/heartrate/Ptagc.h"
66

77
namespace Pinetime {
88
namespace Controllers {

src/components/heartrate/Ptagc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
#include <cmath>
8-
#include "Ptagc.h"
8+
#include "components/heartrate/Ptagc.h"
99

1010
using namespace Pinetime::Controllers;
1111

src/components/motion/MotionController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "MotionController.h"
1+
#include "components/motion/MotionController.h"
22

33
using namespace Pinetime::Controllers;
44

src/components/motor/MotorController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "MotorController.h"
1+
#include "components/motor/MotorController.h"
22
#include <hal/nrf_gpio.h>
33
#include "systemtask/SystemTask.h"
44
#include "app_timer.h"

src/components/rle/RleDecoder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "RleDecoder.h"
1+
#include "components/rle/RleDecoder.h"
22

33
using namespace Pinetime::Tools;
44

src/components/settings/Settings.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Settings.h"
1+
#include "components/settings/Settings.h"
22
#include <cstdlib>
33
#include <cstring>
44

src/components/timer/TimerController.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Created by florian on 16.05.21.
33
//
44

5-
#include "TimerController.h"
5+
#include "components/timer/TimerController.h"
66
#include "systemtask/SystemTask.h"
77
#include "app_timer.h"
88
#include "task.h"

src/displayapp/Colors.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Colors.h"
1+
#include "displayapp/Colors.h"
22

33
using namespace Pinetime::Applications;
44
using namespace Pinetime::Controllers;

src/displayapp/Colors.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include <lvgl/src/lv_misc/lv_color.h>
4-
#include <components/settings/Settings.h>
4+
#include "components/settings/Settings.h"
55

66
namespace Pinetime {
77
namespace Applications {

src/displayapp/DisplayApp.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include "DisplayApp.h"
1+
#include "displayapp/DisplayApp.h"
22
#include <libraries/log/nrf_log.h>
3-
#include <displayapp/screens/HeartRate.h>
4-
#include <displayapp/screens/Motion.h>
5-
#include <displayapp/screens/Timer.h>
6-
#include <displayapp/screens/Alarm.h>
3+
#include "displayapp/screens/HeartRate.h"
4+
#include "displayapp/screens/Motion.h"
5+
#include "displayapp/screens/Timer.h"
6+
#include "displayapp/screens/Alarm.h"
77
#include "components/battery/BatteryController.h"
88
#include "components/ble/BleController.h"
99
#include "components/datetime/DateTimeController.h"

src/displayapp/DisplayApp.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#include <task.h>
66
#include <memory>
77
#include <systemtask/Messages.h>
8-
#include "Apps.h"
9-
#include "LittleVgl.h"
10-
#include "TouchEvents.h"
8+
#include "displayapp/Apps.h"
9+
#include "displayapp/LittleVgl.h"
10+
#include "displayapp/TouchEvents.h"
1111
#include "components/brightness/BrightnessController.h"
1212
#include "components/motor/MotorController.h"
1313
#include "components/firmwarevalidator/FirmwareValidator.h"
@@ -17,7 +17,7 @@
1717
#include "components/alarm/AlarmController.h"
1818
#include "touchhandler/TouchHandler.h"
1919

20-
#include "Messages.h"
20+
#include "displayapp/Messages.h"
2121
#include "BootErrors.h"
2222

2323
namespace Pinetime {

src/displayapp/DisplayAppRecovery.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include "DisplayAppRecovery.h"
1+
#include "displayapp/DisplayAppRecovery.h"
22
#include <FreeRTOS.h>
33
#include <task.h>
44
#include <libraries/log/nrf_log.h>
5-
#include <components/rle/RleDecoder.h>
6-
#include <touchhandler/TouchHandler.h>
5+
#include "components/rle/RleDecoder.h"
6+
#include "touchhandler/TouchHandler.h"
77
#include "displayapp/icons/infinitime/infinitime-nb.c"
88
#include "components/ble/BleController.h"
99

src/displayapp/DisplayAppRecovery.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#include <drivers/Watchdog.h>
1212
#include <components/motor/MotorController.h>
1313
#include "BootErrors.h"
14-
#include "TouchEvents.h"
15-
#include "Apps.h"
16-
#include "Messages.h"
17-
#include "DummyLittleVgl.h"
14+
#include "displayapp/TouchEvents.h"
15+
#include "displayapp/Apps.h"
16+
#include "displayapp/Messages.h"
17+
#include "displayapp/DummyLittleVgl.h"
1818

1919
namespace Pinetime {
2020
namespace Drivers {

src/displayapp/LittleVgl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "LittleVgl.h"
2-
#include "lv_pinetime_theme.h"
1+
#include "displayapp/LittleVgl.h"
2+
#include "displayapp/lv_pinetime_theme.h"
33

44
#include <FreeRTOS.h>
55
#include <task.h>

src/displayapp/lv_pinetime_theme.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/*********************
77
* INCLUDES
88
*********************/
9-
#include "lv_pinetime_theme.h"
9+
#include "displayapp/lv_pinetime_theme.h"
1010

1111
/*********************
1212
* DEFINES

src/displayapp/screens/Alarm.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
18-
#include "Alarm.h"
19-
#include "Screen.h"
20-
#include "Symbols.h"
18+
#include "displayapp/screens/Alarm.h"
19+
#include "displayapp/screens/Screen.h"
20+
#include "displayapp/screens/Symbols.h"
2121

2222
using namespace Pinetime::Applications::Screens;
2323
using Pinetime::Controllers::AlarmController;

0 commit comments

Comments
 (0)