Skip to content

Commit

Permalink
Added configuration change for NAV selector 3-way switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Attwood committed Dec 25, 2021
1 parent 7c1168e commit 9367bf0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.2.0 2021-12-25

1. Facilty to operate NAV select three-way switch on KPA140

## 1.2.0 2021-08-28

1. Corrected path in `BUILDING.md`
Expand Down
5 changes: 4 additions & 1 deletion CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ There is one **`starter`** element, which specifies the control to be activated

## SWITCH special

In the Piper configuration file, the TAXI switch is unused, and the normal control string is replaced by `autopilot engage`. This special case is recognised by the `saitekswitch.nas` file, and operates the autopilot engage/disengage for KAP140 on PA28-116.
In the Piper configuration file, the TAXI switch is unused, and the normal control string is replaced by `autopilot engage`. This special case is recognised by the `saitekswitch.nas` file, and operates the autopilot engage/disengage for KAP140 on PA28-11x.

Also for any aircraft with a three-way NAV1/NAV2/GPS such the KAP140 on the PA28-11x, using the switch value
`instrumentation/nav-source/selector` will cause the switch to select either the NAV1 or GPS settings.

## Default Configuration File

Expand Down
11 changes: 9 additions & 2 deletions saitekswitch.nas
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ var do_action = func {
setprop("autopilot/kap140/panel/ap-timer", 5);
setprop("autopilot/kap140/panel/state", 5);
}
} else if (thing =="instrumentation/nav-source/selector" and action == 1) {
setprop(thing, 2); # GPS select
} else if (thing =="instrumentation/nav-source/selector") {
if (action ==1) {
setprop(thing, 2); # GPS select
}
else {
setprop(thing, 0); # NAV1 select
}
setprop("autopilot/kap140/panel/nav-timer",getprop("sim/time/elapsed-sec"));
setprop("/sim/sounde/switch1", 1);
} else setprop(thing, action);
}

Expand Down

0 comments on commit 9367bf0

Please sign in to comment.