mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 23:40:29 +01:00
Add engine voltage parameter
This commit is contained in:
@@ -125,6 +125,7 @@ state_registry::state_registry()
|
||||
add( "hv_current_1", value_type::float32, "A", -5000.0, 5000.0, []( state_snapshot const &s ) { return make_value( s, value_type::float32, s.train.hv_current[ 0 ], s.electric ); } );
|
||||
add( "hv_current_2", value_type::float32, "A", -5000.0, 5000.0, []( state_snapshot const &s ) { return make_value( s, value_type::float32, s.train.hv_current[ 1 ], s.electric ); } );
|
||||
add( "hv_current_3", value_type::float32, "A", -5000.0, 5000.0, []( state_snapshot const &s ) { return make_value( s, value_type::float32, s.train.hv_current[ 2 ], s.electric ); } );
|
||||
add( "engine_voltage", value_type::float64, "V", 0, 40000.0, []( state_snapshot const &s ) { return make_value( s, value_type::float64, s.train.enginevoltage, s.electric ); } );
|
||||
add( "lv_voltage", value_type::float32, "V", 0.0, 200.0, []( state_snapshot const &s ) { return make_value( s, value_type::float32, s.train.lv_voltage ); } );
|
||||
add( "distance", value_type::float64, "m", {}, {}, []( state_snapshot const &s ) { return make_value( s, value_type::float64, s.train.distance ); } );
|
||||
|
||||
|
||||
@@ -953,6 +953,7 @@ TTrain::state_t TTrain::get_state() const
|
||||
static_cast<float>(mvPantographUnit->PantPress),
|
||||
fHVoltage,
|
||||
{fHCurrent[mvControlled->TrainType & dt_EZT ? 0 : 1], fHCurrent[2], fHCurrent[3]},
|
||||
mvOccupied->EngineVoltage,
|
||||
ggLVoltage.GetValue(),
|
||||
mvOccupied->DistCounter,
|
||||
static_cast<std::uint8_t>(RadioChannel()),
|
||||
|
||||
@@ -108,6 +108,7 @@ class TTrain {
|
||||
float pantograph_pressure;
|
||||
float hv_voltage;
|
||||
std::array<float, 3> hv_current;
|
||||
double enginevoltage;
|
||||
float lv_voltage;
|
||||
double distance;
|
||||
std::uint8_t radio_channel;
|
||||
|
||||
Reference in New Issue
Block a user