-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simulator updates with further ports
- Loading branch information
jakobaxelsson
committed
Jan 16, 2015
1 parent
c829590
commit b467dc2
Showing
9 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>moped</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
</natures> | ||
</projectDescription> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
simulator/src/main/java/fresta/port/instances/VirtualAcceleratorRPort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package fresta.port.instances; | ||
|
||
import gui.CarModel; | ||
import sics.port.EcuVirtualRPort; | ||
|
||
public class VirtualAcceleratorRPort extends EcuVirtualRPort { | ||
|
||
public VirtualAcceleratorRPort(int id) { | ||
super(id); | ||
} | ||
|
||
@Override | ||
public void deliver(Object data) { | ||
CarModel.motorPower = ((int) data) / 100.0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
simulator/src/main/java/fresta/port/instances/VirtualSteeringRPort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package fresta.port.instances; | ||
|
||
import gui.CarModel; | ||
import sics.port.EcuVirtualRPort; | ||
|
||
public class VirtualSteeringRPort extends EcuVirtualRPort { | ||
|
||
public VirtualSteeringRPort(int id) { | ||
super(id); | ||
} | ||
|
||
@Override | ||
public void deliver(Object data) { | ||
CarModel.steeringAngle = ((int) data) / 100.0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#Generated by Maven | ||
#Fri Jan 16 12:00:41 CET 2015 | ||
#Fri Jan 16 15:33:42 CET 2015 | ||
version=1.0 | ||
groupId=se.sics.sse.fresta | ||
artifactId=simulator |