Skip to content

Commit 6a3968d

Browse files
committed
Added type hints to gnss
1 parent d73348f commit 6a3968d

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

shared-bindings/gnss/GNSS.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ STATIC mp_obj_t gnss_make_new(const mp_obj_type_t *type, size_t n_args, const mp
9090
return MP_OBJ_FROM_PTR(self);
9191
}
9292

93-
//| def deinit(self) -> Any:
93+
//| def deinit(self) -> None:
9494
//| """Turn off the GNSS."""
9595
//| ...
9696
//|
@@ -107,7 +107,7 @@ STATIC void check_for_deinit(gnss_obj_t *self) {
107107
}
108108
}
109109

110-
//| def update(self) -> Any:
110+
//| def update(self) -> None:
111111
//| """Update GNSS positioning information."""
112112
//| ...
113113
//|
@@ -120,7 +120,7 @@ STATIC mp_obj_t gnss_obj_update(mp_obj_t self_in) {
120120
}
121121
MP_DEFINE_CONST_FUN_OBJ_1(gnss_update_obj, gnss_obj_update);
122122

123-
//| latitude: Any = ...
123+
//| latitude: float = ...
124124
//| """Latitude of current position in degrees (float)."""
125125
//|
126126
STATIC mp_obj_t gnss_obj_get_latitude(mp_obj_t self_in) {
@@ -137,7 +137,7 @@ const mp_obj_property_t gnss_latitude_obj = {
137137
(mp_obj_t)&mp_const_none_obj},
138138
};
139139

140-
//| longitude: Any = ...
140+
//| longitude: float = ...
141141
//| """Longitude of current position in degrees (float)."""
142142
//|
143143
STATIC mp_obj_t gnss_obj_get_longitude(mp_obj_t self_in) {
@@ -154,7 +154,7 @@ const mp_obj_property_t gnss_longitude_obj = {
154154
(mp_obj_t)&mp_const_none_obj},
155155
};
156156

157-
//| altitude: Any = ...
157+
//| altitude: float = ...
158158
//| """Altitude of current position in meters (float)."""
159159
//|
160160
STATIC mp_obj_t gnss_obj_get_altitude(mp_obj_t self_in) {
@@ -171,7 +171,7 @@ const mp_obj_property_t gnss_altitude_obj = {
171171
(mp_obj_t)&mp_const_none_obj},
172172
};
173173

174-
//| timestamp: Any = ...
174+
//| timestamp: string = ...
175175
//| """Time when the position data was updated."""
176176
//|
177177
STATIC mp_obj_t gnss_obj_get_timestamp(mp_obj_t self_in) {
@@ -190,7 +190,7 @@ const mp_obj_property_t gnss_timestamp_obj = {
190190
(mp_obj_t)&mp_const_none_obj},
191191
};
192192

193-
//| fix: Any = ...
193+
//| fix: string = ...
194194
//| """Fix mode."""
195195
//|
196196
STATIC mp_obj_t gnss_obj_get_fix(mp_obj_t self_in) {

shared-bindings/gnss/PositionFix.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
//| def __init__(self):
3333
//| """Enum-like class to define the position fix mode."""
3434
//|
35-
//| INVALID: Any = ...
35+
//| INVALID: gnss.PositionFix = ...
3636
//| """No measurement.
3737
//|
3838
//| :type gnss.PositionFix:"""
3939
//|
40-
//| FIX_2D: Any = ...
40+
//| FIX_2D: gnss.PositionFix = ...
4141
//| """2D fix.
4242
//|
4343
//| :type gnss.PositionFix:"""
4444
//|
45-
//| FIX_3D: Any = ...
45+
//| FIX_3D: gnss.PositionFix = ...
4646
//| """3D fix.
4747
//|
4848
//| :type gnss.PositionFix:"""

shared-bindings/gnss/SatelliteSystem.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,27 @@
3232
//| def __init__(self):
3333
//| """Enum-like class to define the satellite system type."""
3434
//|
35-
//| GPS: Any = ...
35+
//| GPS: gnss.SatelliteSystem = ...
3636
//| """Global Positioning System.
3737
//|
3838
//| :type gnss.SatelliteSystem:"""
3939
//|
40-
//| GLONASS: Any = ...
40+
//| GLONASS: gnss.SatelliteSystem = ...
4141
//| """GLObal NAvigation Satellite System.
4242
//|
4343
//| :type gnss.SatelliteSystem:"""
4444
//|
45-
//| SBAS: Any = ...
45+
//| SBAS: gnss.SatelliteSystem = ...
4646
//| """Satellite Based Augmentation System.
4747
//|
4848
//| :type gnss.SatelliteSystem:"""
4949
//|
50-
//| QZSS_L1CA: Any = ...
50+
//| QZSS_L1CA: gnss.SatelliteSystem = ...
5151
//| """Quasi-Zenith Satellite System L1C/A.
5252
//|
5353
//| :type gnss.SatelliteSystem:"""
5454
//|
55-
//| QZSS_L1S: Any = ...
55+
//| QZSS_L1S: gnss.SatelliteSystem = ...
5656
//| """Quasi-Zenith Satellite System L1S.
5757
//|
5858
//| :type gnss.SatelliteSystem:"""

0 commit comments

Comments
 (0)