add resetFOV function
This commit is contained in:
parent
29906cdc0b
commit
e8f6224875
1 changed files with 9 additions and 2 deletions
|
@ -78,6 +78,14 @@ decrease = func {
|
|||
gui.popupTip(msg);
|
||||
}
|
||||
|
||||
##
|
||||
# Handler. Reset FOV to default.
|
||||
#
|
||||
resetFOV = func {
|
||||
setprop("/sim/current-view/field-of-view",
|
||||
getprop("/sim/current-view/config/default-field-of-view-deg"));
|
||||
}
|
||||
|
||||
##
|
||||
# Handler. Reset view to default.
|
||||
#
|
||||
|
@ -88,8 +96,7 @@ resetView = func {
|
|||
getprop("/sim/current-view/config/pitch-offset-deg"));
|
||||
setprop("/sim/current-view/goal-roll-offset-deg",
|
||||
getprop("/sim/current-view/config/roll-offset-deg"));
|
||||
setprop("/sim/current-view/field-of-view",
|
||||
getprop("/sim/current-view/config/default-field-of-view-deg"))
|
||||
resetFOV();
|
||||
}
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Reference in a new issue