Skip to content

Commit

Permalink
tasc: 止まりかけたらさっさと止めてしまう
Browse files Browse the repository at this point in the history
  • Loading branch information
magicant committed Feb 23, 2019
1 parent 1ec88f4 commit 562ee81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bve-autopilot/tasc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "stdafx.h"
#include "tasc.h"
#include <algorithm>
#include <cmath>
#include <limits>
#include "減速パターン.h"
Expand Down Expand Up @@ -122,6 +123,11 @@ namespace autopilot {
else {
_出力制動ノッチ = static_cast<int>(std::ceil(出力制動ノッチ));
}

if (std::abs(現在速度) < mps_from_kmph(1)) {
// 止まりかけたらさっさと止めてしまう
_出力制動ノッチ = std::max(_出力制動ノッチ, _車両仕様.AtsNotch);
}
}

}

0 comments on commit 562ee81

Please sign in to comment.