Skip to content

Commit e63f312

Browse files
committed
Ver. 1.0 Stable release
1 parent e06f156 commit e63f312

15 files changed

Lines changed: 32 additions & 21 deletions

Gui-main.py

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import keyboard
1515
from audioplayer import AudioPlayer
1616

17+
############ APP VERSION ###############
18+
version = "1.0"
19+
1720
# Logging configuration
1821
logging.basicConfig(filename='pbr.log', filemode='w', level=logging.DEBUG)
1922
logging.basicConfig(level=logging.DEBUG)
@@ -222,7 +225,6 @@ def PBTbtnClickFunction3(lgth):
222225
pbtbtn6.place(x=205, y=210)
223226
pbtbtn7.place(x=60, y=375)
224227
pbtbtn8.place(x=205, y=375)
225-
print(length)
226228

227229
# PBT Button 4 Template launch function
228230
def PBTbtnClickFunction4(fpath):
@@ -476,8 +478,8 @@ def pb():
476478
if (pbk < 1.0):
477479
if settings["tooltips"] is True:
478480
sm.sendText("Starting push back")
479-
pbphase(4, True)
480481
time.sleep(4)
482+
pbphaseEngineThd.start()
481483
keyboard.add_hotkey("left", lambda: tug(((int(math.degrees(aq.get("PLANE_HEADING_DEGREES_TRUE"))) - 27) % 360 * 11930464)))
482484
keyboard.add_hotkey("left", lambda: heading('left'))
483485
keyboard.add_hotkey("right", lambda: tug(((int(math.degrees(aq.get("PLANE_HEADING_DEGREES_TRUE"))) + 27) % 360 * 11930464)))
@@ -713,8 +715,8 @@ def pbplay(fpath):
713715
if pbk < 1.0:
714716
if settings["tooltips"] is True:
715717
sm.sendText("Starting push back")
716-
pbphase(4, True)
717718
time.sleep(4)
719+
pbphaseEngineThd.start()
718720
freezetgl()
719721
start = time.time()
720722
logging.info("Tick-Timer started")
@@ -803,8 +805,8 @@ def pbplayT(fpath):
803805
if pbk < 1.0:
804806
if settings["tooltips"] is True:
805807
sm.sendText("Starting push back")
806-
pbphase(4, True)
807808
time.sleep(4)
809+
pbphaseEngineThd.start()
808810
freezetgl()
809811
contact = 0
810812
except:
@@ -852,7 +854,7 @@ def pbplayT(fpath):
852854
except:
853855
logging.warning("aq.get(""BRAKE_PARKING_INDICATOR"") return null")
854856
pass
855-
print(feets)
857+
#print(feets)
856858
logging.info("Auto-Push back template ended")
857859

858860
# Push Back last steering direction
@@ -894,7 +896,15 @@ def pbphase(phase, wait):
894896
comms = AudioPlayer(appdir+"\\Assets\\Audio\\"+str(phase)+".mp3")
895897
comms.volume = volset
896898
comms.play(block=wait)
897-
print(appdir+"\\Assets\\Audio\\"+str(phase)+".mp3")
899+
#print(appdir+"\\Assets\\Audio\\"+str(phase)+".mp3")
900+
901+
def pbphaseDelay(phase, wait):
902+
global commsD
903+
time.sleep(wait)
904+
commsD = AudioPlayer(appdir+"\\Assets\\Audio\\"+str(phase)+".mp3")
905+
commsD.volume = volset
906+
commsD.play()
907+
#print(appdir+"\\Assets\\Audio\\"+str(phase)+".mp3")
898908

899909
def unfreeze():
900910
if (aq.get("IS_LATITUDE_LONGITUDE_FREEZE_ON") == 1.0):
@@ -917,7 +927,7 @@ def unfreeze():
917927
except:
918928
root.geometry('460x390')
919929
root.configure(background='#6B6B6B')
920-
root.title('Push Back Recorder')
930+
root.title('Push Back Recorder '+version)
921931
root.resizable(width=False, height=False)
922932
root.attributes('-topmost', True)
923933
root.iconbitmap(default="AppIcon.ico")
@@ -1008,6 +1018,7 @@ def unfreeze():
10081018

10091019
# Declares a new threads
10101020
smcheck = threading.Thread(target=simconnectLink)
1021+
pbphaseEngineThd = threading.Thread(target=pbphaseDelay, args=(4, 8))
10111022

10121023
# Local variables
10131024
volset = 90

PBT/LARGE-LEFT-180.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [2],
3-
"feets": [200, 320, 470],
3+
"feets": [200, 370, 530],
44
"engines": [0, 0],
55
"direction": ["left", "left", "straight"],
66
"heading": [90, 92, 0]

PBT/LARGE-LEFT-75.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [1],
3-
"feets": [174, 370],
3+
"feets": [209, 416],
44
"engines": [0, 0],
55
"direction": ["left", "straight"],
66
"heading": [76, 0]

PBT/LARGE-LEFT-90.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [1],
3-
"feets": [174, 370],
3+
"feets": [209, 416],
44
"engines": [0, 0],
55
"direction": ["left", "straight"],
66
"heading": [91, 0]

PBT/LARGE-RIGHT-180.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [2],
3-
"feets": [200, 320, 470],
3+
"feets": [200, 370, 530],
44
"engines": [0, 0],
55
"direction": ["right", "right", "straight"],
66
"heading": [90, 92, 0]

PBT/LARGE-RIGHT-75.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [1],
3-
"feets": [174, 370],
3+
"feets": [209, 416],
44
"engines": [0, 0],
55
"direction": ["right", "straight"],
66
"heading": [76, 0]

PBT/LARGE-RIGHT-90.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [1],
3-
"feets": [174, 370],
3+
"feets": [209, 416],
44
"engines": [0, 0],
55
"direction": ["right", "straight"],
66
"heading": [91, 0]

PBT/MEDIUM-LEFT-180.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [2],
3-
"feets": [180, 300, 450],
3+
"feets": [180, 350, 510],
44
"engines": [0, 0],
55
"direction": ["left", "left", "straight"],
66
"heading": [90, 92, 0]

PBT/MEDIUM-RIGHT-180.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [2],
3-
"feets": [180, 300, 450],
3+
"feets": [180, 350, 510],
44
"engines": [0, 0],
55
"direction": ["right", "right", "straight"],
66
"heading": [90, 92, 0]

PBT/SMALL-LEFT-180.pbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"steps": [2],
3-
"feets": [130, 250, 400],
3+
"feets": [130, 300, 460],
44
"engines": [0, 0],
55
"direction": ["left", "left", "straight"],
66
"heading": [90, 92, 0]

0 commit comments

Comments
 (0)