mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
parse fn signatures: bugfixes 🐛
This commit is contained in:
parent
b6fbaa5825
commit
4c86b625c7
2 changed files with 3 additions and 3 deletions
|
@ -6,14 +6,14 @@
|
|||
// todo: d.stbStop.dProgType
|
||||
// todo: d.freq, d.freq.jnyL, see https://github.com/public-transport/hafas-client/blob/9203ed1481f08baacca41ac5e3c19bf022f01b0b/parse.js#L115
|
||||
|
||||
const createParseDeparture = (profile, opt, {stations, lines, remarks}) => {
|
||||
const createParseDeparture = (profile, opt, {locations, lines, remarks}) => {
|
||||
const findRemark = rm => remarks[parseInt(rm.remX)] || null
|
||||
|
||||
const parseDeparture = (d) => {
|
||||
const when = profile.parseDateTime(profile, d.date, d.stbStop.dTimeR || d.stbStop.dTimeS)
|
||||
const res = {
|
||||
journeyId: d.jid,
|
||||
station: stations[parseInt(d.stbStop.locX)] || null,
|
||||
station: locations[parseInt(d.stbStop.locX)] || null,
|
||||
when: when.toISO(),
|
||||
direction: profile.parseStationName(d.dirTxt),
|
||||
line: lines[parseInt(d.prodX)] || null,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const createParseMovement = (profile, data) => {
|
||||
const createParseMovement = (profile, opt, data) => {
|
||||
const {locations, lines, remarks, polylines} = data
|
||||
|
||||
// todo: what is m.dirGeo? maybe the speed?
|
||||
|
|
Loading…
Add table
Reference in a new issue