File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 1
1
name =IridiumSBDi2c
2
- version =3.0.3
2
+ version =3.0.4
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 @@ -46,7 +46,11 @@ int IridiumSBD::begin()
46
46
47
47
// Absent a successful startup, keep the device turned off
48
48
if (ret != ISBD_SUCCESS)
49
+ {
50
+ if (this ->useSerial )
51
+ endSerialPort (); // Apollo3 v2.1 Serial fix
49
52
power (false );
53
+ }
50
54
51
55
return ret;
52
56
}
@@ -125,7 +129,12 @@ int IridiumSBD::sleep()
125
129
this ->reentrant = false ;
126
130
127
131
if (ret == ISBD_SUCCESS)
132
+ {
133
+ if (this ->useSerial )
134
+ endSerialPort (); // Apollo3 v2.1 Serial fix
128
135
power (false ); // power off
136
+ }
137
+
129
138
return ret;
130
139
}
131
140
@@ -537,6 +546,9 @@ int IridiumSBD::internalBegin()
537
546
538
547
power (true ); // power on
539
548
549
+ if (this ->useSerial ) // If we are using Serial
550
+ beginSerialPort (); // Apollo3 v2.1 Serial fix
551
+
540
552
bool modemAlive = false ;
541
553
542
554
unsigned long startupTime = 500 ; // ms
@@ -1158,6 +1170,16 @@ void IridiumSBD::setSleepPin(uint8_t enable)
1158
1170
diagprint (F (" LOW\r\n " ));
1159
1171
}
1160
1172
1173
+ void IridiumSBD::beginSerialPort ()
1174
+ {
1175
+ diagprint (F (" IridiumSBD::beginSerialPort\r\n " ));
1176
+ }
1177
+
1178
+ void IridiumSBD::endSerialPort ()
1179
+ {
1180
+ diagprint (F (" IridiumSBD::endSerialPort\r\n " ));
1181
+ }
1182
+
1161
1183
void IridiumSBD::send (FlashString str, bool beginLine, bool endLine)
1162
1184
{
1163
1185
if (beginLine)
Original file line number Diff line number Diff line change @@ -138,6 +138,10 @@ class IridiumSBD
138
138
void configureSleepPin () __attribute__((weak));
139
139
void setSleepPin (uint8_t enable) __attribute__((weak));
140
140
141
+ // Weak functions to begin and end the Serial port after power(true) and before power(false)
142
+ void beginSerialPort () __attribute__((weak));
143
+ void endSerialPort () __attribute__((weak));
144
+
141
145
IridiumSBD (Stream &str, int sleepPinNo = -1 , int ringPinNo = -1 )
142
146
{
143
147
useSerial = true ;
You can’t perform that action at this time.
0 commit comments