16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 12:19:18 +02:00

Revert "Merge branch 'master-no-pull' into high-beam-lights"

This reverts commit 1222f0fbb8, reversing
changes made to a7bf952ed6.
This commit is contained in:
2025-01-07 05:06:24 +01:00
parent 1222f0fbb8
commit c7e67c6816
4 changed files with 41 additions and 279 deletions

View File

@@ -7005,23 +7005,16 @@ bool TTrain::Update( double const Deltatime )
// McZapkie: predkosc wyswietlana na tachometrze brana jest z obrotow kol
auto const maxtacho { 3.0 };
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));
fTachoVelocity = static_cast<float>( std::min( std::abs(11.31 * mvControlled->WheelDiameter * mvControlled->nrot), mvControlled->Vmax * 1.05) );
{ // skacze osobna zmienna
float ff = simulation::Time.data().wSecond; // skacze co sekunde - pol sekundy
// pomiar, pol sekundy ustawienie
if (ff != fTachoTimer) // jesli w tej sekundzie nie zmienial
{
if (fTachoVelocity >= 5) // jedzie
fTachoVelocityJump = fTachoVelocity + (2.0 - LocalRandom(3) + LocalRandom(3)) * 0.5;
else if (fTachoVelocity < 5 && fTachoVelocity > 1)
fTachoVelocityJump = Random(0, 4); // tu ma sie bujac jak wariat i zatrzymac na jakiejs predkosci
// fTachoVelocityJump = 0; // stoi
if (fTachoVelocity > 1) // jedzie
fTachoVelocityJump = fTachoVelocity + (2.0 - LocalRandom(3) + LocalRandom(3)) * 0.5;
else
fTachoVelocityJump = 0; // stoi
fTachoTimer = ff; // juz zmienil
}
}
@@ -7436,20 +7429,6 @@ bool TTrain::Update( double const Deltatime )
btLampkaPoslizg.Turn( false );
}
// Lampka pracujacej sprezacki
if (mvControlled->CompressorFlag || mvOccupied->CompressorFlag)
btCompressors.Turn(true);
else
btCompressors.Turn(false);
// Lampka aktywowanej kabiny
if (mvControlled->CabActive != 0) {
btCabActived.Turn(true);
}
else {
btCabActived.Turn(false);
}
if( true == lowvoltagepower ) {
// McZapkie-141102: SHP i czuwak, TODO: sygnalizacja kabinowa
if( mvOccupied->SecuritySystem.is_vigilance_blinking() ) {
@@ -10162,9 +10141,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co
{ "i-universal6:", btUniversals[ 6 ] },
{ "i-universal7:", btUniversals[ 7 ] },
{ "i-universal8:", btUniversals[ 8 ] },
{ "i-universal9:", btUniversals[ 9 ] },
{ "i-cabactived:", btCabActived },
{"i-compressorany:", btCompressors }
{ "i-universal9:", btUniversals[ 9 ] }
};
{
auto lookup = lights.find( Label );