diff --git a/A320-main.xml b/A320-main.xml
index ae8d070f..15ecbee0 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -314,28 +314,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -379,25 +379,25 @@
Cockpit Crew
-
+
200
440
Passengers
-
+
1500
27000
Forward Cargo
-
+
300
8765
Aft Cargo
-
+
300
8765
@@ -540,7 +540,6 @@
0
0.0
0
- 0
0.0
0
0
@@ -1370,7 +1369,7 @@
property-cycle
- controls/flight/speedbrake
+ /controls/flight/speedbrake
0.0
1.0
@@ -1392,14 +1391,14 @@
property-cycle
- controls/flight/speedbrake
+ /controls/flight/speedbrake
0.0
0.5
1.0
property-assign
- controls/flight/speedbrake-arm
+ /controls/flight/speedbrake-arm
0
diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml
index 9dd871b2..243143a2 100644
--- a/Models/FlightDeck/a320.flightdeck.xml
+++ b/Models/FlightDeck/a320.flightdeck.xml
@@ -4935,9 +4935,8 @@
rotate
SpdBrk
- controls/flight/speedbrake
+ fdm/jsbsim/spoilers/speedbrake-nul
45
-
SpdBrk.axis
diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas
index b60b87f2..a046043d 100644
--- a/Nasal/libraries.nas
+++ b/Nasal/libraries.nas
@@ -399,6 +399,31 @@ var flaptimer = maketimer(0.5, func {
}
});
+controls.stepSpoilers = func(step) {
+ setprop("/controls/flight/speedbrake-arm", 0);
+ if (step == 1) {
+ deploySpeedbrake();
+ } else if (step == -1) {
+ retractSpeedbrake();
+ }
+}
+
+var deploySpeedbrake = func {
+ if (getprop("/controls/flight/speedbrake") < 0.5) {
+ setprop("/controls/flight/speedbrake", 0.5);
+ } else if (getprop("/controls/flight/speedbrake") < 1.0) {
+ setprop("/controls/flight/speedbrake", 1.0);
+ }
+}
+
+var retractSpeedbrake = func {
+ if (getprop("/controls/flight/speedbrake") > 0.5) {
+ setprop("/controls/flight/speedbrake", 0.5);
+ } else if (getprop("/controls/flight/speedbrake") > 0.0) {
+ setprop("/controls/flight/speedbrake", 0.0);
+ }
+}
+
var slewProp = func(prop, delta) {
delta *= getprop("/sim/time/delta-realtime-sec");
setprop(prop, getprop(prop) + delta);
diff --git a/revision.txt b/revision.txt
index d314d87a..1a819b2b 100644
--- a/revision.txt
+++ b/revision.txt
@@ -1 +1 @@
-4604
\ No newline at end of file
+4605
\ No newline at end of file