Skip to content

Commit a023264

Browse files
fixed last warnings for render documentation
1 parent a0029b2 commit a023264

File tree

5 files changed

+49
-16
lines changed

5 files changed

+49
-16
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ This library provides a toolkit for interacting with the official Arduino 4G Mod
2020
1. Insert your Arduino 4G module to the Arduino Portenta Mid Carrier
2121
2. Insert a valid SIM card either on the back of the Arduino 4G miniPCI board, or the **PCIE_SIM** connector on the Portenta Mid Carrier
2222
3. Connect the 6 **SERIAL1** header pins to their corresponding pins on the **PCIE_BREAKOUT** header using jumpers
23-
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Cellular/main/extras/connection_img/header.jpg)
23+
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Cellular/main/extras/connection_img/header.jpg?token=GHSAT0AAAAAACNPRJPUBHNVP3J3KMRPUULUZQVDLKQ)
2424
4. Connect the **3V3 PCIE** pin to the **3V3 Buck**
25-
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Cellular/main/extras/connection_img/buck.jpg)
25+
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Cellular/main/extras/connection_img/buck.jpg?token=GHSAT0AAAAAACNPRJPUBUCALG2FUCDZ7AVCZQVDLJA)
2626
5. Connect external power to the Mid Carrier, via the **VIN** (5-12V) because modem use a lot of power when connecting or getting a GPS location. Make sure your supply can handle around 3A.
2727
6. Get the APN settings from your network operator and add them to the "ArduinoSecrets.h" file for each sketch
2828
```c

src/ArduinoCellular.h

+29-8
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
#include <ModemInterface.h>
2121
#include <TimeUtils.h>
2222

23+
/**
24+
* @enum ModemModel
25+
* @brief Represents the model of the modem.
26+
*/
2327
enum ModemModel {
24-
EC200,
25-
EG95,
26-
Unsupported
28+
EC200, /**< Quectel EC200 modem. */
29+
EG95, /**< Quectel EG95 modem. */
30+
Unsupported /**< Unsupported modem model. */
2731
};
2832

2933
/**
@@ -124,6 +128,7 @@ class ArduinoCellular {
124128
/**
125129
* @brief Gets the cellular location. (Blocking call)
126130
* @param timeout The timeout (In milliseconds) to wait for the cellular location.
131+
* @return The cellular location. If the location is not retrieved, the latitude and longitude will be 0.0.
127132
*/
128133
Location getCellularLocation(unsigned long timeout = 10000);
129134

@@ -141,9 +146,8 @@ class ArduinoCellular {
141146

142147
/**
143148
* @brief Sends an SMS message to the specified number.
144-
* @param number The phone number to send the SMS to. (TODO: find out number format)
149+
* @param number The phone number to send the SMS to.
145150
* @param message The message to send.
146-
* @return True if the SMS is sent successfully, false otherwise.
147151
*/
148152
void sendSMS(String number, String message);
149153

@@ -162,6 +166,7 @@ class ArduinoCellular {
162166
/**
163167
* @brief Sends an AT command to the modem and waits for a response, then returns the response.
164168
* @param command The AT command to send.
169+
* @param timeout The timeout (In milliseconds) to wait for the response.
165170
* @return The response from the modem.
166171
*/
167172
String sendATCommand(char * command, unsigned long timeout = 1000);
@@ -187,9 +192,26 @@ class ArduinoCellular {
187192
*/
188193
HttpClient getHTTPClient(const char * server, const int port);
189194

195+
/**
196+
* @brief Gets the HTTPS client for the specified server and port.
197+
* @param server The server address.
198+
* @param port The server port.
199+
* @return The HTTPS client.
200+
*/
190201
HttpClient getHTTPSClient(const char * server, const int port);
202+
203+
/**
204+
* @brief Gets the local IP address.
205+
* @return The local IP address.
206+
*/
207+
IPAddress getIPAddress();
208+
209+
/**
210+
* @brief Gets the signal quality.
211+
* @return The signal quality.
212+
*/
213+
int getSignalQuality();
191214

192-
void getConnectionStatus();
193215
private:
194216
bool connectToGPRS(const char * apn, const char * gprsUser, const char * gprsPass);
195217

@@ -217,7 +239,6 @@ class ArduinoCellular {
217239
* @param latitude Pointer to store the latitude. (0.0 if not retrieved)
218240
* @param longitude Pointer to store the longitude. (0.0 if not retrieved)
219241
* @param timeout The timeout (In milliseconds) to wait for the GPS location.
220-
* @return True if the GPS location is retrieved, false otherwise.
221242
*/
222243
void getGPSLocation(float* latitude, float* longitude, unsigned long timeout = 60000);
223244

@@ -226,7 +247,7 @@ class ArduinoCellular {
226247

227248
ModemModel model; /**< The modem model. */
228249

229-
static unsigned long getTime();
250+
static unsigned long getTime(); /** Callback for getting the current time as an unix timestamp. */
230251
};
231252

232253

src/ArdunioCellular.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,12 @@ void ArduinoCellular::sendSMS(String number, String message){
110110
}
111111

112112

113-
void ArduinoCellular::getConnectionStatus(){
113+
IPAddress ArduinoCellular::getLocalIP(){
114+
return modem.localIP();
115+
}
114116

115-
IPAddress local = modem.localIP();
116-
Serial.print("Local IP:"); Serial.println(local.toString());
117-
Serial.println("Signal quality:"); Serial.println(modem.getSignalQuality());
117+
int ArduinoCellular::getSignalQuality(){
118+
return modem.getSignalQuality();
118119
}
119120

120121
TinyGsmClient ArduinoCellular::getNetworkClient(){

src/ModemInterface.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class ModemInterface : public TinyGsmBG96 {
5757
int power_pin; /**< The pin number for controlling the power of the modem. */
5858
};
5959

60-
extern ModemInterface modem;
60+
/**
61+
* @brief The global modem object.
62+
*/
63+
extern ModemInterface modem;
6164

6265
#endif

src/TimeUtils.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ class Time {
5656

5757
/**
5858
* Initialises the time components with the given values.
59+
* @param year The year component of the time.
60+
* @param month The month component of the time.
61+
* @param day The day component of the time.
62+
* @param hour The hour component of the time.
63+
* @param minute The minute component of the time.
64+
* @param second The second component of the time.
65+
* @param offset The timezone offset in hours (default is 0).
5966
*/
6067
void fromComponents(int year, int month, int day, int hour, int minute, int second, int offset = 0) {
6168
this->year = year;
@@ -100,7 +107,8 @@ class Time {
100107
}
101108

102109
/**
103-
* Returns the year component of the time.
110+
* Returns the year component of the time.\
111+
* @param iso8601 The ISO8601 formatted string to parse.
104112
* @return The year component of the time.
105113
*/
106114
void parseISO8601(String iso8601) {

0 commit comments

Comments
 (0)