RoystonS / BetterBravoLights

Utility for controlling lights on a Honeycomb Bravo Throttle from Microsoft Flight Simulator
MIT License
42 stars 8 forks source link

Reversing Bravo AP Lights #10

Closed dsweingard closed 2 years ago

dsweingard commented 2 years ago

Alpha

**Is your feature request related to a problem? Please describe. No

See above **Describe the solution you'd like See above

Haven't figured out how to do this myself yet.

Additional context

RoystonS commented 2 years ago

Heya. So, it sounds like you want to be able to reverse all the lights so that you can easily find the buttons in a dark room.

There are 3 ways we can do this:

  1. You can do it today by editing the configuration file and manually inverting all of the logic. That is, if it says something like LowVolts = A:ELECTRICAL MAIN BUS VOLTAGE:1, volts <= 24.5 you'd need to change it to LowVolts = A:ELECTRICAL MAIN BUS VOLTAGE:1, volts > 24.5. Any AND/OR logic would also need swapping around. Don't do this - is would be a huge pain.
  2. If I had implemented a NOT operator, you could simply wrap all of the conditions with NOT (condition). Every single condition would still need modifying but it'd be much easier to do. I haven't implemented it yet.
  3. I can implement a simple toggle that tells BetterBravoLights to invert the lights whatever the conditions.

I'm happy to implement 3; it shouldn't be very hard. But before I start, some questions about how it would work:

dsweingard commented 2 years ago

You are the absolute best. For what I am trying to do, it's only the autopilot stack on the Bravo. I think gear lights are working as they should. I don't need to make work for you, I'd Incan figure out the syntax as you suggest. I'm just trying to accomplish turning them all on except for the ones selected. Worth a shot with the syntax edit to the config file to see if I actually like it before making any work. I may be the only person who wants them this way. Best, darren

Sent from Yahoo Mail for iPhone

On Tuesday, October 5, 2021, 11:13 AM, Royston Shufflebotham @.***> wrote:

Heya. So, it sounds like you want to be able to reverse all the lights so that you can easily find the buttons in a dark room.

There are 3 ways we can do this:

I'm happy to implement 3; it shouldn't be very hard. But before I start, some questions about how it would work:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

RoystonS commented 2 years ago

Okey doke. If you just want to try it out, reverse all the logic on the autopilot configurations.

This is easy to do. Edit the Config.ini file, and for all the autopilot lights (these ones: https://github.com/RoystonS/BetterBravoLights/blob/v0.3.1/BravoLights/Config.ini#L5-L12) change the == to !=. That'll invert them all.

dsweingard commented 2 years ago

Hi; You mean like this? HDG = A:AUTOPILOT HEADING LOCK, bool != 1 NAV = A:AUTOPILOT NAV1 LOCK, bool != 1 APR = A:AUTOPILOT APPROACH HOLD, bool != 1 REV = A:AUTOPILOT BACKCOURSE HOLD, bool != 1 ALT = A:AUTOPILOT ALTITUDE LOCK, bool != 1 VS = A:AUTOPILOT VERTICAL HOLD, bool != 1 IAS = A:AUTOPILOT FLIGHT LEVEL CHANGE, bool != 1 AUTOPILOT = A:AUTOPILOT MASTER, percent over 100 != 1 Because I think it worked!  Amazing piece of work.

On Wednesday, October 6, 2021, 02:54:34 AM PDT, Royston Shufflebotham ***@***.***> wrote:  

Okey doke. If you just want to try it out, reverse all the logic on the autopilot configurations.

This is easy to do. Edit the Config.ini file, and for all the autopilot lights (these ones: https://github.com/RoystonS/BetterBravoLights/blob/v0.3.1/BravoLights/Config.ini#L5-L12) change the == to !=. That'll invert them all.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

RoystonS commented 2 years ago

Yep, exactly like that.

If that's a useful configuration for you, then what I could do is to add a top-level Invert option to the configuration that allows somebody easily to say which lights they want inverted, e.g.

Invert = HDG, NAV, APR, REV, ALT, VS, IAS, AUTOPILOT

(That would take the place of all of the config you posted above.)

There are several benefits to that:

  1. Instead of manually having to invert each light's expression, you just list the ones you want inverted.
  2. It would just apply across all aircraft, rather than you having to invert every light for every aircraft (e.g. if somebody wanted to invert the oil pressure light that's a lot of work right now as there are many oil pressure light expressions, one for each aircraft)
  3. It's easier to list the lights to invert than to calculate the inverted expressions. (e.g. X == 1 OR Y == 1 needs to become X !=1 AND Y != 1, which isn't trivial.) A NOT operator would make that easier, but that wouldn't fix the multiple aircraft issue.
  4. When new versions of the tool come out, you don't have to reapply all your individual inversion logics: you just paste in your Invert line and you're done.

Would that make sense, @dsweingard ?

dsweingard commented 2 years ago

So far I'm loving it. Had a CTD today but don't think it was your mod. 

Sent from Yahoo Mail for iPhone

On Thursday, October 14, 2021, 11:31, Royston Shufflebotham @.***> wrote:

Yep, exactly like that.

If that's a useful configuration for you, then what I could do is to add a top-level Invert option to the configuration that allows somebody easily to say which lights they want inverted, e.g.

Invert = HDG, NAV, APR, REV, ALT, VS, IAS, AUTOPILOT

(That would take the place of all of the config you posted above.)

There are several benefits to that:

Would that make sense, @dsweingard ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

dsweingard commented 2 years ago

I'm sure that would be useful to people yeah. I only fly like three planes right now but I'm talking to the mod over at the flying Fabio's discord so others are definitely interested. 

Sent from Yahoo Mail for iPhone

On Thursday, October 14, 2021, 11:31, Royston Shufflebotham @.***> wrote:

Yep, exactly like that.

If that's a useful configuration for you, then what I could do is to add a top-level Invert option to the configuration that allows somebody easily to say which lights they want inverted, e.g.

Invert = HDG, NAV, APR, REV, ALT, VS, IAS, AUTOPILOT

(That would take the place of all of the config you posted above.)

There are several benefits to that:

Would that make sense, @dsweingard ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

RoystonS commented 2 years ago

I've just released BBL v0.5.0 which includes the new Invert option. I've put an example of its use in the standard Config.ini file:

; Uncomment this line to invert the display logic for the top row of auto-pilot lights
;Invert = HDG, NAV, APR, REV, ALT, VS, IAS, AUTOPILOT

If you remove that leading comment character from the Invert line, it should give you exactly your inverted autopilot row with no other changes required. Let me know how that goes for you?

dsweingard commented 2 years ago

Excellent. I'll download today and give it a whirl. 

Sent from Yahoo Mail for iPhone

On Sunday, October 17, 2021, 09:09, Royston Shufflebotham @.***> wrote:

I've just released BBL v0.5.0 which includes the new Invert option. I've put an example of its use in the standard Config.ini file: ; Uncomment this line to invert the display logic for the top row of auto-pilot lights ;Invert = HDG, NAV, APR, REV, ALT, VS, IAS, AUTOPILOT

If you remove that leading comment character from the Invert line, it should give you exactly your inverted autopilot row with no other changes required. Let me know how that goes for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.