Skip to content

Commit 8408f43

Browse files
committed
Replace boolean with bool
1 parent 01a03b2 commit 8408f43

File tree

3 files changed

+68
-68
lines changed

3 files changed

+68
-68
lines changed

keywords.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ sendHTTPPOSTdata KEYWORD2
127127
setPDPconfiguration KEYWORD2
128128
performPDPaction KEYWORD2
129129
activatePDPcontext KEYWORD2
130-
boolean isGPSon KEYWORD2
130+
isGPSon KEYWORD2
131131
gpsPower KEYWORD2
132132
gpsEnableClock KEYWORD2
133133
gpsGetClock KEYWORD2

src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SARA_R5::SARA_R5(int powerPin, int resetPin, uint8_t maxInitDepth)
4242
}
4343

4444
#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)
4646
{
4747
SARA_R5_error_t err;
4848

@@ -57,7 +57,7 @@ boolean SARA_R5::begin(SoftwareSerial &softSerial, unsigned long baud)
5757
}
5858
#endif
5959

60-
boolean SARA_R5::begin(HardwareSerial &hardSerial, unsigned long baud)
60+
bool SARA_R5::begin(HardwareSerial &hardSerial, unsigned long baud)
6161
{
6262
SARA_R5_error_t err;
6363

@@ -79,7 +79,7 @@ void SARA_R5::enableDebugging(Stream &debugPort)
7979
_printDebug = true;
8080
}
8181

82-
boolean SARA_R5::bufferedPoll(void)
82+
bool SARA_R5::bufferedPoll(void)
8383
{
8484
int avail = 0;
8585
char c = 0;
@@ -131,7 +131,7 @@ boolean SARA_R5::bufferedPoll(void)
131131
return handled;
132132
}
133133

