You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/README.md
+5-15Lines changed: 5 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Folder `/source`
1
+
# Folder `source`
2
2
3
3
This folder contains the source code of the app, written in **Monkey C**, Garmin’s programming language. It uses the Connect IQ SDK for user interface components, application settings, persistent storage, and HTTP communication with the openHAB server.
4
4
@@ -13,48 +13,38 @@ Two mechanisms are used to tailor the source code for different target devices:
13
13
- The relevant `config` and `theme` directories are added to the device-specific source path in [`monkey.jungle`](../README.md#root-folder-).
14
14
- In the shared `main` source, exclude annotations are used to adapt the code to individual target devices. These annotations are mapped to devices in [`monkey.jungle`](../README.md#root-folder-) and are documented there.
15
15
16
-
<br>
17
-
18
16
### Other Annotations
19
17
20
18
-`(:glance)` marks code that must be included in the _Glance_ view.
21
19
22
-
<br>
23
-
24
20
### **Inline Documentation**
25
21
26
22
All `.mc` files include inline comments and documentation describing the purpose and internal workings of each class.
27
23
28
-
<br>
29
-
30
24
### **Further Reading**
31
25
32
26
-[Connect IQ Core Topics](https://developer.garmin.com/connect-iq/core-topics/)
33
27
-[Connect IQ API Docs](https://developer.garmin.com/connect-iq/api-docs/)
34
28
35
29
---
36
30
37
-
## Folder Structure
31
+
## Subfolders
38
32
39
-
### Subfolder `config`
33
+
### Subfolder `config/`
40
34
41
35
This folder defines device-specific configuration using code-based _Constants_, which replace Garmin SDK _Properties_ due to their limitations. Unlike _Properties_, _Constants_ are embedded in the code, update automatically with new app versions, and benefit from compiler validation.
42
36
43
37
For more details, continue reading the folder’s [README](config/README.md).
44
38
45
-
<br>
46
-
47
-
### Subfolder `main`
39
+
### Subfolder `main/`
48
40
49
41
Contains the core application source code that is shared across all target devices. This includes the data layer, infrastructure and service components, as well as the user interface logic and views.
50
42
51
43
Although the `main` code is designed to be largely device-agnostic and to rely on `config` and `themes` for device-specific behavior, there are a few places where different implementations are required depending on device characteristics, such as button-based versus touch-based interaction or round versus rectangular displays. In these cases, device-specific code paths are introduced using exclude annotations directly within the source.
52
44
53
45
For additional details, refer to the folder’s [README](main/README.md).
54
46
55
-
<br>
56
-
57
-
### Subfolder `themes`
47
+
### Subfolder `themes/`
58
48
59
49
Themes define the color schemes used in the app and can change dynamically at runtime. This also includes icons whose colors must be adapted to the active theme. Themes are used to implement the light and dark mode on Edge devices.
Copy file name to clipboardExpand all lines: source/main/data/communications/README.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@ This folder contains the connection management logic, HTTP request handling and
8
8
9
9
## Subfolder Structure
10
10
11
-
### `connection/`
11
+
### Subfolder `connection/`
12
12
13
13
Contains the `ConnectionManager`, which tracks the currently available connection type (BLE vs. Wi-Fi) and manages transitions between normal, degraded (Wi-Fi), and offline modes.
14
14
15
15
For more details on connection behavior, see the [Network Access](https://next.openhab.org/docs/apps/garmin/#network-access) section of the user manual.
16
16
17
17
---
18
18
19
-
### `sync-delegates/`
19
+
### Subfolder `sync-delegates/`
20
20
21
21
Implements Wi-Fi-based synchronization used when no BLE connection is available.
22
22
@@ -29,9 +29,7 @@ Sync delegates are responsible for sending commands and updating the sitemap ove
29
29
Introduces SyncDelegate support and provides basic guidance on implementing Wi-Fi synchronization.
30
30
-[Connect IQ API Docs – `Toybox.Communications.SyncDelegate`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications/SyncDelegate.html)
31
31
32
-
<br>
33
-
34
-
### `web-requests/`
32
+
### Subfolder `web-requests/`
35
33
36
34
Implements communication with the openHAB server using the Connect IQ SDK’s `Toybox.Communications` module.
Copy file name to clipboardExpand all lines: source/main/user-interface/features/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,17 +71,17 @@ Device-specific behavior is defined in the `monkey.jungle` build file. Exclusion
71
71
72
72
### Subfolders
73
73
74
-
#### `manager/`
74
+
#### Subfolder `manager/`
75
75
76
76
Contains `SettingsMenuManager`, which controls the lifecycle and presentation of the settings menu.
77
77
78
78
It maintains singleton instances of the menu and its input delegate, tracks whether the menu is currently visible, and coordinates transitions between the homepage and the settings view. It also determines focus behavior based on slide direction and input type, and manages pushing and popping the view on the `ViewStack`.
79
79
80
-
#### `menu/`
80
+
#### Subfolder `menu/`
81
81
82
82
Contains the `SettingsMenu` implementation based on `BaseMenu`, along with the corresponding input delegates for handling user interaction.
83
83
84
-
#### `menu-items/`
84
+
#### Subfolder `menu-items/`
85
85
86
86
Contains the individual menu items displayed within the _Settings_ menu.
0 commit comments