Jump to content
Sign in to follow this  
Guest Ionizeyou

Intermittent Wipers Possible?

Recommended Posts

Guest Ionizeyou

Okay... so I have working windshield wipers here, but cannot find a way to make position "(L:Lt Wiper, enum) 2 == " an intermittent function with a seven second delay. What you see below is working code for a knob with four positions of "off" "low" "medium" and "high". I'd like it to be "intermittent" "low" and "high". Any ideas on how to accomplish this? (L:Lt Wiper, enum) 0 != (L:Var2, enum) (L:Var1, enum) + (>L:Var2, enum) (L:Var2, enum) 2 <= if{ (L:Lt Wiper, enum) (>L:Var1, enum) } (L:Var2, enum) 50 >= if{ (L:Lt Wiper, enum) /-/ (>L:Var1, enum) } (L:Var2, enum) 50 < if{ (L:Lt Wiper, enum) 0 == if{ 2 (>L:Var1, enum) } } (L:Var2, enum) (L:Lt Wiper, enum)Left W/S Wiper Control (%((L:Lt Wiper, enum))%{case}%{:0}park%{:1}int%{:2}low%{:4}high%{end}) (L:Lt Wiper, enum) 2 == if{ 0 (>L:Lt Wiper, enum) } (L:Lt Wiper, enum) 3 == if{ 2 (>L:Lt Wiper, enum) } (L:Lt Wiper, enum) 4 == if{ 3 (>L:Lt Wiper, enum) } (L:Lt Wiper, enum) 3 == if{ 4 (>L:Lt Wiper, enum) } (L:Lt Wiper, enum) 2 == if{ 3 (>L:Lt Wiper, enum) } (L:Lt Wiper, enum) 0 == if{ 2 (>L:Lt Wiper, enum) }

Share this post


Link to post
Share on other sites

Hi,It happens that I was in need to program my own wipers, so I made a code that follows your idea and includes an intermittent position. It also takes care of the current blade position before accepting a selector's new value, just to smooth the operation like the real wipers. The problem is I can't test it because I didn't create the proper bitmap yet. Maybe you would be kind enough to try it and let me know how it works? :-)High mode gives a complete cycle in 2 seconds, and low/intermittent in 1 second. Calcs are for a standard section (do not use Frequency=n)Limit values are yours 0-50 , just replace (L:Var2, enum) with (L:Wiper Blade Pos,number). Knob position control variable is the same (L:Lt Wiper,enum) used by you.Code snippets are: (P:Absolute Time,seconds) (L:Wiper Blade Pos,number) 2.78 2 1 1 0 4 (L:Wiper Factor,enum) case * (L:Wiper Delay,seconds) 0 != if{ (L:Wiper Delay,seconds) 7 + @Time < if{ 1 (>L:Wiper Speed Changed,bool) @Time (>L:Wiper Delay,seconds) } els{ (L:Wiper Blade Pos,number) 0 != (>L:Wiper Factor,enum) } }(L:Wiper Speed Changed,bool) (L:Wiper Blade Pos,number) 0 == andif{ (L:Lt Wiper,enum) (>L:Wiper Factor,enum) 0 (>L:Wiper Speed Changed,bool) }(L:Blade Down,bool) !if{ @BladeSpeed + 50 min d (>L:Wiper Blade Pos,number) 50 == (>L:Blade Down,bool) }els{ @BladeSpeed - 0 max d (>L:Wiper Blade Pos,number) 0 != (>L:Blade Down,bool) }In the rotating element (L:Wiper Blade Pos,number)etcIn the mouse area: 1 (>L:Wiper Speed Changed,bool) (L:Lt Wiper, enum) -- 0 max (>L:Lt Wiper, enum) @Time (L:Lt Wiper, enum) 1 == * (>L:Wiper Delay,seconds) 1 (>L:Wiper Speed Changed,bool) (L:Lt Wiper, enum) ++ 3 min (>L:Lt Wiper, enum) @Time (L:Lt Wiper, enum) 1 == * (>L:Wiper Delay,seconds) Regards,Tom

Share this post


Link to post
Share on other sites
Guest Ionizeyou

Thank you Tom for your help! It works like a charm. I had to duplicate the update for the right side as well because the right blade tip will show on the main panel, and when viewing the overhead, the upper part of the blades will show. See attachment of the overhead view... it's very cool!Now... how do you cycle the sound in all this so the sound doesn't keep running when the blade is stopped? I have a wiper blade/motor sound but I do not want it to play when the blade is stopped or on its seven second delay.Thanks again for the heads up...

Share this post


Link to post
Share on other sites

>Thank you Tom for your help! It works like a charm. I had>to duplicate the update for the right side as well because the>right blade tip will show on the main panel, and when viewing>the overhead, the upper part of the blades will show. See>attachment of the overhead view... it's very cool!>Nice overhead indeed! Are all those system swiches operative? >Now... how do you cycle the sound in all this so the sound>doesn't keep running when the blade is stopped? I have a>wiper blade/motor sound but I do not want it to play when the>blade is stopped or on its seven second delay.>I understand you are talking of Doug Dawson's sound gauge interface?If so, I guess you should use two sound files, one for high and the other for low, that should last a complete cycle in each case. Then fire the sound with 1 (>Sound) when the blade pos is > 0 (with a control flag to avoid firing it up to 50!).Tom PD: It is possible also to make the wipers work according to simulator rate, or even stop when it is paused...but then you'd have to consider what to do with the sound in these cases. Doug's current version doesn't support sound play acceleration AFAIK.

Share this post


Link to post
Share on other sites
Guest Ionizeyou

>Nice overhead indeed! Are all those system swiches operative?Yes, all except the pressurization control and the navigation control panels. About seven switches and knobs will be inop.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...