mirror of
https://github.com/cjdenio/uta-trax-api.git
synced 2026-10-03 16:06:19 +00:00
mvx stuff
This commit is contained in:
2 files changed
+8
-12
No files matched your search
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
/gtfs/
|
/gtfs/
|
||||||
/gtfs.zip
|
/gtfs.zip
|
||||||
|
/pretend-feed.bin
|
||||||
+6
-11
@@ -163,6 +163,11 @@ func feedifyVehicles(vehicles []*pb.VehiclePosition, header *pb.FeedHeader, rout
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// force MVX to match other BRT services
|
||||||
|
if route_id == "87711" {
|
||||||
|
route_color = sql.NullString{Valid: true, String: "1191d0"}
|
||||||
|
}
|
||||||
|
|
||||||
rows.Close()
|
rows.Close()
|
||||||
|
|
||||||
if routeTypes != nil && !routeTypes[int(route_type)] {
|
if routeTypes != nil && !routeTypes[int(route_type)] {
|
||||||
@@ -206,16 +211,6 @@ func main() {
|
|||||||
|
|
||||||
scheduleDb = _db
|
scheduleDb = _db
|
||||||
|
|
||||||
// vehicles, err := getVehicles()
|
|
||||||
// if err != nil {
|
|
||||||
// log.Fatalln(err)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// for _, v := range vehicles {
|
|
||||||
// station := getStationForVehicle(v)
|
|
||||||
// fmt.Println(station)
|
|
||||||
// }
|
|
||||||
|
|
||||||
http.Handle("/", http.FileServer(http.Dir("./static")))
|
http.Handle("/", http.FileServer(http.Dir("./static")))
|
||||||
|
|
||||||
http.HandleFunc("/schema.proto", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/schema.proto", func(w http.ResponseWriter, r *http.Request) {
|
||||||
@@ -235,7 +230,7 @@ func main() {
|
|||||||
|
|
||||||
if routeTypes != "" {
|
if routeTypes != "" {
|
||||||
routeTypeFilter = make(map[int]bool)
|
routeTypeFilter = make(map[int]bool)
|
||||||
for _, t := range strings.Split(routeTypes, ",") {
|
for t := range strings.SplitSeq(routeTypes, ",") {
|
||||||
routeTypeNumber, err := strconv.Atoi(t)
|
routeTypeNumber, err := strconv.Atoi(t)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
routeTypeFilter[routeTypeNumber] = true
|
routeTypeFilter[routeTypeNumber] = true
|
||||||
|
|||||||
Reference in new issue
Block a user