mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 06:39:18 +02:00
Dodany opcjonalny przełącznik aktywacji kabiny oraz rozłączania tylnego sprzęgu
This commit is contained in:
@@ -2611,7 +2611,7 @@ void TController::Lights(int head, int rear)
|
||||
|
||||
void TController::DirectionInitial()
|
||||
{ // ustawienie kierunku po wczytaniu trainset (może jechać na wstecznym
|
||||
mvOccupied->CabActivisation(); // załączenie rozrządu (wirtualne kabiny)
|
||||
mvOccupied->CabActivisationAuto(); // załączenie rozrządu (wirtualne kabiny)
|
||||
if (mvOccupied->Vel > EU07_AI_NOMOVEMENT)
|
||||
{ // jeśli na starcie jedzie
|
||||
iDirection = iDirectionOrder =
|
||||
@@ -5690,6 +5690,7 @@ void TController::TakeControl( bool const Aidriver, bool const Forcevehiclecheck
|
||||
{ // teraz AI prowadzi
|
||||
AIControllFlag = AIdriver;
|
||||
pVehicle->Controller = AIdriver;
|
||||
mvOccupied->CabActivisation(true);
|
||||
iDirection = 0; // kierunek jazdy trzeba dopiero zgadnąć
|
||||
TableClear(); // ponowne utworzenie tabelki, bo człowiek mógł pojechać niezgodnie z sygnałami
|
||||
if( action() != TAction::actSleep ) {
|
||||
@@ -5992,6 +5993,12 @@ void
|
||||
TController::determine_consist_state() {
|
||||
// ABu-160305 testowanie gotowości do jazdy
|
||||
// Ra: przeniesione z DynObj, skład użytkownika też jest testowany, żeby mu przekazać, że ma odhamować
|
||||
|
||||
if ((mvOccupied->CabActive == 0) || (mvOccupied->CabActive == mvOccupied->CabOccupied))
|
||||
{
|
||||
mvOccupied->CabActivisation(true);
|
||||
}
|
||||
|
||||
int index = double(BrakeAccTableSize) * (mvOccupied->Vel / mvOccupied->Vmax);
|
||||
index = std::min(BrakeAccTableSize, std::max(1, index));
|
||||
fBrake_a0[0] = fBrake_a0[index];
|
||||
|
||||
@@ -1510,6 +1510,9 @@ public:
|
||||
int MainCtrlMaxDirChangePos { 0 }; // can't change reverser state with master controller set above this position
|
||||
int CabActive = 0; //numer kabiny, z której jest sterowanie: 1 lub -1; w przeciwnym razie brak sterowania - rozrzad
|
||||
int CabOccupied = 0; //numer kabiny, w ktorej jest obsada (zwykle jedna na skład) // TODO: move to TController
|
||||
bool CabMaster = false; //czy pojazd jest nadrzędny w składzie
|
||||
bool AutomaticCabActivation = true; //czy zmostkowany rozrzad przelacza sie sam przy zmianie kabiny
|
||||
bool InactivaCabEmergencyBrake = false; //czy bez aktywacji włącza się nagłe
|
||||
double LastSwitchingTime = 0.0; /*czas ostatniego przelaczania czegos*/
|
||||
int WarningSignal = 0; // 0: nie trabi, 1,2,4: trabi
|
||||
bool DepartureSignal = false; /*sygnal odjazdu*/
|
||||
@@ -1715,6 +1718,8 @@ public:
|
||||
void PutCommand(std::string NewCommand, double NewValue1, double NewValue2, const TLocation &NewLocation);
|
||||
bool CabActivisation( bool const Enforce = false );
|
||||
bool CabDeactivisation( bool const Enforce = false );
|
||||
bool CabActivisationAuto( bool const Enforce = false );
|
||||
bool CabDeactivisationAuto( bool const Enforce = false );
|
||||
|
||||
/*! funkcje zwiekszajace/zmniejszajace nastawniki*/
|
||||
/*! glowny nastawnik:*/
|
||||
|
||||
@@ -2686,12 +2686,19 @@ bool TMoverParameters::CabActivisation( bool const Enforce )
|
||||
{
|
||||
CabActive = CabOccupied; // sterowanie jest z kabiny z obsadą
|
||||
DirAbsolute = DirActive * CabActive;
|
||||
CabMaster = true;
|
||||
SecuritySystem.Status |= s_waiting; // activate the alerter TODO: make it part of control based cab selection
|
||||
SendCtrlToNext("CabActivisation", 1, CabActive);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
bool TMoverParameters::CabActivisationAuto(bool const Enforce)
|
||||
{
|
||||
bool OK = AutomaticCabActivation ? CabActivisation(Enforce) : false;
|
||||
return OK;
|
||||
}
|
||||
|
||||
// *************************************************************************************************
|
||||
// Q: 20160710
|
||||
// wyłączenie rozrządu
|
||||
@@ -2700,11 +2707,12 @@ bool TMoverParameters::CabDeactivisation( bool const Enforce )
|
||||
{
|
||||
bool OK = false;
|
||||
|
||||
OK = Enforce || (CabActive == CabOccupied); // o ile obsada jest w kabinie ze sterowaniem
|
||||
OK = Enforce || ((CabActive == CabOccupied) && CabMaster); // o ile obsada jest w kabinie ze sterowaniem
|
||||
if (OK)
|
||||
{
|
||||
CabActive = 0;
|
||||
DirAbsolute = DirActive * CabActive;
|
||||
CabMaster = false;
|
||||
DepartureSignal = false; // nie buczeć z nieaktywnej kabiny
|
||||
SecuritySystem.Status = s_off; // deactivate alerter TODO: make it part of control based cab selection
|
||||
SecuritySystem.SHPLock = false;
|
||||
@@ -2714,6 +2722,12 @@ bool TMoverParameters::CabDeactivisation( bool const Enforce )
|
||||
return OK;
|
||||
}
|
||||
|
||||
bool TMoverParameters::CabDeactivisationAuto(bool const Enforce)
|
||||
{
|
||||
bool OK = AutomaticCabActivation ? CabDeactivisation(Enforce) : false;
|
||||
return OK;
|
||||
}
|
||||
|
||||
// *************************************************************************************************
|
||||
// Q: 20160710
|
||||
// Siła napędzająca drezynę po naciśnięciu wajhy
|
||||
@@ -4441,6 +4455,7 @@ void TMoverParameters::UpdatePipePressure(double dt)
|
||||
|| ( true == TestFlag( EngDmgFlag, 32 ) )
|
||||
*/
|
||||
|| ( true == s_CAtestebrake )
|
||||
|| ( ( 0 == CabActive ) && InactivaCabEmergencyBrake )
|
||||
|| ( ( SpringBrakeDriveEmergencyVel >= 0 )
|
||||
&& ( Vel > SpringBrakeDriveEmergencyVel )
|
||||
&& ( SpringBrake.IsActive ) )
|
||||
@@ -10374,6 +10389,9 @@ void TMoverParameters::LoadFIZ_Cntrl( std::string const &line ) {
|
||||
0;
|
||||
extract_value( BackwardsBranchesAllowed, "BackwardsBranchesAllowed", line, "" );
|
||||
|
||||
extract_value( AutomaticCabActivation, "AutomaticCabActivation", line, "" );
|
||||
extract_value( InactivaCabEmergencyBrake, "InactivaCabEmergencyBrake", line, "" );
|
||||
|
||||
extract_value( StopBrakeDecc, "SBD", line, "" );
|
||||
extract_value( ReleaseParkingBySpringBrake, "ReleaseParkingBySpringBrake", line, "" );
|
||||
extract_value( ReleaseParkingBySpringBrakeWhenDoorIsOpen, "ReleaseParkingBySpringBrakeWhenDoorIsOpen", line, "" );
|
||||
|
||||
115
Train.cpp
115
Train.cpp
@@ -272,6 +272,9 @@ TTrain::commandhandler_map const TTrain::m_commandhandlers = {
|
||||
{ user_command::batterytoggle, &TTrain::OnCommand_batterytoggle },
|
||||
{ user_command::batteryenable, &TTrain::OnCommand_batteryenable },
|
||||
{ user_command::batterydisable, &TTrain::OnCommand_batterydisable },
|
||||
{ user_command::cabactivationtoggle, &TTrain::OnCommand_cabactivationtoggle },
|
||||
{ user_command::cabactivationenable, &TTrain::OnCommand_cabactivationenable },
|
||||
{ user_command::cabactivationdisable, &TTrain::OnCommand_cabactivationdisable },
|
||||
{ user_command::pantographcompressorvalvetoggle, &TTrain::OnCommand_pantographcompressorvalvetoggle },
|
||||
{ user_command::pantographcompressorvalveenable, &TTrain::OnCommand_pantographcompressorvalveenable },
|
||||
{ user_command::pantographcompressorvalvedisable, &TTrain::OnCommand_pantographcompressorvalvedisable },
|
||||
@@ -619,6 +622,8 @@ dictionary_source *TTrain::GetTrainState( dictionary_source const &Extraparamete
|
||||
|
||||
dict->insert( "name", DynamicObject->asName );
|
||||
dict->insert( "cab", mvOccupied->CabOccupied );
|
||||
dict->insert( "cabactive", mvOccupied->CabActive );
|
||||
dict->insert( "master", mvOccupied->CabMaster );
|
||||
// basic systems state data
|
||||
dict->insert( "battery", mvOccupied->Power24vIsAvailable );
|
||||
dict->insert( "linebreaker", mvControlled->Mains );
|
||||
@@ -694,6 +699,8 @@ dictionary_source *TTrain::GetTrainState( dictionary_source const &Extraparamete
|
||||
dict->insert( "radio_volume", Global.RadioVolume );
|
||||
dict->insert( "door_lock", mvOccupied->Doors.lock_enabled );
|
||||
dict->insert( "door_step", mvOccupied->Doors.step_enabled );
|
||||
dict->insert( "door_permit_left", mvOccupied->Doors.instances[side::left].open_permit );
|
||||
dict->insert( "door_permit_right", mvOccupied->Doors.instances[side::right].open_permit );
|
||||
// movement data
|
||||
dict->insert( "velocity", std::abs( mvOccupied->Vel ) );
|
||||
dict->insert( "tractionforce", std::abs( mvOccupied->Ft ) );
|
||||
@@ -2362,6 +2369,58 @@ void TTrain::OnCommand_batterydisable( TTrain *Train, command_data const &Comman
|
||||
}
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_cabactivationtoggle(TTrain *Train, command_data const &Command) {
|
||||
|
||||
if (Command.action != GLFW_REPEAT) {
|
||||
// keep the switch from flipping back and forth if key is held down
|
||||
if (0 == Train->mvOccupied->CabActive) {
|
||||
// turn on
|
||||
OnCommand_cabactivationenable(Train, Command);
|
||||
}
|
||||
else {
|
||||
//turn off
|
||||
OnCommand_cabactivationdisable(Train, Command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_cabactivationenable(TTrain *Train, command_data const &Command) {
|
||||
|
||||
if (Command.action == GLFW_PRESS) {
|
||||
// visual feedback
|
||||
Train->ggCabActivationButton.UpdateValue(1.0f, Train->dsbSwitch);
|
||||
|
||||
Train->mvOccupied->CabActivisation();
|
||||
|
||||
// side-effects
|
||||
if (Train->mvOccupied->LightsPosNo > 0) {
|
||||
Train->Dynamic()->SetLights();
|
||||
}
|
||||
}
|
||||
else if (Command.action == GLFW_RELEASE) {
|
||||
if (Train->ggCabActivationButton.type() == TGaugeType::push) {
|
||||
// return the switch to neutral position
|
||||
Train->ggCabActivationButton.UpdateValue(0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_cabactivationdisable(TTrain *Train, command_data const &Command) {
|
||||
// TBD, TODO: ewentualnie zablokować z FIZ, np. w samochodach się nie odłącza akumulatora
|
||||
if (Command.action == GLFW_PRESS) {
|
||||
// visual feedback
|
||||
Train->ggCabActivationButton.UpdateValue(0.0f, Train->dsbSwitch);
|
||||
|
||||
Train->mvOccupied->CabDeactivisation();
|
||||
}
|
||||
else if (Command.action == GLFW_RELEASE) {
|
||||
if (Train->ggCabActivationButton.type() == TGaugeType::push) {
|
||||
// return the switch to neutral position
|
||||
Train->ggCabActivationButton.UpdateValue(0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_pantographtogglefront( TTrain *Train, command_data const &Command ) {
|
||||
|
||||
// HACK: presence of pantograph selector prevents manual operation of the individual valves
|
||||
@@ -5217,12 +5276,12 @@ void TTrain::OnCommand_inverterenable(TTrain *Train, command_data const &Command
|
||||
p = (kier ? p->NextC(flag) : p->PrevC(flag));
|
||||
}
|
||||
// visual feedback
|
||||
Train->ggInverterEnableButtons[itemindex].UpdateValue(1.0, Train->dsbSwitch);
|
||||
item.UpdateValue(1.0, Train->dsbSwitch);
|
||||
}
|
||||
else if (Command.action == GLFW_RELEASE) {
|
||||
// release
|
||||
// visual feedback
|
||||
Train->ggInverterEnableButtons[itemindex].UpdateValue(0.0, Train->dsbSwitch);
|
||||
item.UpdateValue(0.0, Train->dsbSwitch);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5254,12 +5313,12 @@ void TTrain::OnCommand_inverterdisable(TTrain *Train, command_data const &Comman
|
||||
p = (kier ? p->NextC(flag) : p->PrevC(flag));
|
||||
}
|
||||
// visual feedback
|
||||
Train->ggInverterDisableButtons[itemindex].UpdateValue(1.0, Train->dsbSwitch);
|
||||
item.UpdateValue(1.0, Train->dsbSwitch);
|
||||
}
|
||||
else if (Command.action == GLFW_RELEASE) {
|
||||
// release
|
||||
// visual feedback
|
||||
Train->ggInverterDisableButtons[itemindex].UpdateValue(0.0, Train->dsbSwitch);
|
||||
item.UpdateValue(0.0, Train->dsbSwitch);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5281,7 +5340,7 @@ void TTrain::OnCommand_invertertoggle(TTrain *Train, command_data const &Command
|
||||
{
|
||||
p->MoverParameters->Inverters[itemindex].Activate = !p->MoverParameters->Inverters[itemindex].Activate;
|
||||
// visual feedback
|
||||
Train->ggInverterToggleButtons[itemindex].UpdateValue(p->MoverParameters->Inverters[itemindex].Activate ? 1.0 : 0.0, Train->dsbSwitch);
|
||||
item.UpdateValue(p->MoverParameters->Inverters[itemindex].Activate ? 1.0 : 0.0, Train->dsbSwitch);
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -5964,6 +6023,30 @@ void TTrain::OnCommand_occupiedcarcouplingdisconnect( TTrain *Train, command_dat
|
||||
}
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_occupiedcarcouplingdisconnectback(TTrain *Train, command_data const &Command) {
|
||||
|
||||
// if( false == Train->m_controlmapper.contains( "couplingdisconnect_sw:" ) ) { return; }
|
||||
|
||||
if (Command.action == GLFW_PRESS) {
|
||||
// visual feedback
|
||||
Train->m_couplingdisconnectback = true;
|
||||
|
||||
if (Train->iCabn == 0) { return; }
|
||||
|
||||
if (Train->DynamicObject) {
|
||||
Train->DynamicObject->uncouple( 1 - Train->cab_to_end() );
|
||||
if (Train->DynamicObject->Mechanik) {
|
||||
// aktualizacja flag kierunku w składzie
|
||||
Train->DynamicObject->Mechanik->CheckVehicles(Disconnect);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Command.action == GLFW_RELEASE) {
|
||||
// visual feedback
|
||||
Train->m_couplingdisconnectback = false;
|
||||
}
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_departureannounce( TTrain *Train, command_data const &Command ) {
|
||||
|
||||
if( Train->ggDepartureSignalButton.SubModel == nullptr ) {
|
||||
@@ -7597,6 +7680,7 @@ bool TTrain::Update( double const Deltatime )
|
||||
ggBatteryButton.Update();
|
||||
ggBatteryOnButton.Update();
|
||||
ggBatteryOffButton.Update();
|
||||
ggCabActivationButton.Update();
|
||||
|
||||
ggWaterPumpBreakerButton.Update();
|
||||
ggWaterPumpButton.Update();
|
||||
@@ -8090,17 +8174,17 @@ bool TTrain::CabChange(int iDirection)
|
||||
}
|
||||
else
|
||||
{ // jeśli pojazd prowadzony ręcznie albo wcale (wagon)
|
||||
mvOccupied->CabDeactivisation();
|
||||
mvOccupied->CabDeactivisationAuto();
|
||||
if( mvOccupied->ChangeCab( iDirection ) ) {
|
||||
if( InitializeCab( mvOccupied->CabOccupied, mvOccupied->TypeName + ".mmd" ) ) {
|
||||
// zmiana kabiny w ramach tego samego pojazdu
|
||||
mvOccupied->CabActivisation(); // załączenie rozrządu (wirtualne kabiny)
|
||||
mvOccupied->CabActivisationAuto(); // załączenie rozrządu (wirtualne kabiny)
|
||||
DynamicObject->Mechanik->DirectionChange();
|
||||
return true; // udało się zmienić kabinę
|
||||
}
|
||||
}
|
||||
// aktywizacja poprzedniej, bo jeszcze nie wiadomo, czy jakiś pojazd jest
|
||||
mvOccupied->CabActivisation();
|
||||
mvOccupied->CabActivisationAuto();
|
||||
}
|
||||
return false; // ewentualna zmiana pojazdu
|
||||
}
|
||||
@@ -8645,7 +8729,7 @@ TTrain::MoveToVehicle(TDynamicObject *target) {
|
||||
}
|
||||
|
||||
target_train->Occupied()->LimPipePress = target_train->Occupied()->PipePress;
|
||||
target_train->Occupied()->CabActivisation( true ); // załączenie rozrządu (wirtualne kabiny)
|
||||
target_train->Occupied()->CabActivisationAuto( true ); // załączenie rozrządu (wirtualne kabiny)
|
||||
target_train->Dynamic()->MechInside = true;
|
||||
if( target_train->Dynamic()->Mechanik ) {
|
||||
target_train->Dynamic()->Controller = target_train->Dynamic()->Mechanik->AIControllFlag;
|
||||
@@ -8707,7 +8791,7 @@ TTrain::MoveToVehicle(TDynamicObject *target) {
|
||||
}
|
||||
|
||||
Occupied()->LimPipePress = Occupied()->PipePress;
|
||||
Occupied()->CabActivisation( true ); // załączenie rozrządu (wirtualne kabiny)
|
||||
Occupied()->CabActivisationAuto( true ); // załączenie rozrządu (wirtualne kabiny)
|
||||
} else {
|
||||
Dynamic()->bDisplayCab = false;
|
||||
Dynamic()->ABuSetModelShake( {} );
|
||||
@@ -8879,6 +8963,7 @@ void TTrain::clear_cab_controls()
|
||||
ggBatteryButton.Clear();
|
||||
ggBatteryOnButton.Clear();
|
||||
ggBatteryOffButton.Clear();
|
||||
ggCabActivationButton.Clear();
|
||||
//-------
|
||||
ggFuseButton.Clear();
|
||||
ggConverterFuseButton.Clear();
|
||||
@@ -9054,6 +9139,11 @@ void TTrain::set_cab_controls( int const Cab ) {
|
||||
( ggBatteryButton.type() == TGaugeType::push ? 0.5f :
|
||||
mvOccupied->Power24vIsAvailable ? 1.f :
|
||||
0.f ) );
|
||||
// battery
|
||||
ggCabActivationButton.PutValue(
|
||||
(ggCabActivationButton.type() == TGaugeType::push ? 0.5f :
|
||||
mvOccupied->CabActive == mvOccupied->CabOccupied ? 1.f :
|
||||
0.f));
|
||||
// line breaker
|
||||
if( ggMainButton.SubModel != nullptr ) { // instead of single main button there can be on/off pair
|
||||
ggMainButton.PutValue(
|
||||
@@ -9381,7 +9471,7 @@ void TTrain::set_cab_controls( int const Cab ) {
|
||||
if (itemindex < p->MoverParameters->InvertersNo)
|
||||
{
|
||||
// visual feedback
|
||||
ggInverterToggleButtons[itemindex].PutValue(p->MoverParameters->Inverters[itemindex].Activate ? 1.0 : 0.0);
|
||||
ggInverterToggleButtons[itemstart-1].PutValue(p->MoverParameters->Inverters[itemindex].Activate ? 1.0 : 0.0);
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -9676,6 +9766,7 @@ bool TTrain::initialize_gauge(cParser &Parser, std::string const &Label, int con
|
||||
{ "battery_sw:", ggBatteryButton },
|
||||
{ "batteryon_sw:", ggBatteryOnButton },
|
||||
{ "batteryoff_sw:", ggBatteryOffButton },
|
||||
{ "cabactivation_sw:", ggCabActivationButton },
|
||||
{ "distancecounter_sw:", ggDistanceCounterButton },
|
||||
{ "relayreset1_bt:", ggRelayResetButtons[ 0 ] },
|
||||
{ "relayreset2_bt:", ggRelayResetButtons[ 1 ] },
|
||||
@@ -9785,6 +9876,8 @@ bool TTrain::initialize_gauge(cParser &Parser, std::string const &Label, int con
|
||||
{ "cablight_sw:", &Cabine[ iCabn ].bLight },
|
||||
{ "springbraketoggle_bt:", &mvOccupied->SpringBrake.Activate },
|
||||
{ "couplingdisconnect_sw:", &m_couplingdisconnect },
|
||||
{ "couplingdisconnectback_sw:", &m_couplingdisconnectback },
|
||||
|
||||
};
|
||||
{
|
||||
auto lookup = autoboolgauges.find( Label );
|
||||
|
||||
6
Train.h
6
Train.h
@@ -290,6 +290,9 @@ class TTrain {
|
||||
static void OnCommand_batterytoggle( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_batteryenable( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_batterydisable( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_cabactivationtoggle(TTrain *Train, command_data const &Command);
|
||||
static void OnCommand_cabactivationenable(TTrain *Train, command_data const &Command);
|
||||
static void OnCommand_cabactivationdisable(TTrain *Train, command_data const &Command);
|
||||
static void OnCommand_pantographcompressorvalvetoggle( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_pantographcompressorvalveenable( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_pantographcompressorvalvedisable( TTrain *Train, command_data const &Command );
|
||||
@@ -424,6 +427,7 @@ class TTrain {
|
||||
static void OnCommand_nearestcarcoupleradapterattach( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_nearestcarcoupleradapterremove( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_occupiedcarcouplingdisconnect( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_occupiedcarcouplingdisconnectback( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_departureannounce( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_hornlowactivate( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_hornhighactivate( TTrain *Train, command_data const &Command );
|
||||
@@ -596,6 +600,7 @@ public: // reszta może by?publiczna
|
||||
TGauge ggBatteryButton; // Stele 161228 hebelek baterii
|
||||
TGauge ggBatteryOnButton;
|
||||
TGauge ggBatteryOffButton;
|
||||
TGauge ggCabActivationButton; // Stele 161228 hebelek baterii
|
||||
|
||||
// NBMX wrzesien 2003 - obsluga drzwi
|
||||
TGauge ggDoorLeftPermitButton;
|
||||
@@ -841,6 +846,7 @@ private:
|
||||
float m_doorpermittimers[2] = { -1.f, -1.f };
|
||||
// ld substitute
|
||||
bool m_couplingdisconnect { false };
|
||||
bool m_couplingdisconnectback { false };
|
||||
|
||||
public:
|
||||
float fPress[20][6]; // cisnienia dla wszystkich czlonow
|
||||
|
||||
@@ -161,6 +161,7 @@ commanddescription_sequence Commands_descriptions = {
|
||||
{ "nearestcarcoupleradapterattach", command_target::vehicle },
|
||||
{ "nearestcarcoupleradapterremove", command_target::vehicle },
|
||||
{ "occupiedcarcouplingdisconnect", command_target::vehicle },
|
||||
{ "occupiedcarcouplingdisconnectback", command_target::vehicle },
|
||||
{ "doortoggleleft", command_target::vehicle },
|
||||
{ "doortoggleright", command_target::vehicle },
|
||||
{ "doorpermitleft", command_target::vehicle },
|
||||
@@ -255,6 +256,9 @@ commanddescription_sequence Commands_descriptions = {
|
||||
{ "batterytoggle", command_target::vehicle },
|
||||
{ "batteryenable", command_target::vehicle },
|
||||
{ "batterydisable", command_target::vehicle },
|
||||
{ "cabactivationtoggle", command_target::vehicle },
|
||||
{ "cabactivationenable", command_target::vehicle },
|
||||
{ "cabactivationdisable", command_target::vehicle },
|
||||
{ "motorblowerstogglefront", command_target::vehicle },
|
||||
{ "motorblowerstogglerear", command_target::vehicle },
|
||||
{ "motorblowersdisableall", command_target::vehicle },
|
||||
|
||||
@@ -152,6 +152,7 @@ enum class user_command {
|
||||
nearestcarcoupleradapterattach,
|
||||
nearestcarcoupleradapterremove,
|
||||
occupiedcarcouplingdisconnect,
|
||||
occupiedcarcouplingdisconnectback,
|
||||
doortoggleleft,
|
||||
doortoggleright,
|
||||
doorpermitleft,
|
||||
@@ -246,6 +247,9 @@ enum class user_command {
|
||||
batterytoggle,
|
||||
batteryenable,
|
||||
batterydisable,
|
||||
cabactivationtoggle,
|
||||
cabactivationenable,
|
||||
cabactivationdisable,
|
||||
motorblowerstogglefront,
|
||||
motorblowerstogglerear,
|
||||
motorblowersdisableall,
|
||||
|
||||
@@ -255,6 +255,9 @@ driverkeyboard_input::default_bindings() {
|
||||
{ user_command::batterytoggle, GLFW_KEY_J },
|
||||
// batteryenable,
|
||||
// batterydisable,
|
||||
// cabactivationtoggle,
|
||||
// cabactivationenable,
|
||||
// cabactivationdisable,
|
||||
{ user_command::motorblowerstogglefront, GLFW_KEY_N | keymodifier::shift },
|
||||
{ user_command::motorblowerstogglerear, GLFW_KEY_M | keymodifier::shift },
|
||||
{ user_command::motorblowersdisableall, GLFW_KEY_M | keymodifier::control },
|
||||
|
||||
@@ -879,9 +879,15 @@ drivermouse_input::default_bindings() {
|
||||
{ "batteryoff_sw:", {
|
||||
user_command::batterydisable,
|
||||
user_command::none } },
|
||||
{ "cabactivation_sw:", {
|
||||
user_command::cabactivationtoggle,
|
||||
user_command::none } },
|
||||
{ "couplingdisconnect_sw:",{
|
||||
user_command::occupiedcarcouplingdisconnect,
|
||||
user_command::none } },
|
||||
{ "couplingdisconnectback_sw:",{
|
||||
user_command::occupiedcarcouplingdisconnectback,
|
||||
user_command::none } },
|
||||
{ "universal0:", {
|
||||
user_command::generictoggle0,
|
||||
user_command::none } },
|
||||
|
||||
Reference in New Issue
Block a user