@@ -42,7 +42,7 @@ SARA_R5::SARA_R5(int powerPin, int resetPin, uint8_t maxInitDepth)
42
42
}
43
43
44
44
#ifdef SARA_R5_SOFTWARE_SERIAL_ENABLED
45
- boolean SARA_R5::begin (SoftwareSerial &softSerial, unsigned long baud)
45
+ bool SARA_R5::begin (SoftwareSerial &softSerial, unsigned long baud)
46
46
{
47
47
SARA_R5_error_t err;
48
48
@@ -57,7 +57,7 @@ boolean SARA_R5::begin(SoftwareSerial &softSerial, unsigned long baud)
57
57
}
58
58
#endif
59
59
60
- boolean SARA_R5::begin (HardwareSerial &hardSerial, unsigned long baud)
60
+ bool SARA_R5::begin (HardwareSerial &hardSerial, unsigned long baud)
61
61
{
62
62
SARA_R5_error_t err;
63
63
@@ -79,7 +79,7 @@ void SARA_R5::enableDebugging(Stream &debugPort)
79
79
_printDebug = true ;
80
80
}
81
81
82
- boolean SARA_R5::bufferedPoll (void )
82
+ bool SARA_R5::bufferedPoll (void )
83
83
{
84
84
int avail = 0 ;
85
85
char c = 0 ;
@@ -131,7 +131,7 @@ boolean SARA_R5::bufferedPoll(void)
131
131
return handled;
132
132
}
133
133
134
- boolean SARA_R5::processReadEvent (char * event)
134
+ bool SARA_R5::processReadEvent (char * event)
135
135
{
136
136
{
137
137
int socket, length;
@@ -190,7 +190,7 @@ boolean SARA_R5::processReadEvent(char* event)
190
190
return false ;
191
191
}
192
192
193
- boolean SARA_R5::poll (void )
193
+ bool SARA_R5::poll (void )
194
194
{
195
195
int avail = 0 ;
196
196
char c = 0 ;
@@ -510,7 +510,7 @@ SARA_R5_error_t SARA_R5::at(void)
510
510
return err;
511
511
}
512
512
513
- SARA_R5_error_t SARA_R5::enableEcho (boolean enable)
513
+ SARA_R5_error_t SARA_R5::enableEcho (bool enable)
514
514
{
515
515
SARA_R5_error_t err;
516
516
char *command;
@@ -1031,7 +1031,7 @@ SARA_R5_error_t SARA_R5::getUtimeConfiguration(int32_t *offsetNanoseconds, int32
1031
1031
return err;
1032
1032
}
1033
1033
1034
- SARA_R5_error_t SARA_R5::autoTimeZone (boolean enable)
1034
+ SARA_R5_error_t SARA_R5::autoTimeZone (bool enable)
1035
1035
{
1036
1036
SARA_R5_error_t err;
1037
1037
char *command;
@@ -1122,7 +1122,7 @@ SARA_R5_registration_status_t SARA_R5::registration(void)
1122
1122
return (SARA_R5_registration_status_t)status;
1123
1123
}
1124
1124
1125
- boolean SARA_R5::setNetworkProfile (mobile_network_operator_t mno, boolean autoReset, boolean urcNotification)
1125
+ bool SARA_R5::setNetworkProfile (mobile_network_operator_t mno, bool autoReset, bool urcNotification)
1126
1126
{
1127
1127
mobile_network_operator_t currentMno;
1128
1128
@@ -1262,7 +1262,7 @@ SARA_R5_error_t SARA_R5::getAPN(int cid, String *apn, IPAddress *ip)
1262
1262
1263
1263
char *searchPtr = response;
1264
1264
1265
- boolean keepGoing = true ;
1265
+ bool keepGoing = true ;
1266
1266
while (keepGoing == true )
1267
1267
{
1268
1268
int apnLen = 0 ;
@@ -2542,7 +2542,7 @@ SARA_R5_error_t SARA_R5::setHTTPpassword(int profile, String password)
2542
2542
return err;
2543
2543
}
2544
2544
2545
- SARA_R5_error_t SARA_R5::setHTTPauthentication (int profile, boolean authenticate)
2545
+ SARA_R5_error_t SARA_R5::setHTTPauthentication (int profile, bool authenticate)
2546
2546
{
2547
2547
SARA_R5_error_t err;
2548
2548
char *command;
@@ -2584,7 +2584,7 @@ SARA_R5_error_t SARA_R5::setHTTPserverPort(int profile, int port)
2584
2584
return err;
2585
2585
}
2586
2586
2587
- SARA_R5_error_t SARA_R5::setHTTPsecure (int profile, boolean secure)
2587
+ SARA_R5_error_t SARA_R5::setHTTPsecure (int profile, bool secure)
2588
2588
{
2589
2589
SARA_R5_error_t err;
2590
2590
char *command;
@@ -2797,7 +2797,7 @@ SARA_R5_error_t SARA_R5::performPDPaction(int profile, SARA_R5_pdp_actions_t act
2797
2797
return err;
2798
2798
}
2799
2799
2800
- SARA_R5_error_t SARA_R5::activatePDPcontext (boolean status, int cid)
2800
+ SARA_R5_error_t SARA_R5::activatePDPcontext (bool status, int cid)
2801
2801
{
2802
2802
SARA_R5_error_t err;
2803
2803
char *command;
@@ -2820,12 +2820,12 @@ SARA_R5_error_t SARA_R5::activatePDPcontext(boolean status, int cid)
2820
2820
return err;
2821
2821
}
2822
2822
2823
- boolean SARA_R5::isGPSon (void )
2823
+ bool SARA_R5::isGPSon (void )
2824
2824
{
2825
2825
SARA_R5_error_t err;
2826
2826
char *command;
2827
2827
char *response;
2828
- boolean on = false ;
2828
+ bool on = false ;
2829
2829
2830
2830
command = sara_r5_calloc_char (strlen (SARA_R5_GNSS_POWER) + 2 );
2831
2831
if (command == NULL )
@@ -2861,11 +2861,11 @@ boolean SARA_R5::isGPSon(void)
2861
2861
return on;
2862
2862
}
2863
2863
2864
- SARA_R5_error_t SARA_R5::gpsPower (boolean enable, gnss_system_t gnss_sys, gnss_aiding_mode_t gnss_aiding)
2864
+ SARA_R5_error_t SARA_R5::gpsPower (bool enable, gnss_system_t gnss_sys, gnss_aiding_mode_t gnss_aiding)
2865
2865
{
2866
2866
SARA_R5_error_t err;
2867
2867
char *command;
2868
- boolean gpsState;
2868
+ bool gpsState;
2869
2869
2870
2870
// Don't turn GPS on/off if it's already on/off
2871
2871
gpsState = isGPSon ();
@@ -2893,10 +2893,10 @@ SARA_R5_error_t SARA_R5::gpsPower(boolean enable, gnss_system_t gnss_sys, gnss_a
2893
2893
return err;
2894
2894
}
2895
2895
2896
- SARA_R5_error_t SARA_R5::gpsEnableClock (boolean enable)
2896
+ SARA_R5_error_t SARA_R5::gpsEnableClock (bool enable)
2897
2897
{
2898
2898
// enable is unused at the moment but could be used if this function is ever implemented.
2899
- boolean ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2899
+ bool ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2900
2900
2901
2901
// AT+UGZDA=<0,1>
2902
2902
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2910,10 +2910,10 @@ SARA_R5_error_t SARA_R5::gpsGetClock(struct ClockData *clock)
2910
2910
return err;
2911
2911
}
2912
2912
2913
- SARA_R5_error_t SARA_R5::gpsEnableFix (boolean enable)
2913
+ SARA_R5_error_t SARA_R5::gpsEnableFix (bool enable)
2914
2914
{
2915
2915
// enable is unused at the moment but could be used if this function is ever implemented.
2916
- boolean ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2916
+ bool ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2917
2917
2918
2918
// AT+UGGGA=<0,1>
2919
2919
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2927,10 +2927,10 @@ SARA_R5_error_t SARA_R5::gpsGetFix(struct PositionData *pos)
2927
2927
return err;
2928
2928
}
2929
2929
2930
- SARA_R5_error_t SARA_R5::gpsEnablePos (boolean enable)
2930
+ SARA_R5_error_t SARA_R5::gpsEnablePos (bool enable)
2931
2931
{
2932
2932
// enable is unused at the moment but could be used if this function is ever implemented.
2933
- boolean ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2933
+ bool ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2934
2934
2935
2935
// AT+UGGLL=<0,1>
2936
2936
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2944,10 +2944,10 @@ SARA_R5_error_t SARA_R5::gpsGetPos(struct PositionData *pos)
2944
2944
return err;
2945
2945
}
2946
2946
2947
- SARA_R5_error_t SARA_R5::gpsEnableSat (boolean enable)
2947
+ SARA_R5_error_t SARA_R5::gpsEnableSat (bool enable)
2948
2948
{
2949
2949
// enable is unused at the moment but could be used if this function is ever implemented.
2950
- boolean ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2950
+ bool ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
2951
2951
2952
2952
// AT+UGGSV=<0,1>
2953
2953
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2961,7 +2961,7 @@ SARA_R5_error_t SARA_R5::gpsGetSat(uint8_t *sats)
2961
2961
return err;
2962
2962
}
2963
2963
2964
- SARA_R5_error_t SARA_R5::gpsEnableRmc (boolean enable)
2964
+ SARA_R5_error_t SARA_R5::gpsEnableRmc (bool enable)
2965
2965
{
2966
2966
// AT+UGRMC=<0,1>
2967
2967
SARA_R5_error_t err;
@@ -2990,7 +2990,7 @@ SARA_R5_error_t SARA_R5::gpsEnableRmc(boolean enable)
2990
2990
}
2991
2991
2992
2992
SARA_R5_error_t SARA_R5::gpsGetRmc (struct PositionData *pos, struct SpeedData *spd,
2993
- struct ClockData *clk, boolean *valid)
2993
+ struct ClockData *clk, bool *valid)
2994
2994
{
2995
2995
SARA_R5_error_t err;
2996
2996
char *command;
@@ -3029,10 +3029,10 @@ SARA_R5_error_t SARA_R5::gpsGetRmc(struct PositionData *pos, struct SpeedData *s
3029
3029
return err;
3030
3030
}
3031
3031
3032
- SARA_R5_error_t SARA_R5::gpsEnableSpeed (boolean enable)
3032
+ SARA_R5_error_t SARA_R5::gpsEnableSpeed (bool enable)
3033
3033
{
3034
3034
// enable is unused at the moment but could be used if this function is ever implemented.
3035
- boolean ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
3035
+ bool ignoreMe = enable; ignoreMe |= false ; // Avoid the pesky compiler warning.
3036
3036
3037
3037
// AT+UGVTG=<0,1>
3038
3038
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -3047,7 +3047,7 @@ SARA_R5_error_t SARA_R5::gpsGetSpeed(struct SpeedData *speed)
3047
3047
}
3048
3048
3049
3049
SARA_R5_error_t SARA_R5::gpsRequest (unsigned int timeout, uint32_t accuracy,
3050
- boolean detailed)
3050
+ bool detailed)
3051
3051
{
3052
3052
// AT+ULOC=2,<useCellLocate>,<detailed>,<timeout>,<accuracy>
3053
3053
SARA_R5_error_t err;
@@ -3121,7 +3121,7 @@ SARA_R5_error_t SARA_R5::getFileContents(String filename, String *contents)
3121
3121
return SARA_R5_ERROR_UNEXPECTED_RESPONSE;
3122
3122
}
3123
3123
3124
- boolean keepGoing = true ;
3124
+ bool keepGoing = true ;
3125
3125
int bytesRead = 0 ;
3126
3126
3127
3127
if (_printDebug == true ) _debugPort->print (F (" getFileContents: file contents are \" " ));
@@ -3218,7 +3218,7 @@ SARA_R5_error_t SARA_R5::init(unsigned long baud,
3218
3218
return SARA_R5_ERROR_SUCCESS;
3219
3219
}
3220
3220
3221
- void SARA_R5::invertPowerPin (boolean invert)
3221
+ void SARA_R5::invertPowerPin (bool invert)
3222
3222
{
3223
3223
_invertPowerPin = invert;
3224
3224
}
@@ -3272,7 +3272,7 @@ SARA_R5_error_t SARA_R5::functionality(SARA_R5_functionality_t function)
3272
3272
return err;
3273
3273
}
3274
3274
3275
- SARA_R5_error_t SARA_R5::setMNOprofile (mobile_network_operator_t mno, boolean autoReset, boolean urcNotification)
3275
+ SARA_R5_error_t SARA_R5::setMNOprofile (mobile_network_operator_t mno, bool autoReset, bool urcNotification)
3276
3276
{
3277
3277
SARA_R5_error_t err;
3278
3278
char *command;
@@ -3348,7 +3348,7 @@ SARA_R5_error_t SARA_R5::getMNOprofile(mobile_network_operator_t *mno)
3348
3348
SARA_R5_error_t SARA_R5::waitForResponse (const char *expectedResponse, const char *expectedError, uint16_t timeout)
3349
3349
{
3350
3350
unsigned long timeIn;
3351
- boolean found = false ;
3351
+ bool found = false ;
3352
3352
int responseIndex = 0 , errorIndex = 0 ;
3353
3353
int backlogIndex = strlen (saraResponseBacklog);
3354
3354
@@ -3407,9 +3407,9 @@ SARA_R5_error_t SARA_R5::waitForResponse(const char *expectedResponse, const cha
3407
3407
3408
3408
SARA_R5_error_t SARA_R5::sendCommandWithResponse (
3409
3409
const char *command, const char *expectedResponse, char *responseDest,
3410
- unsigned long commandTimeout, boolean at)
3410
+ unsigned long commandTimeout, bool at)
3411
3411
{
3412
- boolean found = false ;
3412
+ bool found = false ;
3413
3413
int index = 0 ;
3414
3414
int destIndex = 0 ;
3415
3415
unsigned int charsRead = 0 ;
@@ -3466,12 +3466,12 @@ SARA_R5_error_t SARA_R5::sendCommandWithResponse(
3466
3466
3467
3467
// Send a custom command with an expected (potentially partial) response, store entire response
3468
3468
SARA_R5_error_t SARA_R5::sendCustomCommandWithResponse (const char *command, const char *expectedResponse,
3469
- char *responseDest, unsigned long commandTimeout, boolean at)
3469
+ char *responseDest, unsigned long commandTimeout, bool at)
3470
3470
{
3471
3471
return sendCommandWithResponse (command, expectedResponse, responseDest, commandTimeout, at);
3472
3472
}
3473
3473
3474
- int SARA_R5::sendCommand (const char *command, boolean at)
3474
+ int SARA_R5::sendCommand (const char *command, bool at)
3475
3475
{
3476
3476
int backlogIndex = strlen (saraResponseBacklog);
3477
3477
@@ -3837,7 +3837,7 @@ char *SARA_R5::readDataUntil(char *destination, unsigned int destSize,
3837
3837
return strEnd;
3838
3838
}
3839
3839
3840
- boolean SARA_R5::parseGPRMCString (char *rmcString, PositionData *pos,
3840
+ bool SARA_R5::parseGPRMCString (char *rmcString, PositionData *pos,
3841
3841
ClockData *clk, SpeedData *spd)
3842
3842
{
3843
3843
char *ptr, *search;
0 commit comments