update the iracing provider to be on the same page as the BeamNG one

Deprecated the Fetch and Transform methods
This commit is contained in:
2026-09-10 15:11:37 +01:00
parent 3493a73a82
commit 0006b649f3
6 changed files with 231 additions and 170 deletions
+25 -2
View File
@@ -1,16 +1,39 @@
package iracing
import "github.com/ESilva15/goirsdk"
import (
"github.com/ESilva15/goirsdk"
)
func IsRunning() bool {
sdk, err := goirsdk.Init(goirsdk.Options{
SourceType: goirsdk.SharedMemoryFile,
})
defer sdk.Close()
if err != nil {
return false
}
sdk.Close()
// if sdk.SessionStateInvalid() {
// slog.Debug("state is invalid")
// sessionState, ok := sdk.Vars.Vars["SessionState"]
// if !ok {
// slog.Debug("SessionState not ok")
// return false
// }
//
// state, ok := sessionState.Value.(int)
// if !ok {
// slog.Debug(fmt.Sprintf("can't typecast: %+v", sessionState))
// return false
// }
//
// slog.Debug(fmt.Sprintf("%d", state))
// return false
// }
return true
}
func (i *IRacing) Stalled() bool {
return i.Stalled()
}