Skip to content

Commit

Permalink
Merge pull request #12 from julianrojas87/dev
Browse files Browse the repository at this point in the history
Adjust quiet route checking
  • Loading branch information
julianrojas87 authored Nov 25, 2020
2 parents fb62245 + 10fc272 commit 12c5e39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/RoutesInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class RoutesInfo extends Component {


formatValues = values => {
if (values) {
if (values || values === false) {
const res = [];
if (Array.isArray(values)) {
for (const v of values) {
Expand Down
5 changes: 3 additions & 2 deletions src/utils/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,13 @@ function checkCompatibility(t, vehicle, store, includesVehicle) {
}

// Noise restrictions
const nrs = track[ERA.isQuiteRoute] && vehicle[ERA.operationalRestriction] === 'http://era.europa.eu/concepts/restrictions#2.2.7';
const nrs = track['http://era.europa.eu/ns#isQuietRoute'] === 'true'
&& vehicle[ERA.operationalRestriction] !== 'http://era.europa.eu/concepts/restrictions#2.7.7';
report[ERA.operationalRestriction] = {
predicates: [ERA.operationalRestriction, ERA.isQuiteRoute],
compatible: nrs,
values: {
track: track[ERA.isQuiteRoute],
track: track['http://era.europa.eu/ns#isQuietRoute'],
vehicle: vehicle[ERA.operationalRestriction]
}
}
Expand Down

0 comments on commit 12c5e39

Please sign in to comment.