Added bunch of checklists, A3XX only right now
Signed-off-by: merspieler <merspieler@users.noreply.github.com>
This commit is contained in:
parent
5f04640dff
commit
28bc28675c
39 changed files with 445 additions and 3 deletions
402
__init__.py
402
__init__.py
|
@ -46,6 +46,12 @@ class FlightGearCopilotSkill(MycroftSkill):
|
|||
# might be useful
|
||||
# make_active()
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# Actions #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
#########################
|
||||
# #
|
||||
# Flaps #
|
||||
|
@ -220,19 +226,409 @@ class FlightGearCopilotSkill(MycroftSkill):
|
|||
# TODO add all possible checklist
|
||||
# TODO make it possible, to play a .mp3 file instead of tts
|
||||
|
||||
#################################
|
||||
# #
|
||||
# Before Start Check #
|
||||
# #
|
||||
#################################
|
||||
|
||||
@intent_handler(IntentBuilder('BeforeStartCheckIntent').require('before.start.check'))
|
||||
def handle_before_start_check_intent(self, message):
|
||||
# TODO make checklist plane specific
|
||||
response = self.get_response("check.before.start.cockpit.preparation")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'completed', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.gear.pin")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'removed', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.signs")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.adirs")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'nav', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.fuel.quantity")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'check|checked', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.to.data")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.baro.ref")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.window")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'close|closed', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.beacon")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.before.start.thr.lever")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'idle', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.parking.break")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on|off|set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
self.speak("Before start checklist completed")
|
||||
|
||||
#################################
|
||||
# #
|
||||
# After Start Check #
|
||||
# #
|
||||
#################################
|
||||
|
||||
@intent_handler(IntentBuilder('AfterStartCheckIntent').require('after.start.check'))
|
||||
def handle_after_start_check_intent(self, message):
|
||||
# TODO make checklist plane specific
|
||||
response = self.get_response("check.after.start.anti.ice")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on|off', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.ecam.status")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'checked|check', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.after.start.pitch.trim")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.after.start.rudder.trim")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'0|zero', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
self.speak("After start checklist completed")
|
||||
|
||||
#########################
|
||||
# #
|
||||
# Taxi Check #
|
||||
# #
|
||||
#########################
|
||||
|
||||
@intent_handler(IntentBuilder('TaxiCheckIntent').require('taxi.check'))
|
||||
def handle_taxi_check_intent(self, message):
|
||||
# TODO make checklist plane specific
|
||||
self.speak("Flight controls checked")
|
||||
sleep(4)
|
||||
self.speak("Flight instruments checked")
|
||||
sleep(4)
|
||||
response = self.get_response("check.general.briefing")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'confirmed', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.taxi.flaps.settings")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.taxi.v.spd")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.taxi.atc")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.taxi.to.no.blue")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'no blue|all green', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.taxi.to.rwy")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'confirmed', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.taxi.cabin.crew")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'confirmed', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.taxi.tcas")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'TA|RA|on', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.eng.mode.sel")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on|off|norm|normal|start', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.packs")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on|off|packs?', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
self.speak("Before start checklist completed")
|
||||
|
||||
#########################
|
||||
# #
|
||||
# Climb Check #
|
||||
# #
|
||||
#########################
|
||||
|
||||
@intent_handler(IntentBuilder('ClimbCheckIntent').require('climb.check'))
|
||||
def handle_climb_check_intent(self, message):
|
||||
# TODO make checklist plane specific
|
||||
response = self.get_response("check.climb.gear.up")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'up|retracted', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.flaps")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'up|retracted|0', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.packs")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.baro.ref")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
self.speak("After take off checklist completed")
|
||||
|
||||
#################################
|
||||
# #
|
||||
# Approach Check #
|
||||
# #
|
||||
#################################
|
||||
|
||||
@intent_handler(IntentBuilder('ApprCheckIntent').require('appr.check'))
|
||||
def handle_appr_check_intent(self, message):
|
||||
# TODO make checklist plane specific
|
||||
response = self.get_response("check.general.briefing")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'confirmed', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.ecam.status")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'checked|check', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.appr.seat.belts")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.baro.ref")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.appr.min")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'set', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
response = self.get_response("check.general.eng.mode.sel")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'on|off|norm|normal|start', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
self.speak("Approach checklist completed")
|
||||
|
||||
#########################
|
||||
# #
|
||||
# LDG Check #
|
||||
# #
|
||||
#########################
|
||||
|
||||
@intent_handler(IntentBuilder('LDGCheckIntent').require('ldgcheck'))
|
||||
@intent_handler(IntentBuilder('LDGCheckIntent').require('ldg.check'))
|
||||
def handle_ldg_check_intent(self, message):
|
||||
# TODO make checklist plane specific
|
||||
self.speak("Landing no blue")
|
||||
sleep(5)
|
||||
response = self.get_response("check.ldg.no.blue")
|
||||
if response == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
match = re.search(r'no blue|all green', response, re.I)
|
||||
if match == None:
|
||||
self.speak("Checklist not completed")
|
||||
sys.exit(0)
|
||||
|
||||
self.speak("Landing checklist completed")
|
||||
|
||||
|
||||
# TODO add flt/ctl check
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# Help functions #
|
||||
# #
|
||||
#################################################################
|
||||
|
||||
# connect to fg
|
||||
def connect(self):
|
||||
try:
|
||||
|
|
1
dialog/en-us/check.after.start.anti.ice.dialog
Normal file
1
dialog/en-us/check.after.start.anti.ice.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Anti ice
|
1
dialog/en-us/check.after.start.pitch.trim.dialog
Normal file
1
dialog/en-us/check.after.start.pitch.trim.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Pitch trim
|
1
dialog/en-us/check.after.start.rudder.trim.dialog
Normal file
1
dialog/en-us/check.after.start.rudder.trim.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Rudder trim
|
1
dialog/en-us/check.appr.min.dialog
Normal file
1
dialog/en-us/check.appr.min.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Minimum
|
1
dialog/en-us/check.appr.seat.belts.dialog
Normal file
1
dialog/en-us/check.appr.seat.belts.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Seat belts
|
1
dialog/en-us/check.before.start.adirs.dialog
Normal file
1
dialog/en-us/check.before.start.adirs.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
ADIRS
|
1
dialog/en-us/check.before.start.beacon.dialog
Normal file
1
dialog/en-us/check.before.start.beacon.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Beacon
|
|
@ -0,0 +1 @@
|
|||
Cockpit preparation
|
1
dialog/en-us/check.before.start.fuel.quantity.dialog
Normal file
1
dialog/en-us/check.before.start.fuel.quantity.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Fuel quantity
|
1
dialog/en-us/check.before.start.gear.pin.dialog
Normal file
1
dialog/en-us/check.before.start.gear.pin.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Gear pins and covers
|
1
dialog/en-us/check.before.start.signs.dialog
Normal file
1
dialog/en-us/check.before.start.signs.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Signs
|
1
dialog/en-us/check.before.start.thr.lever.dialog
Normal file
1
dialog/en-us/check.before.start.thr.lever.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Thrust lever
|
1
dialog/en-us/check.before.start.to.data.dialog
Normal file
1
dialog/en-us/check.before.start.to.data.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Take off data
|
1
dialog/en-us/check.before.start.window.dialog
Normal file
1
dialog/en-us/check.before.start.window.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Windows and doors
|
1
dialog/en-us/check.climb.gear.up.dialog
Normal file
1
dialog/en-us/check.climb.gear.up.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Landing gear
|
1
dialog/en-us/check.general.baro.ref.dialog
Normal file
1
dialog/en-us/check.general.baro.ref.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Baro reference
|
1
dialog/en-us/check.general.briefing.dialog
Normal file
1
dialog/en-us/check.general.briefing.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Briefing
|
1
dialog/en-us/check.general.ecam.status.dialog
Normal file
1
dialog/en-us/check.general.ecam.status.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
ECAM status
|
1
dialog/en-us/check.general.eng.mode.sel.dialog
Normal file
1
dialog/en-us/check.general.eng.mode.sel.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Engine mode selector
|
1
dialog/en-us/check.general.flaps.dialog
Normal file
1
dialog/en-us/check.general.flaps.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Flaps
|
1
dialog/en-us/check.general.packs.dialog
Normal file
1
dialog/en-us/check.general.packs.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Packs
|
1
dialog/en-us/check.general.parking.break.dialog
Normal file
1
dialog/en-us/check.general.parking.break.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Parking break
|
1
dialog/en-us/check.ldg.no.blue.dialog
Normal file
1
dialog/en-us/check.ldg.no.blue.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Landing no blue
|
1
dialog/en-us/check.taxi.atc.dialog
Normal file
1
dialog/en-us/check.taxi.atc.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
ATC
|
1
dialog/en-us/check.taxi.cabin.crew.dialog
Normal file
1
dialog/en-us/check.taxi.cabin.crew.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Cabin crew
|
1
dialog/en-us/check.taxi.flaps.settings.dialog
Normal file
1
dialog/en-us/check.taxi.flaps.settings.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Flaps settings
|
1
dialog/en-us/check.taxi.tcas.dialog
Normal file
1
dialog/en-us/check.taxi.tcas.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
TCAS
|
1
dialog/en-us/check.taxi.to.no.blue.dialog
Normal file
1
dialog/en-us/check.taxi.to.no.blue.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
ECAM, take off no blue
|
1
dialog/en-us/check.taxi.to.rwy.dialog
Normal file
1
dialog/en-us/check.taxi.to.rwy.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
Take off runway
|
1
dialog/en-us/check.taxi.v.spd.dialog
Normal file
1
dialog/en-us/check.taxi.v.spd.dialog
Normal file
|
@ -0,0 +1 @@
|
|||
V1, VR and V2
|
1
vocab/en-us/after.ldg.check.voc
Normal file
1
vocab/en-us/after.ldg.check.voc
Normal file
|
@ -0,0 +1 @@
|
|||
after landing check list
|
2
vocab/en-us/after.start.check.voc
Normal file
2
vocab/en-us/after.start.check.voc
Normal file
|
@ -0,0 +1,2 @@
|
|||
After start checklist
|
||||
After start check list
|
2
vocab/en-us/appr.check.voc
Normal file
2
vocab/en-us/appr.check.voc
Normal file
|
@ -0,0 +1,2 @@
|
|||
approach check
|
||||
approach check list
|
2
vocab/en-us/before.start.check.voc
Normal file
2
vocab/en-us/before.start.check.voc
Normal file
|
@ -0,0 +1,2 @@
|
|||
Before start checklist
|
||||
Before start check list
|
4
vocab/en-us/climb.check.voc
Normal file
4
vocab/en-us/climb.check.voc
Normal file
|
@ -0,0 +1,4 @@
|
|||
after take off checklist
|
||||
after take off check list
|
||||
climb checklist
|
||||
climb check list
|
1
vocab/en-us/parking.check.voc
Normal file
1
vocab/en-us/parking.check.voc
Normal file
|
@ -0,0 +1 @@
|
|||
parking check list
|
4
vocab/en-us/taxi.check.voc
Normal file
4
vocab/en-us/taxi.check.voc
Normal file
|
@ -0,0 +1,4 @@
|
|||
taxi checklist
|
||||
taxi check list
|
||||
before take off checklist
|
||||
before take off check list
|
Loading…
Add table
Reference in a new issue