134-
boolean SARA_R5::processReadEvent(char* event)
134+
bool SARA_R5::processReadEvent(char* event)
135135
{
136136
{
137137
int socket, length;
@@ -190,7 +190,7 @@ boolean SARA_R5::processReadEvent(char* event)
190190
return false;
191191
}
192192

193-
boolean SARA_R5::poll(void)
193+
bool SARA_R5::poll(void)
194194
{
195195
int avail = 0;
196196
char c = 0;
@@ -510,7 +510,7 @@ SARA_R5_error_t SARA_R5::at(void)
510510
return err;
511511
}
512512

513-
SARA_R5_error_t SARA_R5::enableEcho(boolean enable)
513+
SARA_R5_error_t SARA_R5::enableEcho(bool enable)
514514
{
515515
SARA_R5_error_t err;
516516
char *command;
@@ -1031,7 +1031,7 @@ SARA_R5_error_t SARA_R5::getUtimeConfiguration(int32_t *offsetNanoseconds, int32
10311031
return err;
10321032
}
10331033

1034-
SARA_R5_error_t SARA_R5::autoTimeZone(boolean enable)
1034+
SARA_R5_error_t SARA_R5::autoTimeZone(bool enable)
10351035
{
10361036
SARA_R5_error_t err;
10371037
char *command;
@@ -1122,7 +1122,7 @@ SARA_R5_registration_status_t SARA_R5::registration(void)
11221122
return (SARA_R5_registration_status_t)status;
11231123
}
11241124

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)
11261126
{
11271127
mobile_network_operator_t currentMno;
11281128

@@ -1262,7 +1262,7 @@ SARA_R5_error_t SARA_R5::getAPN(int cid, String *apn, IPAddress *ip)
12621262

12631263
char *searchPtr = response;
12641264

1265-
boolean keepGoing = true;
1265+
bool keepGoing = true;
12661266
while (keepGoing == true)
12671267
{
12681268
int apnLen = 0;
@@ -2542,7 +2542,7 @@ SARA_R5_error_t SARA_R5::setHTTPpassword(int profile, String password)
25422542
return err;
25432543
}
25442544

2545-
SARA_R5_error_t SARA_R5::setHTTPauthentication(int profile, boolean authenticate)
2545+
SARA_R5_error_t SARA_R5::setHTTPauthentication(int profile, bool authenticate)
25462546
{
25472547
SARA_R5_error_t err;
25482548
char *command;
@@ -2584,7 +2584,7 @@ SARA_R5_error_t SARA_R5::setHTTPserverPort(int profile, int port)
25842584
return err;
25852585
}
25862586

2587-
SARA_R5_error_t SARA_R5::setHTTPsecure(int profile, boolean secure)
2587+
SARA_R5_error_t SARA_R5::setHTTPsecure(int profile, bool secure)
25882588
{
25892589
SARA_R5_error_t err;
25902590
char *command;
@@ -2797,7 +2797,7 @@ SARA_R5_error_t SARA_R5::performPDPaction(int profile, SARA_R5_pdp_actions_t act
27972797
return err;
27982798
}
27992799

2800-
SARA_R5_error_t SARA_R5::activatePDPcontext(boolean status, int cid)
2800+
SARA_R5_error_t SARA_R5::activatePDPcontext(bool status, int cid)
28012801
{
28022802
SARA_R5_error_t err;
28032803
char *command;
@@ -2820,12 +2820,12 @@ SARA_R5_error_t SARA_R5::activatePDPcontext(boolean status, int cid)
28202820
return err;
28212821
}
28222822

2823-
boolean SARA_R5::isGPSon(void)
2823+
bool SARA_R5::isGPSon(void)
28242824
{
28252825
SARA_R5_error_t err;
28262826
char *command;
28272827
char *response;
2828-
boolean on = false;
2828+
bool on = false;
28292829

28302830
command = sara_r5_calloc_char(strlen(SARA_R5_GNSS_POWER) + 2);
28312831
if (command == NULL)
@@ -2861,11 +2861,11 @@ boolean SARA_R5::isGPSon(void)
28612861
return on;
28622862
}
28632863

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)
28652865
{
28662866
SARA_R5_error_t err;
28672867
char *command;
2868-
boolean gpsState;
2868+
bool gpsState;
28692869

28702870
// Don't turn GPS on/off if it's already on/off
28712871
gpsState = isGPSon();
@@ -2893,10 +2893,10 @@ SARA_R5_error_t SARA_R5::gpsPower(boolean enable, gnss_system_t gnss_sys, gnss_a
28932893
return err;
28942894
}
28952895

2896-
SARA_R5_error_t SARA_R5::gpsEnableClock(boolean enable)
2896+
SARA_R5_error_t SARA_R5::gpsEnableClock(bool enable)
28972897
{
28982898
//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.
29002900

29012901
// AT+UGZDA=<0,1>
29022902
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2910,10 +2910,10 @@ SARA_R5_error_t SARA_R5::gpsGetClock(struct ClockData *clock)
29102910
return err;
29112911
}
29122912

2913-
SARA_R5_error_t SARA_R5::gpsEnableFix(boolean enable)
2913+
SARA_R5_error_t SARA_R5::gpsEnableFix(bool enable)
29142914
{
29152915
//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.
29172917

29182918
// AT+UGGGA=<0,1>
29192919
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2927,10 +2927,10 @@ SARA_R5_error_t SARA_R5::gpsGetFix(struct PositionData *pos)
29272927
return err;
29282928
}
29292929

2930-
SARA_R5_error_t SARA_R5::gpsEnablePos(boolean enable)
2930+
SARA_R5_error_t SARA_R5::gpsEnablePos(bool enable)
29312931
{
29322932
//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.
29342934

29352935
// AT+UGGLL=<0,1>
29362936
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2944,10 +2944,10 @@ SARA_R5_error_t SARA_R5::gpsGetPos(struct PositionData *pos)
29442944
return err;
29452945
}
29462946

2947-
SARA_R5_error_t SARA_R5::gpsEnableSat(boolean enable)
2947+
SARA_R5_error_t SARA_R5::gpsEnableSat(bool enable)
29482948
{
29492949
//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.
29512951

29522952
// AT+UGGSV=<0,1>
29532953
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -2961,7 +2961,7 @@ SARA_R5_error_t SARA_R5::gpsGetSat(uint8_t *sats)
29612961
return err;
29622962
}
29632963

2964-
SARA_R5_error_t SARA_R5::gpsEnableRmc(boolean enable)
2964+
SARA_R5_error_t SARA_R5::gpsEnableRmc(bool enable)
29652965
{
29662966
// AT+UGRMC=<0,1>
29672967
SARA_R5_error_t err;
@@ -2990,7 +2990,7 @@ SARA_R5_error_t SARA_R5::gpsEnableRmc(boolean enable)
29902990
}
29912991

29922992
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)
29942994
{
29952995
SARA_R5_error_t err;
29962996
char *command;
@@ -3029,10 +3029,10 @@ SARA_R5_error_t SARA_R5::gpsGetRmc(struct PositionData *pos, struct SpeedData *s
30293029
return err;
30303030
}
30313031

3032-
SARA_R5_error_t SARA_R5::gpsEnableSpeed(boolean enable)
3032+
SARA_R5_error_t SARA_R5::gpsEnableSpeed(bool enable)
30333033
{
30343034
//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.
30363036

30373037
// AT+UGVTG=<0,1>
30383038
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
@@ -3047,7 +3047,7 @@ SARA_R5_error_t SARA_R5::gpsGetSpeed(struct SpeedData *speed)
30473047
}
30483048

30493049
SARA_R5_error_t SARA_R5::gpsRequest(unsigned int timeout, uint32_t accuracy,
3050-
boolean detailed)
3050+
bool detailed)
30513051
{
30523052
// AT+ULOC=2,<useCellLocate>,<detailed>,<timeout>,<accuracy>
30533053
SARA_R5_error_t err;
@@ -3121,7 +3121,7 @@ SARA_R5_error_t SARA_R5::getFileContents(String filename, String *contents)
31213121
return SARA_R5_ERROR_UNEXPECTED_RESPONSE;
31223122
}
31233123

3124-
boolean keepGoing = true;
3124+
bool keepGoing = true;
31253125
int bytesRead = 0;
31263126

31273127
if (_printDebug == true) _debugPort->print(F("getFileContents: file contents are \""));
@@ -3218,7 +3218,7 @@ SARA_R5_error_t SARA_R5::init(unsigned long baud,
32183218
return SARA_R5_ERROR_SUCCESS;
32193219
}
32203220

3221-
void SARA_R5::invertPowerPin(boolean invert)
3221+
void SARA_R5::invertPowerPin(bool invert)
32223222
{
32233223
_invertPowerPin = invert;
32243224
}
@@ -3272,7 +3272,7 @@ SARA_R5_error_t SARA_R5::functionality(SARA_R5_functionality_t function)
32723272
return err;
32733273
}
32743274

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)
32763276
{
32773277
SARA_R5_error_t err;
32783278
char *command;
@@ -3348,7 +3348,7 @@ SARA_R5_error_t SARA_R5::getMNOprofile(mobile_network_operator_t *mno)
33483348
SARA_R5_error_t SARA_R5::waitForResponse(const char *expectedResponse, const char *expectedError, uint16_t timeout)
33493349
{
33503350
unsigned long timeIn;
3351-
boolean found = false;
3351+
bool found = false;
33523352
int responseIndex = 0, errorIndex = 0;
33533353
int backlogIndex = strlen(saraResponseBacklog);
33543354

@@ -3407,9 +3407,9 @@ SARA_R5_error_t SARA_R5::waitForResponse(const char *expectedResponse, const cha
34073407

34083408
SARA_R5_error_t SARA_R5::sendCommandWithResponse(
34093409
const char *command, const char *expectedResponse, char *responseDest,
3410-
unsigned long commandTimeout, boolean at)
3410+
unsigned long commandTimeout, bool at)
34113411
{
3412-
boolean found = false;
3412+
bool found = false;
34133413
int index = 0;
34143414
int destIndex = 0;
34153415
unsigned int charsRead = 0;
@@ -3466,12 +3466,12 @@ SARA_R5_error_t SARA_R5::sendCommandWithResponse(
34663466

34673467
// Send a custom command with an expected (potentially partial) response, store entire response
34683468
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)
34703470
{
34713471
return sendCommandWithResponse(command, expectedResponse, responseDest, commandTimeout, at);
34723472
}
34733473

3474-
int SARA_R5::sendCommand(const char *command, boolean at)
3474+
int SARA_R5::sendCommand(const char *command, bool at)
34753475
{
34763476
int backlogIndex = strlen(saraResponseBacklog);
34773477

@@ -3837,7 +3837,7 @@ char *SARA_R5::readDataUntil(char *destination, unsigned int destSize,
38373837
return strEnd;
38383838
}
38393839

3840-
boolean SARA_R5::parseGPRMCString(char *rmcString, PositionData *pos,
3840+
bool SARA_R5::parseGPRMCString(char *rmcString, PositionData *pos,
38413841
ClockData *clk, SpeedData *spd)
38423842
{
38433843
char *ptr, *search;

0 commit comments

Comments
 (0)