Added environment panel for depth, pressure and outside temperature.
This commit is contained in:
1 parent
2d91487c6a
commit
92006372da
21 files changed
+2825
-1616
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# Environment panel
|
||||
|
||||
Run `scenes/environment_demo.tscn` with F6. It previews surface/zero, shallow operation, deeper readings, independent depth/pressure warnings, stale data and both themes.
|
||||
|
||||
```gdscript
|
||||
$EnvironmentPanel.set_telemetry(248.6, 2.54, 7.4)
|
||||
# depth: metres; outside pressure: MPa; water temperature: Celsius
|
||||
```
|
||||
|
||||
The depth indicator uses `log(1 + depth / knee)`, normalized to the maximum depth. This includes zero and expands shallow readings; the default knee is 1 m. Tick labels show the non-linear spacing. Numeric readings are untransformed; negative depth remains visible numerically while the marker stays at zero. Above-limit readings remain visible while the marker clamps to the bottom.
|
||||
|
||||
Limits default to 1000 m and 10 MPa. Warning/saturation colors start at 80%/95% of each actual measurement's limit, independently of the scale transform. Temperature has no limit or gauge. Pressure and depth are supplied independently; no conversion is performed, and the pressure datum should match the configured pressure limit. Demo samples are illustrative.
|
||||
|
||||
Missing data shows dashes. After two seconds without a sample, values are marked STALE / HELD. Non-finite values and negative pressure are rejected. `clear_telemetry()` restores the missing-data state.
|
||||
|
||||
Labels and containers remain editable scene nodes; `depth_scale.gd` draws the indicator. There is no background icon. Colors use shared theme roles. The panel replaces the Environment placeholder in the library and both layouts without changing saved JSON type IDs.
|
||||
Reference in new issue
Block a user