added brake bias

This commit is contained in:
2026-03-13 17:36:15 +00:00
parent bbc62560f3
commit 93ecb1a11d
4 changed files with 75 additions and 42 deletions
+6
View File
@@ -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