News:

Precision Simulator update 10.173 (24 February 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

FiFLi add-on - First officer and Flight attendant for PSX - beta 0.77

Started by vito, Sun, 4 Jan 2015 19:22

vito

Quote from: HercMightySorry didn't seem to help  :(

PSX becomes unresponsive until your application is closed....

Any help I can give shout....be a great application if we can get it running :)

Thanks on kind words, we will find what overloads PSX ! The only thing main thread is calling continuosly is the flight "attendant actions" method  - maybe here is the main problem - method is being called continuously without any control if it is already active - doing something (I don't know if this sounds understandable). Now I entered some control that should tell main thread that flight attendant is already "doing" something so it can't be called from within main thread if it hasn't finished what is doing :-) Will see if this helps.

here is link on latest beta 0.33, please try it :

https://www.dropbox.com/s/wvt0tz4ii3smtn8/FiFLi.jar?dl=0

best regards

vito

HercMighty

Maybe closer?

Ok, as has happened in the past. Load PSX, Load FiFLI, check Flight Attendant and then load 01 Departure 001. PSX locks me out as the first message plays.

This time after the first message plays I unchecked the flight attendant, and got control back, and then got an EICAS message saying I had a FMC Message. Look at the FMC and VSPEEDS are gone, and further looking the route is gone. Hmmm...

As I ponder this the other messages begin to play from the flight attendant and I remain in control of PSX....

So tried again...

Again PSX locks, but if I uncheck flight attendant I get control back...re-check Flight attendant after first message is played and other messages play and the FMC was not cleared...

Tried again with not checking the box until the situation was loaded but there was a delay until I could get control of PSX...was hoping that by checking the flight attendant after the situ was loaded would resolve the initial freeze but it didn't...

So maybe the issue is all to do with the situ loaded? Based on the state of the aircraft need to put in a protection? Detect that it is ready for message 4 say, and play that and give the cabin ready signal? Makes things complicated I know :)

Seeing as taxi out is impossible without some type of visual addon I been learning most of the A/C by starting from this point so far....

After which brief is the cabin ready supposed to come on? What is the trigger? Been letting it sit here, I think 3 messages have played but no Cabin Ready signal yet....

HercMighty

While waiting for the final playback from the flight attendant I found that I could not affect some changes in the sim...

For example, I couldn't change the brakes :(

Also, I could move the flap lever visually but the EICAS display never moved from Flaps 20 regardless of the position of the flap lever.

Hope this helps...

vito

Ok, thanks, let me see if this one works FiFli beta 0.34:

https://www.dropbox.com/s/wvt0tz4ii3smtn8/FiFLi.jar?dl=0

now the flight attendant is completely disabled, FiFLi just reads PSX stream. Now it should just make  connection to the PSX and that's it. Does this "work" ?

best regards

vito

edit:

"cabin ready" comes after first two briefings are played ...

Hardy Heinlin

Hi Vito,

can you show your ejected Q message strings in the console of your Netbeans/Eclipse IDE?

I mean, using this command:

System.out.println( string );


Regards,

|-|ardy

vito

Yes, the ejected Q message strings flow is ok !  :D PSX correctly shows in the network ---> main : client accepted, after the check box is removed: client disconnected. After that again connects correctly.

HercMighty

Ok, PSX does not seem to lock up with Flight Attendant checked.

vito

Ok, then we can assume that reading from PSX is done correctly.
Here is the link to FiFLi beta 0.35

https://www.dropbox.com/s/wvt0tz4ii3smtn8/FiFLi.jar?dl=0

now the attendant is again active but the pause thread is removed - not called. Also FiFLi sends message to PSX.

Try loading Basic 013 - Climbing to final cruise ... after situ file is loaded start FiFLi and make it active. Cruise briefing should be played immediately.

HercMighty


vito

Quote from: HercMightyOk, all seem good with that test....Progress!

:-) PSX was responsive, no stutters ? If so then please load situ Basic 002 - On ground and doors closing. Go to the Model ---> Airframe and select Aircraft model  : Passenger. Now select the auto brakes to "RTO" this is trigger. While doors are closing start FiFLi. First briefing should be played (after doors are closed) and on the pedestal you should immediately see "Cabin ready" message.

Here is the link for latest FiFLi beta 0.35:

https://www.dropbox.com/s/wvt0tz4ii3smtn8/FiFLi.jar?dl=0

HercMighty

Ok, that is working :)

Doors closed, cabin ready indication, the Flight Attendant went through their speech....

PSX stayed responsive with no issues :)

GodAtum

Ok, a quick test and all seems good, no crashes :) this is also with Basic 013 - Climbing to final cruise.

is it possible to install FiFli on a different PC?

Jeroen Hoppenbrouwers

If FiFli is networked, there should be zero reason why it must be on the same PC as PSX.

Hardy Heinlin

Quote from: vitoYes, the ejected Q message strings flow is ok !  :D PSX correctly shows in the network ---> main : client accepted, after the check box is removed: client disconnected. After that again connects correctly.
I was just asking because I was curious how your ejected strings look like, and how often they are ejected.


Regards,

|-|ardy

HercMighty

One suggestion...maybe expand the form to list say what the Flight Attendant things that will play and the triggers?

Don't know how easy it would be to update the form as ones are completed?

Jeroen Hoppenbrouwers

#55
In general, experience has taught us (the hard way) that state machines that trigger on "normal, always happening" event sequences are quite tricky. Even the built-in PSX ATC Robot manages to escape "normal, routine" events if the pilot is just a bit out of his routine today. And some state machines are fiddly in getting back to work; ACARS OOOI is one of these.

In such a case it may help to at least document exactly what state machine (diagram) and trigger events (list) has been implemented, and sometimes also to post the current state of the machine somewhere out of the way but visible. This aids a lot in debugging and in searching why the machine seems to be locked up.

If at all possible, it is better to design a stateless machine. Usually this can be done by building a list of permanently monitored variables, and trigger an event when a specific combination of variables and exceedances occurs, without needing to know the current state (previous trigger). This is especially helpful when the stateless machine suddenly needs to cope with a midflight situation change. A state machine now gets hopelessly confused, while a stateless machine just picks up (and may go back from "landing announcement" to "takeoff announcement").


Hoppie

vito

Quote from: HercMightyOne suggestion...maybe expand the form to list say what the Flight Attendant things that will play and the triggers?

Don't know how easy it would be to update the form as ones are completed?

Yes, I was thinking to do that and I will soon as we escape this initial rumbling with beta! :-)

vito

Quote from: HercMightyOk, that is working :)

Doors closed, cabin ready indication, the Flight Attendant went through their speech....

PSX stayed responsive with no issues :)

Thanks for testing this, now I can safely say thst the problem is in "pause" routine or function.  8)

vito

Hardy, can you suggest how to implement wait or pause function? Mine obviously is not working correctly, it messed with main thread and managed to disrupt even PSX. This is not trivial and mine expirience / knowledge here is  at least  ... 8)


Best regards

Vito

Hardy Heinlin

The wait and pause is already implemented if you're using my code example in AddonExampleNetThread.java.


while (true) {
   if ((message = in.readLine()) != null) {
      try {
         if (message.charAt(0) == 'Q') {
etc.


in.readLine() blocks (pauses) until a new message has arrived in the BufferedReader (called "in"). This "while" loop runs in a separate thread, so it blocks only itself.


Cheers,

|-|ardy