Skip to content

Commit ce62276

Browse files
committed
Prelim tilt detection working
1 parent 64e4a4a commit ce62276

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Firmware/RTK_Everywhere/Tilt.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,10 @@ void tiltDetect()
10191019

10201020
// Start test if not previously detected
10211021
if (settings.detectedTilt == true)
1022+
{
1023+
present.imu_im19 = true; // Allow tiltUpdate() to run
10221024
return;
1025+
}
10231026

10241027
// Test for tilt only once
10251028
if (settings.testedTilt == true)
@@ -1048,9 +1051,6 @@ void tiltDetect()
10481051
{
10491052
if (tiltSensor->begin(SerialTiltTest) == true)
10501053
{
1051-
if (settings.enableImuDebug == true)
1052-
systemPrintln("Tilt sensor detected");
1053-
10541054
present.imu_im19 = true; // Allow tiltUpdate() to run
10551055
settings.detectedTilt = true;
10561056
break;
@@ -1061,8 +1061,8 @@ void tiltDetect()
10611061

10621062
#endif // COMPILE_IM19_IMU
10631063

1064-
// if (settings.enableImuDebug == true)
1065-
systemPrintf("Tilt sensor %sdetected\r\n", settings.detectedTilt ? "" : "not ");
1064+
if (settings.enableImuDebug == true)
1065+
systemPrintf("Tilt sensor %sdetected\r\n", settings.detectedTilt ? "" : "not ");
10661066

10671067
settings.testedTilt = true;
10681068
recordSystemSettings();

0 commit comments

Comments
 (0)