Skip to content

Commit

Permalink
Fix HFP trains
Browse files Browse the repository at this point in the history
  • Loading branch information
Teemu Peltonen committed Feb 1, 2018
1 parent 68d9057 commit c0068da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/action/realTimeClientAction.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import moment from 'moment';

const modeTranslate = {
train: 'rail',
};

// getTopic
// Returns MQTT topic to be subscribed
// Input: options - route, direction, tripStartTime are used to generate the topic
Expand Down Expand Up @@ -50,7 +54,7 @@ function parseMessage(topic, message, actionContext) {
parsedMessage.oday && parsedMessage.oday !== 'XXX'
? parsedMessage.oday
: moment().format('YYYYMMDD'),
mode,
mode: modeTranslate[mode] ? modeTranslate[mode] : mode,
delay: parsedMessage.dl,
next_stop: nextStop,
stop_index: parsedMessage.stop_index,
Expand Down

0 comments on commit c0068da

Please sign in to comment.