Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion transitclock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
<dependency>
<groupId>com.simontuffs</groupId>
<artifactId>one-jar-boot</artifactId>
<version>0.97.3</version>
<version>0.97</version>
<scope>system</scope>
<systemPath>/usr/local/transitclock/bin/one-jar-boot-0.97.jar</systemPath>
</dependency>

<!-- Database related, including c3p0 production quality connector. Note:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ public String toString() {

// Add early/ontime/late info
if (temporalDifferenceMsec > 0)
str += " (early)";
str += " (wcześniej)";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this result in a Polish only string appearing somewhere?

else if (temporalDifferenceMsec == 0)
str += " (ontime)";
str += " (na czas)";
else
str += " (late)";
str += " (później)";

// Return the results
return str;
Expand Down
12 changes: 12 additions & 0 deletions transitclock/src/main/java/org/transitclock/core/VehicleState.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
public class VehicleState {

private final String vehicleId;
private String vehicleName;
private Block block;
private BlockAssignmentMethod assignmentMethod;
// Will be set to block ID (even if used trip to determine assignment) or route ID
Expand Down Expand Up @@ -132,6 +133,11 @@ public void incrementTripCounter() {
public VehicleState(String vehicleId) {
this.vehicleId = vehicleId;
}

public VehicleState(String vehicleId, String vehicleName) {
this.vehicleId = vehicleId;
this.vehicleName = vehicleName;
}

/**
* Sets the block assignment for vehicle. Also, this is how it is specified
Expand Down Expand Up @@ -747,6 +753,10 @@ public Date getAssignmentTime() {
public String getVehicleId() {
return vehicleId;
}

public String getVehicleName() {
return vehicleId;
}

public boolean isPredictable() {
return predictable;
Expand Down Expand Up @@ -956,6 +966,7 @@ public float getHeading() {
public String toString() {
return "VehicleState ["
+ "vehicleId=" + vehicleId
+ "vehicleName=" + vehicleName
+ ", blockId=" + (block==null? null : block.getId())
+ ", assignmentId=" + assignmentId
+ ", assignmentMethod=" + assignmentMethod
Expand All @@ -976,6 +987,7 @@ public String toString() {
public String toStringVerbose() {
return "VehicleState ["
+ "vehicleId=" + vehicleId
+ "vehicleName=" + vehicleName
+ ", blockId=" + (block==null? null : block.getId())
+ ", assignmentId=" + assignmentId
+ ", assignmentMethod=" + assignmentMethod
Expand Down
Loading