1
0
Fork 0

Autopush: Improve handeling on speedup

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2020-11-02 08:52:36 +11:00 committed by James Turner
parent ee25322c4a
commit 5981539a38
3 changed files with 4 additions and 2 deletions

View file

@ -85,12 +85,13 @@ var _loop = func() {
}
var _timer = maketimer(0.0167, func{_loop()});
_timer.simulatedTime = 1;
var _start = func() {
# Else overwritten by dialog.
settimer(func() {
setprop("/sim/model/autopush/target-speed-km_h", 0.0)
}, 0.1);
}, 0.1, 1);
_K_p = getprop("/sim/model/autopush/K_p");
_F_p = getprop("/sim/model/autopush/F_p");
_K_i = getprop("/sim/model/autopush/K_i");

View file

@ -88,6 +88,7 @@ var _loop = func() {
}
var _timer = maketimer(0.051, func{_loop()});
_timer.simulatedTime = 1;
var _done = func() {
stop();

View file

@ -89,7 +89,7 @@ var _stop = func(fail = 0) {
settimer(func() {
_finalize_top_view();
gui.popupTip("Done");
}, 1.0);
}, 1.0, 1);
} else {
_finalize_top_view();
}