Skip to content

Commit

Permalink
1. Fixed #211
Browse files Browse the repository at this point in the history
(SIMRacingApps/SIMRacingApps#211)
       Added a blue dot to the Trackmap to indicate where the merge
point is for the REFERENCE car.
       Implemented new API calls for version 1.12
       - Car/(CARIDENTIFIER)/MergePointLatitude
       - Car/(CARIDENTIFIER)/MergePointLongitude
       NOTE: I will be evaluating the location of all the merge points
to match the blue cone in iRacing.
             For now, they may be wrong or even non existent.
  • Loading branch information
jfgilliam committed Oct 20, 2019
1 parent 0c0a7ba commit b7ba5ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.xml
Expand Up @@ -2,8 +2,8 @@
<project basedir="." default="sra" name="SIMRacingApps-SIMPlugin-iRacing">
<property name="plugin.name" value="iRacing" />
<property name="build.major" value="1" />
<property name="build.minor" value="11" />
<property name="build.prefix" value="" />
<property name="build.minor" value="12" />
<property name="build.prefix" value="BETA-" />
<!--property name="build.prefix" value="BETA-" /-->
<tstamp>
<format property="build.time" pattern="yyyy.MM.dd.HH.mm.ss" />
Expand Down
12 changes: 6 additions & 6 deletions src/com/SIMRacingApps/SIMPlugins/iRacing/iRacingCar.java
Expand Up @@ -2989,12 +2989,6 @@ public boolean onDataVersionChange() {
}
}

//so if we just left the pits and we haven't reached the merge point
//yet iRacing says we're on the track, set the next status back to leaving pits.
//This will help the track map logic keep the car on the apron or access road longer.
//The merge point reference is our position when we left pit road. Tracks with multiple pit roads will have multiple merge points.
m_mergePoint = m_iRacingSIMPlugin.getSession().getTrack().getMergePoint(m_mergePointReference * 100.0) / 100.0;

//if (isME()) {
// if (m_prevStatus.equals(iRacingCar.Status.LEAVINGPITS)
// && (nextStatus.equals(iRacingCar.Status.ONTRACK) || nextStatus.equals(iRacingCar.Status.OFFTRACK))
Expand All @@ -3003,6 +2997,7 @@ public boolean onDataVersionChange() {
// m_mergePoint=m_mergePoint;
// }
//}
m_mergePoint = m_iRacingSIMPlugin.getSession().getTrack()._getMergePoint(m_mergePointReference * 100.0) / 100.0;

if (m_prevStatus.equals(iRacingCar.Status.LEAVINGPITS)
&& (nextStatus.equals(iRacingCar.Status.ONTRACK) || nextStatus.equals(iRacingCar.Status.OFFTRACK))
Expand All @@ -3022,6 +3017,11 @@ public boolean onDataVersionChange() {
) {
nextStatus.setState(iRacingCar.Status.LEAVINGPITS,m_sessionTime);
m_mergePointReference = m_lapCompletedPercent; //save our position of where we left the pits as the reference for determining the merge point
//so if we just left the pits and we haven't reached the merge point
//yet iRacing says we're on the track, set the next status back to leaving pits.
//This will help the track map logic keep the car on the apron or access road longer.
//The merge point reference is our position when we left pit road. Tracks with multiple pit roads will have multiple merge points.

}

//if the if the user is reseting pit box, then we have to wait until they are done before we can
Expand Down
4 changes: 2 additions & 2 deletions src/com/SIMRacingApps/SIMPlugins/iRacing/version.properties
@@ -1,8 +1,8 @@
#Sat, 01 Jan 2000 00:00:00 -0000

major=1
minor=11
build=2019.09.15
minor=12
build=BETA-2019.10.20
built-by=Jeffrey Gilliam
copyright=Copyright (C) 2019 Jeffrey Gilliam
license=Apache License, Version 2.0, January 2004

0 comments on commit b7ba5ce

Please sign in to comment.