Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added flare type 'd' (dashboard indicator) #2735

Merged
merged 6 commits into from
Apr 15, 2021

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Apr 13, 2021

Changes:

Example:

flares
7,3,6,   0.12, 0.3,       d, engine_ignition
7,3,6,   0.45, 0.3,       d, engine_battery
7,3,6,   0.72, 0.3,       d, engine_clutch_warning

7,3,6,   0.12, 0.15,      d, parkingbrake
7,3,6,   0.28, 0.15,      d, locked
7,3,6,   0.45, 0.15,      d, low_pressure
7,3,6,   0.68, 0.15,      d, signal_warning

Demonstration:
Test vehicle: flareboard.zip
image

Removed `RigDef::Flare2::Type`, using directly `FlareType` from SimData.h
Functions defined in class body are inline by default.
The pass-by-reference args were confusing and might actually hurt performance.
CODECHANGES:
DashBoardManager.h - added new enum field DD_SIGNAL_WARNING, commented the other DD_SIGNAL*
DashBoardManager.cpp - added data init for the new "signal_warning"
Actor.h - removed the `m_blinker*_lit` vars
Actor.cpp - update dashboard DD_SIGNAL* data directly. also update the new "signal_warning".
OutGauge.cpp - read data from dashboard instead of the removed vars.
ActorManager.cpp - minor - just renamed one function.
Instead of control number, you specify an input source from our dashboard system, see https://docs.rigsofrods.org/vehicle-creation/making-custom-hud/#input-sources

All "bool" input sources are supported:
```
flares
7,3,6,   0.12, 0.3       d engine_ignition
7,3,6,   0.45, 0.3       d engine_battery
7,3,6,   0.72, 0.3       d engine_clutch_warning

7,3,6,   0.12, 0.15      d parkingbrake
7,3,6,   0.28, 0.15      d locked
7,3,6,   0.45, 0.15      d low_pressure
7,3,6,   0.68, 0.15      d signal_warning
```
Implemented via dashboard flare 'd parkingbrake'
@tritonas00
Copy link
Collaborator

Works as advertised ❤️

@willmichals
Copy link

In your display, you show a signal_warning input type but that input is not documented on the docs. Is there a more extensive list of inputs elsewhere? Are we missing any others?

@willmichals
Copy link

Also, closes #2553

@ohlidalp
Copy link
Member Author

@willmichals signal_warning is being added by this PR, I'll add it to docs when merged. Anyway, good spot.

@tritonas00
Copy link
Collaborator

It works now

kk

Copy link
Collaborator

@WillyB1337 WillyB1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes looks good and clear.
My friends who initially made me aware of the issue said it`s fixed.

@ohlidalp ohlidalp merged commit 93cee4d into RigsOfRods:master Apr 15, 2021
@ohlidalp ohlidalp deleted the dashflare branch April 15, 2021 19:16
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants