18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 13:26:08 +01:00

AI braking: the braking curve outside the final approach in a method of its own

Takes care of the last two Sonar remarks, with no change in what the AI does:

- S134: the braking curve followed outside the final approach moves out of
  adjust_desired_speed_for_target_speed() into
  adjust_desired_speed_for_braking_curve(), with early returns.
- S6004: deltaAcc of increase_train_brake() is declared in the
  init-statement of its if.
This commit is contained in:
pwarszawski
2026-11-07 22:55:09 +01:00
parent 99cf46866a
commit 95ceb815d2
2 changed files with 81 additions and 71 deletions

View File

@@ -353,6 +353,7 @@ private:
bool increase_train_brake();
void hold_train_coming_to_stand_uphill();
void adjust_desired_speed_for_final_approach( double const Vel );
void adjust_desired_speed_for_braking_curve( double const Vel );
void adjust_desired_speed_for_target_speed( double const Range );
void adjust_desired_speed_for_current_speed();
void adjust_desired_speed_for_braking_test();