Fix clearing tram info for unknown vehicles in schedule table
| | |
| | | |
| | | // Webservice-related functions |
| | | function parseVehicle(vehicleId) { |
| | | if(!vehicleId) return; |
| | | if(!vehicleId) return false; |
| | | if(vehicleId.substr(0, 15) != '635218529567218') { |
| | | console.log('Unknown vehicle, vehicleId=' + vehicleId); |
| | | return; |
| | | return false; |
| | | } |
| | | |
| | | var id = parseInt(vehicleId.substr(15)) - 736; |
| | |
| | | low = 1; |
| | | } else { |
| | | console.log('Unknown vehicle, vehicleId=' + vehicleId + ', id=' + id); |
| | | return; |
| | | return false; |
| | | } |
| | | |
| | | return { |
| | |
| | | var route_line = document.getElementById('route-line'); |
| | | var route_table = document.getElementById('route-table'); |
| | | var route_vehicle = document.getElementById('route-vehicle'); |
| | | var route_vehicle_info; |
| | | |
| | | var refresh_button = document.getElementById('refresh'); |
| | | var refresh_text = document.getElementById('refresh-text'); |
| | |
| | | if(!tripId) tripId = route_id; |
| | | if(!tripId) return; |
| | | |
| | | if(!vehicleInfo) vehicleInfo = route_vehicle_info; |
| | | if(vehicleInfo === undefined) vehicleInfo = route_vehicle_info; |
| | | |
| | | console.log('loadRoute(' + tripId + ')'); |
| | | route_id = tripId; |