mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 22:59:19 +02:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
15
Train.h
15
Train.h
@@ -17,6 +17,8 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "PyInt.h"
|
||||
#include "command.h"
|
||||
|
||||
#undef snprintf // pyint.h->python
|
||||
|
||||
// typedef enum {st_Off, st_Starting, st_On, st_ShuttingDown} T4State;
|
||||
|
||||
const int maxcab = 2;
|
||||
@@ -32,7 +34,7 @@ class TCab {
|
||||
public:
|
||||
// methods
|
||||
void Load(cParser &Parser);
|
||||
void Update();
|
||||
void Update( bool const Power );
|
||||
TGauge &Gauge( int n = -1 ); // pobranie adresu obiektu
|
||||
TButton &Button( int n = -1 ); // pobranie adresu obiektu
|
||||
// members
|
||||
@@ -51,7 +53,7 @@ public:
|
||||
|
||||
private:
|
||||
// members
|
||||
std::vector<TGauge> ggList;
|
||||
std::deque<TGauge> ggList; // need a container which doesn't invalidate references
|
||||
std::vector<TButton> btList;
|
||||
};
|
||||
|
||||
@@ -156,6 +158,7 @@ class TTrain
|
||||
// TBD, TODO: consider this approach if we ever want to have customized consist behaviour to received commands, based on the consist/vehicle type or whatever
|
||||
static void OnCommand_aidriverenable( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_aidriverdisable( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_jointcontrollerset( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_mastercontrollerincrease( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_mastercontrollerincreasefast( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_mastercontrollerdecrease( TTrain *Train, command_data const &Command );
|
||||
@@ -167,6 +170,7 @@ class TTrain
|
||||
static void OnCommand_secondcontrollerdecreasefast( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_secondcontrollerset( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_notchingrelaytoggle( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_tempomattoggle( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_mucurrentindicatorothersourceactivate( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_independentbrakeincrease( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_independentbrakeincreasefast( TTrain *Train, command_data const &Command );
|
||||
@@ -263,6 +267,7 @@ class TTrain
|
||||
static void OnCommand_motorblowersenablerear( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_motorblowersdisablerear( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_motorblowersdisableall( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_coolingfanstoggle( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_motorconnectorsopen( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_motorconnectorsclose( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_motordisconnect( TTrain *Train, command_data const &Command );
|
||||
@@ -324,6 +329,7 @@ class TTrain
|
||||
static void OnCommand_doorcloseright( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_dooropenall( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_doorcloseall( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_doorsteptoggle( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_carcouplingincrease( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_carcouplingdisconnect( TTrain *Train, command_data const &Command );
|
||||
static void OnCommand_departureannounce( TTrain *Train, command_data const &Command );
|
||||
@@ -372,10 +378,11 @@ public: // reszta może by?publiczna
|
||||
TGauge ggWater1TempB;
|
||||
|
||||
// McZapkie: definicje regulatorow
|
||||
TGauge ggJointCtrl;
|
||||
TGauge ggMainCtrl;
|
||||
TGauge ggMainCtrlAct;
|
||||
TGauge ggScndCtrl;
|
||||
TGauge ggScndCtrlButton; // NOTE: not used?
|
||||
TGauge ggScndCtrlButton;
|
||||
TGauge ggDirKey;
|
||||
TGauge ggBrakeCtrl;
|
||||
TGauge ggLocalBrake;
|
||||
@@ -641,7 +648,7 @@ private:
|
||||
float fHCurrent[ 4 ] = { 0.0f, 0.0f, 0.0f, 0.0f }; // pr?dy: suma i amperomierze 1,2,3
|
||||
float fEngine[ 4 ] = { 0.0f, 0.0f, 0.0f, 0.0f }; // obroty te? trzeba pobra?
|
||||
int iCarNo, iPowerNo, iUnitNo; // liczba pojazdow, czlonow napednych i jednostek spiętych ze sobą
|
||||
bool bDoors[20][3]; // drzwi dla wszystkich czlonow
|
||||
bool bDoors[20][5]; // drzwi dla wszystkich czlonow; left+right, left, right, step_left, step_right
|
||||
int iUnits[20]; // numer jednostki
|
||||
int iDoorNo[20]; // liczba drzwi
|
||||
char cCode[20]; // kod pojazdu
|
||||
|
||||
Reference in New Issue
Block a user