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 11name =IridiumSBDi2c
2- version =3.0.3
2+ version =3.0.4
33author =Mikal Hart and Paul Clark (PaulZC)
44maintainer =SparkFun Electronics <sparkfun.com>
55sentence =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()
4646
4747 // Absent a successful startup, keep the device turned off
4848 if (ret != ISBD_SUCCESS)
49+ {
50+ if (this ->useSerial )
51+ endSerialPort (); // Apollo3 v2.1 Serial fix
4952 power (false );
53+ }
5054
5155 return ret;
5256}
@@ -125,7 +129,12 @@ int IridiumSBD::sleep()
125129 this ->reentrant = false ;
126130
127131 if (ret == ISBD_SUCCESS)
132+ {
133+ if (this ->useSerial )
134+ endSerialPort (); // Apollo3 v2.1 Serial fix
128135 power (false ); // power off
136+ }
137+
129138 return ret;
130139}
131140
@@ -537,6 +546,9 @@ int IridiumSBD::internalBegin()
537546
538547 power (true ); // power on
539548
549+ if (this ->useSerial ) // If we are using Serial
550+ beginSerialPort (); // Apollo3 v2.1 Serial fix
551+
540552 bool modemAlive = false ;
541553
542554 unsigned long startupTime = 500 ; // ms
@@ -1158,6 +1170,16 @@ void IridiumSBD::setSleepPin(uint8_t enable)
11581170 diagprint (F (" LOW\r\n " ));
11591171}
11601172
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+
11611183void IridiumSBD::send (FlashString str, bool beginLine, bool endLine)
11621184{
11631185 if (beginLine)
Original file line number Diff line number Diff line change @@ -138,6 +138,10 @@ class IridiumSBD
138138 void configureSleepPin () __attribute__((weak));
139139 void setSleepPin (uint8_t enable) __attribute__((weak));
140140
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+
141145 IridiumSBD (Stream &str, int sleepPinNo = -1 , int ringPinNo = -1 )
142146 {
143147 useSerial = true ;
You can’t perform that action at this time.
0 commit comments