mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Add logic for defining max analog tacho display speed
MaxTachoSpeed in Cntrl. section in fiz
This commit is contained in:
@@ -6913,7 +6913,13 @@ bool TTrain::Update( double const Deltatime )
|
||||
|
||||
// McZapkie: predkosc wyswietlana na tachometrze brana jest z obrotow kol
|
||||
auto const maxtacho { 3.0 };
|
||||
fTachoVelocity = static_cast<float>( std::min( std::abs(11.31 * mvControlled->WheelDiameter * mvControlled->nrot), mvControlled->Vmax * 1.05) );
|
||||
|
||||
double maxSpeed = mvControlled->Vmax * 1.05; // zachowanie starej logiki jak nie ma definicji max tarczki
|
||||
if (mvOccupied->maxTachoSpeed != 0)
|
||||
{
|
||||
maxSpeed = mvOccupied->maxTachoSpeed;
|
||||
}
|
||||
fTachoVelocity = static_cast<float>(std::min(std::abs(11.31 * mvControlled->WheelDiameter * mvControlled->nrot), maxSpeed));
|
||||
{ // skacze osobna zmienna
|
||||
float ff = simulation::Time.data().wSecond; // skacze co sekunde - pol sekundy
|
||||
// pomiar, pol sekundy ustawienie
|
||||
|
||||
Reference in New Issue
Block a user