added brake bias
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"log"
|
||||
"log/slog"
|
||||
"os"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -176,6 +177,11 @@ func (i *IRacing) Subscribe(requestFields map[int16]telem.FieldID) {
|
||||
out.Type = telem.DataTypeUINT16
|
||||
out.Raw = uint64(uint16(v.(float32)))
|
||||
}
|
||||
case telem.BrakeBias:
|
||||
binding.Transform = func(v any, out *telem.TelemetryField) {
|
||||
out.Type = telem.DataTypeSTRING
|
||||
out.Str = strconv.FormatFloat(float64(v.(float32)), 'f', 1, 32)
|
||||
}
|
||||
case telem.Empty:
|
||||
binding.Transform = func(v any, out *telem.TelemetryField) {
|
||||
out.Type = telem.DataTypeCHAR
|
||||
|
||||
Reference in New Issue
Block a user