File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ isAsleep KEYWORD2
24
24
setPowerProfile KEYWORD2
25
25
adjustATTimeout KEYWORD2
26
26
adjustSendReceiveTimeout KEYWORD2
27
+ adjustStartupTimeout KEYWORD2
27
28
useMSSTMWorkaround KEYWORD2
28
29
getSystemTime KEYWORD2
29
30
getFirmwareVersion KEYWORD2
Original file line number Diff line number Diff line change 1
1
name =IridiumSBDi2c
2
- version =3.0.1
2
+ version =3.0.2
3
3
author =Mikal Hart and Paul Clark (PaulZC)
4
4
maintainer =SparkFun Electronics <sparkfun.com>
5
5
sentence =This library supports satellite data transmissions from anywhere on earth using the RockBLOCK family of Iridium 9602 and 9603 modems.
Original file line number Diff line number Diff line change @@ -168,6 +168,12 @@ void IridiumSBD::adjustSendReceiveTimeout(int seconds)
168
168
this ->sendReceiveTimeout = seconds;
169
169
}
170
170
171
+ // Tweak ISBD startup timeout
172
+ void IridiumSBD::adjustStartupTimeout (int seconds)
173
+ {
174
+ this ->startupTimeout = seconds;
175
+ }
176
+
171
177
void IridiumSBD::useMSSTMWorkaround (bool useWorkAround) // true to use workaround from Iridium Alert 5/7
172
178
{
173
179
this ->msstmWorkaroundRequested = useWorkAround;
@@ -539,7 +545,7 @@ int IridiumSBD::internalBegin()
539
545
return ISBD_CANCELLED;
540
546
541
547
// Turn on modem and wait for a response from "AT" command to begin
542
- for (unsigned long start = millis (); !modemAlive && millis () - start < 1000UL * ISBD_STARTUP_MAX_TIME ;)
548
+ for (unsigned long start = millis (); !modemAlive && millis () - start < 1000UL * this -> startupTimeout ;)
543
549
{
544
550
send (F (" AT\r " ));
545
551
modemAlive = waitForATResponse ();
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ class IridiumSBD
114
114
void setPowerProfile (POWERPROFILE profile); // 0 = direct connect (default), 1 = USB
115
115
void adjustATTimeout (int seconds); // default value = 20 seconds
116
116
void adjustSendReceiveTimeout (int seconds); // default value = 300 seconds
117
+ void adjustStartupTimeout (int seconds); // default value = 240 seconds
117
118
void useMSSTMWorkaround (bool useMSSTMWorkAround); // true to use workaround from Iridium Alert 5/7/13
118
119
void enableRingAlerts (bool enable);
119
120
@@ -140,6 +141,7 @@ class IridiumSBD
140
141
sbdixInterval = ISBD_USB_SBDIX_INTERVAL;
141
142
atTimeout = ISBD_DEFAULT_AT_TIMEOUT;
142
143
sendReceiveTimeout = ISBD_DEFAULT_SENDRECEIVE_TIME;
144
+ startupTimeout = ISBD_STARTUP_MAX_TIME;
143
145
remainingMessages = -1 ;
144
146
asleep = true ;
145
147
reentrant = false ;
@@ -168,6 +170,7 @@ class IridiumSBD
168
170
sbdixInterval = ISBD_USB_SBDIX_INTERVAL;
169
171
atTimeout = ISBD_DEFAULT_AT_TIMEOUT;
170
172
sendReceiveTimeout = ISBD_DEFAULT_SENDRECEIVE_TIME;
173
+ startupTimeout = ISBD_STARTUP_MAX_TIME;
171
174
remainingMessages = -1 ;
172
175
asleep = true ;
173
176
reentrant = false ;
@@ -206,6 +209,7 @@ class IridiumSBD
206
209
int sbdixInterval;
207
210
int atTimeout;
208
211
int sendReceiveTimeout;
212
+ int startupTimeout;
209
213
unsigned long lastCheck = 0 ; // The time in millis when the I2C bus was last checked (limits I2C traffic)
210
214
const uint8_t I2C_POLLING_WAIT_MS = 5 ; // Limit checking of new characters to every 5 ms (roughly 10 chars at 19200 baud)
211
215
You can’t perform that action at this time.
0 commit comments