Skip to content

Commit c842c60

Browse files
committed
Release SerialTiltTest. Move to UART1
1 parent 336ab4a commit c842c60

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Firmware/RTK_Everywhere/Tilt.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ void tiltDetect()
10321032
tiltSensor = new IM19();
10331033

10341034
// On Flex, ESP UART2 is connected to SW3, then UART3 of the GNSS (where a tilt module resides, if populated)
1035-
HardwareSerial SerialTiltTest(2); // Use UART2 on the ESP32 to communicate with IMU
1035+
HardwareSerial SerialTiltTest(1); // Use UART1 on the ESP32 to communicate with IMU
10361036

10371037
// Confirm SW3 is in the correct position
10381038
gpioExpanderSelectImu();
@@ -1055,10 +1055,13 @@ void tiltDetect()
10551055
settings.detectedTilt = true;
10561056
}
10571057
}
1058+
1059+
SerialTiltTest.end(); // Release UART1 for reuse
1060+
10581061
#endif // COMPILE_IM19_IMU
10591062

1060-
// if (settings.enableImuDebug == true && settings.detectedTilt == false)
1061-
systemPrintln("Tilt sensor not detected");
1063+
// if (settings.enableImuDebug == true)
1064+
systemPrintf("Tilt sensor %sdetected\r\n", settings.detectedTilt ? "" : "not ");
10621065

10631066
settings.testedTilt = true;
10641067
recordSystemSettings();

0 commit comments

Comments
 (0)