Skip to content

Commit 1ed24f3

Browse files
committed
Do not demand BrakeCheck in CruisePot mode (for boats, usually)
1 parent f9fe43a commit 1ed24f3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

include/param_prj.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20-
#define VERSION 5.38
20+
#define VERSION 5.39
2121

2222
/* Entries should be ordered as follows:
2323
1. Saveable parameters

src/stm32_sine.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ static void Ms100Task(void)
8484
Param::SetInt(Param::din_desat, 2);
8585
}
8686

87+
int cruisemode = Param::GetInt(Param::cruisemode);
88+
8789
if (rtc_get_counter_val() > 50) //500ms after start check for brake pedal
88-
seenBrakePedal |= (Param::GetInt(Param::cruisemode) == CRUISE_OFF) || Param::GetBool(Param::din_brake);
90+
seenBrakePedal |= (cruisemode == CRUISE_OFF || cruisemode == CRUISE_POT) || Param::GetBool(Param::din_brake);
8991

9092
VehicleControl::SelectDirection();
9193
VehicleControl::CruiseControl();

src/vehiclecontrol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ bool VehicleControl::GetCruiseCreepCommand(float& finalSpnt, float throtSpnt)
799799
finalSpnt = MAX(throtSpnt, idleSpnt);
800800

801801
//If we combine throttle speed control with idle speed, never drop speed setpoint below idle speed
802-
//because then the motor will coast indefintely
802+
//because then the motor will coast indefinitely
803803
if (CRUISE_POT == cruisemode)
804804
Throttle::cruiseSpeed = MAX(Throttle::cruiseSpeed, Throttle::idleSpeed);
805805
}

0 commit comments

Comments
 (0)