Welcome, Guest. Please login or register.
Did you miss your activation email?

News: The latest PSX update (version 10.49 from 15 October 2018) is available at: http://aerowinx.com/board/index.php?topic=4191.0

Author Topic: FiFLi add-on - First officer and Flight attendant for PSX - beta 0.74  (Read 59795 times)

vito

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
Quote from: HercMighty

Sorry 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
« Last edit: Sun, 11 Jan 2015 11:16 by vito »

HercMighty

  • Join date: Aug 2014
  • Posts: 119
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

  • Join date: Aug 2014
  • Posts: 119
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

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
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 ...
« Last edit: Sun, 11 Jan 2015 17:35 by vito »

Hardy Heinlin

  • Moderator
  • Join date: May 2009
  • Posts: 9510
    • Aerowinx
    • Email
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
« Last edit: Sun, 11 Jan 2015 16:16 by Hardy Heinlin »

vito

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
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.
« Last edit: Sun, 11 Jan 2015 17:15 by vito »

HercMighty

  • Join date: Aug 2014
  • Posts: 119
Ok, PSX does not seem to lock up with Flight Attendant checked.

vito

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
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.
« Last edit: Sun, 11 Jan 2015 18:27 by vito »

HercMighty

  • Join date: Aug 2014
  • Posts: 119
Ok, all seem good with that test....Progress!

vito

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
Quote from: HercMighty

Ok, 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
« Last edit: Sun, 11 Jan 2015 19:28 by vito »

HercMighty

  • Join date: Aug 2014
  • Posts: 119
Ok, that is working :)

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

PSX stayed responsive with no issues :)

GodAtum

  • Join date: Jun 2014
  • Posts: 520
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

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 3160
  • Hoppie designs SATCOM equipment for airliners.
    • http://www.hoppie.nl/
    • Email
If FiFli is networked, there should be zero reason why it must be on the same PC as PSX.

Hardy Heinlin

  • Moderator
  • Join date: May 2009
  • Posts: 9510
    • Aerowinx
    • Email
Quote from: 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.

I was just asking because I was curious how your ejected strings look like, and how often they are ejected.


Regards,

|-|ardy
« Last edit: Sun, 11 Jan 2015 20:52 by Hardy Heinlin »

HercMighty

  • Join date: Aug 2014
  • Posts: 119
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

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 3160
  • Hoppie designs SATCOM equipment for airliners.
    • http://www.hoppie.nl/
    • Email
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
« Last edit: Sun, 11 Jan 2015 21:59 by Jeroen Hoppenbrouwers »

vito

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
Quote from: 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?


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

vito

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
Quote from: HercMighty

Ok, 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

  • Join date: May 2009
  • Location: Zagreb
  • Posts: 207
    • http://free-zg.htnet.hr/vitomir/
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

  • Moderator
  • Join date: May 2009
  • Posts: 9510
    • Aerowinx
    • Email
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
« Last edit: Mon, 12 Jan 2015 12:26 by Hardy Heinlin »