Not much here
This commit is contained in:
+12
-5
@@ -14,7 +14,7 @@ func TestFunctionality(t *testing.T) {
|
||||
t.Fatal("Was unable to prepare telemetry file for testing.")
|
||||
}
|
||||
|
||||
i, err := Init(input, "", "")
|
||||
i, _ := Init(input, "", "")
|
||||
defer i.Close()
|
||||
|
||||
// Set up a loop to iterate our data
|
||||
@@ -32,14 +32,21 @@ func TestFunctionality(t *testing.T) {
|
||||
// Vehicle Movement data gathered from the names we can find on the
|
||||
// telemetry_docs.pdf file
|
||||
// - I wish to make this less verbose if possible
|
||||
if _, ok := i.Vars.Vars["Gear"]; !ok {
|
||||
log.Fatal("Field `Gear` doesn't exist")
|
||||
if _, ok := i.Vars.Vars["CarIdxPosition"]; !ok {
|
||||
log.Fatal("Field `CarIdxPosition` doesn't exist")
|
||||
}
|
||||
driversPositions := i.Vars.Vars["CarIdxPosition"].Value.([]int)
|
||||
|
||||
gear := int32(i.Vars.Vars["Gear"].Value.(int))
|
||||
drivers := i.SessionInfo.DriverInfo.Drivers
|
||||
|
||||
fmt.Printf("\033[?25l\033[2J\033[H")
|
||||
fmt.Printf("Gear: %d\n", gear)
|
||||
for k := range len(drivers) {
|
||||
if drivers[k].CarIsPaceCar == 1 || drivers[k].IsSpectator == 1 {
|
||||
continue
|
||||
}
|
||||
|
||||
fmt.Printf("[%d] [%d] %s\n", k, driversPositions[drivers[k].CarIdx], drivers[k].UserName)
|
||||
}
|
||||
|
||||
<-mainLoopTicker.C
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user