mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-11-22 07:37:08 +00:00
rak: keep WB_IO2 driven HIGH after a failed RAK12500 probe (#3834)
The I2C probe left WB_IO2 as an input when no RAK12500 answered. WB_IO2
switches the 3V3_S slot rail, which also powers a serial GPS. On base
boards that pull this line low, the serial GPS lost power right after
detection and never got a fix (#3830). Before df5a768c the pin stayed
HIGH, so keep it driven HIGH again. WB_IO4 and WB_IO5 still go back to
inputs.
This commit is contained in:
1 parent
a4c66307a8
commit
7f7512d94c
1 file changed
+9
-1
@@ -41,7 +41,15 @@ class RakI2cGpsDriver : public GpsDriver {
|
||||
}
|
||||
|
||||
#ifndef RAK_3401
|
||||
pinMode(powerPin, INPUT);
|
||||
if (powerPin == WB_IO2) {
|
||||
// WB_IO2 switches the 3V3_S slot rail, which also powers a serial GPS and the other
|
||||
// slot modules. Left as an input, the rail follows whatever the base board pulls it
|
||||
// to: some keep it on, others switch it off, and the serial GPS loses power (#3830).
|
||||
// Keep it driven HIGH, as before the probe; a GPS power pin re-claims it later.
|
||||
digitalWrite(powerPin, HIGH);
|
||||
} else {
|
||||
pinMode(powerPin, INPUT);
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user