mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 22:09:19 +02:00
build 170708. cursor-based item picking, mouse support for cab controls, rudimentary render modes support in renderer
This commit is contained in:
@@ -814,9 +814,11 @@ void TMoverParameters::UpdateBatteryVoltage(double dt)
|
||||
sn3 = 0.0,
|
||||
sn4 = 0.0,
|
||||
sn5 = 0.0; // Ra: zrobić z tego amperomierz NN
|
||||
if ((BatteryVoltage > 0) && (EngineType != DieselEngine) && (EngineType != WheelsDriven) &&
|
||||
(NominalBatteryVoltage > 0))
|
||||
{
|
||||
if( ( BatteryVoltage > 0 )
|
||||
&& ( EngineType != DieselEngine )
|
||||
&& ( EngineType != WheelsDriven )
|
||||
&& ( NominalBatteryVoltage > 0 ) ) {
|
||||
|
||||
if ((NominalBatteryVoltage / BatteryVoltage < 1.22) && Battery)
|
||||
{ // 110V
|
||||
if (!ConverterFlag)
|
||||
@@ -884,10 +886,10 @@ void TMoverParameters::UpdateBatteryVoltage(double dt)
|
||||
if (BatteryVoltage < 0.01)
|
||||
BatteryVoltage = 0.01;
|
||||
}
|
||||
else if (NominalBatteryVoltage == 0)
|
||||
BatteryVoltage = 0;
|
||||
else
|
||||
BatteryVoltage = 90;
|
||||
else {
|
||||
// TODO: check and implement proper way to handle this for diesel engines
|
||||
BatteryVoltage = NominalBatteryVoltage;
|
||||
}
|
||||
};
|
||||
|
||||
/* Ukrotnienie EN57:
|
||||
|
||||
@@ -121,11 +121,16 @@ std::string to_string(double _Val, int precision);
|
||||
std::string to_string(double _Val, int precision, int width);
|
||||
std::string to_hex_str( int const _Val, int const width = 4 );
|
||||
|
||||
inline std::string to_string(bool _Val)
|
||||
{
|
||||
inline std::string to_string(bool _Val) {
|
||||
|
||||
return _Val == true ? "true" : "false";
|
||||
}
|
||||
|
||||
template <typename Type_, glm::precision Precision_ = glm::defaultp>
|
||||
std::string to_string( glm::tvec3<Type_, Precision_> const &Value ) {
|
||||
return to_string( Value.x, 2 ) + ", " + to_string( Value.y, 2 ) + ", " + to_string( Value.z, 2 );
|
||||
}
|
||||
|
||||
int stol_def(const std::string & str, const int & DefaultValue);
|
||||
|
||||
std::string ToLower(std::string const &text);
|
||||
|
||||
Reference in New Issue
Block a user