Controls: Remove debug prints
This commit is contained in:
parent
e1c0c70c4a
commit
02643d36cd
1 changed files with 0 additions and 6 deletions
|
@ -271,21 +271,15 @@ setElevatorTrimToPosition = func() {
|
||||||
nv = math.min(math.max(-1.0,nv),1.0);
|
nv = math.min(math.max(-1.0,nv),1.0);
|
||||||
var lv = getprop("/controls/flight/elevator");
|
var lv = getprop("/controls/flight/elevator");
|
||||||
if (math.abs(lv) <= 0.001){
|
if (math.abs(lv) <= 0.001){
|
||||||
print("Elevator trim: centre");
|
|
||||||
setprop("/controls/flight/elevator-trim", 0);
|
setprop("/controls/flight/elevator-trim", 0);
|
||||||
} else {
|
} else {
|
||||||
#print("Trim when centered stick");
|
|
||||||
setElevatorTrimToPosition_listener = setlistener("/controls/flight/elevator", func(v){
|
setElevatorTrimToPosition_listener = setlistener("/controls/flight/elevator", func(v){
|
||||||
if (math.abs(v.getValue()) <= 0.001) {
|
if (math.abs(v.getValue()) <= 0.001) {
|
||||||
setprop("controls/flight/elevator",0);
|
setprop("controls/flight/elevator",0);
|
||||||
removelistener(setElevatorTrimToPosition_listener);
|
removelistener(setElevatorTrimToPosition_listener);
|
||||||
setElevatorTrimToPosition_listener = nil;
|
setElevatorTrimToPosition_listener = nil;
|
||||||
# print("set trim to ",nv);
|
|
||||||
setprop("/controls/flight/elevator-trim", nv);
|
setprop("/controls/flight/elevator-trim", nv);
|
||||||
}
|
}
|
||||||
# else
|
|
||||||
# print("Not trimming yet ",v.getValue());
|
|
||||||
|
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue