Skip to content

Commit c651122

Browse files
committed
Rename Location to CellularLocation
1 parent 6531063 commit c651122

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

docs/api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
`class ` [`ModemInterface`](#class_modem_interface) | Represents the interface to the 4G modem module which extends the TinyGsmBG96 class.
77
`class ` [`SMS`](#class_s_m_s) | Represents an [SMS](#class_s_m_s) message.
88
`class ` [`Time`](#class_time) | Represents a point in time with year, month, day, hour, minute, second, and offset.
9-
`struct ` [`Location`](#struct_location) | Represents a geographic location with latitude and longitude coordinates.
9+
`struct ` [`CellularLocation`](#struct_location) | Represents a geographic location with latitude and longitude coordinates.
1010

1111
# class `ArduinoCellular` <a id="class_arduino_cellular" class="anchor"></a>
1212

@@ -138,7 +138,7 @@ True if GPS was enabled successfully, false otherwise.
138138
### `getGPSLocation` <a id="class_arduino_cellular_1aee57a2eec5be06172b2fb7cd574d9106" class="anchor"></a>
139139
140140
```cpp
141-
Location getGPSLocation(unsigned long timeout)
141+
CellularLocation getGPSLocation(unsigned long timeout)
142142
```
143143

144144
Gets the GPS location. (Blocking call)
@@ -824,7 +824,7 @@ Returns the timezone offset of the time.
824824
The timezone offset of the time.
825825
<hr />
826826

827-
# struct `Location` <a id="struct_location" class="anchor"></a>
827+
# struct `CellularLocation` <a id="struct_location" class="anchor"></a>
828828

829829
Represents a geographic location with latitude and longitude coordinates.
830830

examples/GetLocation/GetLocation.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void setup(){
2828
}
2929

3030
void loop(){
31-
Location location = cellular.getGPSLocation();
31+
CellularLocation location = cellular.getGPSLocation();
3232
Serial.println("GPS Location:");
3333
Serial.print("* Latitude: "); Serial.println(location.latitude, 6);
3434
Serial.print("* Longitude: "); Serial.println(location.longitude, 6);

examples/GetTime/GetTime.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void setup(){
2828
}
2929

3030
void loop(){
31-
Location location = cellular.getGPSLocation(10000);
31+
CellularLocation location = cellular.getGPSLocation(10000);
3232

3333
if(location.latitude == 0.0 && location.longitude == 0.0){
3434
Serial.println("Failed to get GPS location");

src/ArduinoCellular.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool ArduinoCellular::connect(String apn, String username, String password){
8787
}
8888

8989

90-
Location ArduinoCellular::getGPSLocation(unsigned long timeout){
90+
CellularLocation ArduinoCellular::getGPSLocation(unsigned long timeout){
9191
if (model == ModemModel::EG25){
9292
float latitude = 0.00000;
9393
float longitude = 0.00000;
@@ -98,7 +98,7 @@ Location ArduinoCellular::getGPSLocation(unsigned long timeout){
9898
delay(1000);
9999
}
100100

101-
Location loc;
101+
CellularLocation loc;
102102
loc.latitude = latitude;
103103
loc.longitude = longitude;
104104

@@ -107,7 +107,7 @@ Location ArduinoCellular::getGPSLocation(unsigned long timeout){
107107
if(this->debugStream != nullptr){
108108
this->debugStream->println("Unsupported modem model");
109109
}
110-
return Location();
110+
return CellularLocation();
111111
}
112112
}
113113

src/ArduinoCellular.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ class SMS {
6868

6969

7070
/**
71-
* @struct Location
71+
* @struct CellularLocation
7272
* @brief Represents a geographic location with latitude and longitude coordinates.
7373
*/
74-
struct Location {
74+
struct CellularLocation {
7575
float latitude; /**< The latitude coordinate of the location. */
7676
float longitude; /**< The longitude coordinate of the location. */
7777
};
@@ -136,7 +136,7 @@ class ArduinoCellular {
136136
* @param timeout The timeout (In milliseconds) to wait for the GPS location.
137137
* @return The GPS location. If the location is not retrieved, the latitude and longitude will be 0.0.
138138
*/
139-
Location getGPSLocation(unsigned long timeout = 60000);
139+
CellularLocation getGPSLocation(unsigned long timeout = 60000);
140140

141141
/**
142142
* @brief Gets the current time from the network.

0 commit comments

Comments
 (0)