mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
live departures for Frankfurt
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@137 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
03324ce2e3
commit
5f8c8db1e7
1 changed files with 4 additions and 3 deletions
|
@ -506,6 +506,7 @@ public class RmvProvider implements NetworkProvider
|
||||||
final Date plannedTime = parsed.getTime();
|
final Date plannedTime = parsed.getTime();
|
||||||
|
|
||||||
// predictedTime
|
// predictedTime
|
||||||
|
Date predictedTime = null;
|
||||||
if (mDepFine.group(4) != null)
|
if (mDepFine.group(4) != null)
|
||||||
{
|
{
|
||||||
parsed.setTime(ParserUtils.parseTime(mDepFine.group(4)));
|
parsed.setTime(ParserUtils.parseTime(mDepFine.group(4)));
|
||||||
|
@ -514,14 +515,14 @@ public class RmvProvider implements NetworkProvider
|
||||||
parsed.set(Calendar.DAY_OF_MONTH, current.get(Calendar.DAY_OF_MONTH));
|
parsed.set(Calendar.DAY_OF_MONTH, current.get(Calendar.DAY_OF_MONTH));
|
||||||
if (ParserUtils.timeDiff(parsed.getTime(), currentTime) < -PARSER_DAY_ROLLOVER_THRESHOLD_MS)
|
if (ParserUtils.timeDiff(parsed.getTime(), currentTime) < -PARSER_DAY_ROLLOVER_THRESHOLD_MS)
|
||||||
parsed.add(Calendar.DAY_OF_MONTH, 1);
|
parsed.add(Calendar.DAY_OF_MONTH, 1);
|
||||||
final Date predictedTime = parsed.getTime();
|
predictedTime = parsed.getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
// position
|
// position
|
||||||
final String position = ParserUtils.resolveEntities(mDepFine.group(5));
|
final String position = ParserUtils.resolveEntities(mDepFine.group(5));
|
||||||
|
|
||||||
final Departure dep = new Departure(plannedTime, line, line != null ? LINES.get(line.charAt(0)) : null, position, 0,
|
final Departure dep = new Departure(plannedTime, predictedTime, line, line != null ? LINES.get(line.charAt(0)) : null,
|
||||||
destination);
|
position, 0, destination);
|
||||||
|
|
||||||
if (!departures.contains(dep))
|
if (!departures.contains(dep))
|
||||||
departures.add(dep);
|
departures.add(dep);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue