Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 99804712 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

CopyFrom: Removed field which are set manually.

parent eb84a27a
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.DataBus;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.Models.SimulationComponent.Strategies;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Utils;
......@@ -50,7 +51,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected internal readonly IShiftStrategy _strategy;
protected internal readonly TorqueConverter TorqueConverter;
private IIdleController _idleController;
protected internal bool RequestAfterGearshift;
internal WattSecond _powershiftLossEnergy;
protected internal KilogramSquareMeter EngineInertia;
......@@ -595,21 +595,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (other is ATGearbox g) {
PreviousState = g.PreviousState.Clone();
_powershiftLossEnergy = g._powershiftLossEnergy;
EngineInertia = g.EngineInertia;
Disengaged = g.Disengaged;
SwitchToNeutral = g.SwitchToNeutral;
RequestAfterGearshift = g.RequestAfterGearshift;
LastShift = g.LastShift;
return true;
}
if (other is GearshiftPosition p) {
Gear = p;
DisengageGearbox = !p.Engaged;
Disengaged = !p.Engaged;
return true;
}
return false;
}
......
......@@ -9,6 +9,7 @@ using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Strategies;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Utils;
......@@ -582,8 +583,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public bool UpdateFrom(object other) {
if (other is ElectricMotor e && Position == e.Position) {
PreviousState = e.PreviousState.Clone();
ElectricPower = e.ElectricPower;
ThermalBuffer = e.ThermalBuffer;
DeRatingActive = e.DeRatingActive;
return true;
......
......@@ -571,30 +571,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public bool UpdateFrom(object other) {
if (other is Gearbox g) {
PreviousState = g.PreviousState.Clone();
Disengaged = g.Disengaged;
DisengageGearbox = g.DisengageGearbox;
_nextGear = g.NextGear;
if (DataBus.VehicleInfo.VehicleStopped) {
Gear = _nextGear;
} else {
Gear = g.Gear;
}
return true;
}
if (other is GearshiftPosition p) {
_nextGear = p;
DisengageGearbox = !p.Engaged;
Disengaged = !p.Engaged;
return true;
}
if (other is GearboxState s) {
PreviousState = s.Clone();
}
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment