Skip to content

Commit

Permalink
- added enums: PitSvStatus, PaceMode, PaceFlags
Browse files Browse the repository at this point in the history
- vars.txt updated
  • Loading branch information
kutu committed May 7, 2020
1 parent fbce856 commit c681379
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
27 changes: 26 additions & 1 deletion irsdk.py
Expand Up @@ -15,7 +15,7 @@
except ImportError:
from yaml import SafeLoader as YamlSafeLoader

VERSION = '1.2.5'
VERSION = '1.2.6'

SIM_STATUS_URL = 'http://127.0.0.1:32034/get_sim_status?object=simStatus'

Expand Down Expand Up @@ -209,6 +209,31 @@ class PitSvFlags:
windshield_tearoff = 0x20
fast_repair = 0x40

class PitSvStatus:
# status
none = 0
in_progress = 1
complete = 2
# errors
too_far_left = 100
too_far_right = 101
too_far_forward = 102
too_far_back = 103
bad_angle = 104
cant_fix_that = 105

class PaceMode:
single_file_start = 0
double_file_start = 1
single_file_restart = 2
double_file_restart = 3
not_pacing = 4

class PaceFlags:
end_of_line = 0x01
free_pass = 0x02
waved_around = 0x04

class CarLeftRight:
clear = 1 # no cars around us.
car_left = 2 # there is a car to our left.
Expand Down
4 changes: 4 additions & 0 deletions vars.txt
Expand Up @@ -20,6 +20,9 @@ CarIdxLastLapTime Cars last lap time, s
CarIdxOnPitRoad On pit road between the cones by car index,
CarIdxP2P_Count Push2Pass count of usage (or remaining in Race),
CarIdxP2P_Status Push2Pass active or not,
CarIdxPaceFlags Pacing status flags for each car, irsdk_PaceFlags
CarIdxPaceLine What line cars are pacing in or -1 if not pacing,
CarIdxPaceRow What row cars are pacing in or -1 if not pacing,
CarIdxPosition Cars position in race by car index,
CarIdxRPM Engine rpm by car index, revs/min
CarIdxSteer Steering wheel angle by car index, rad
Expand Down Expand Up @@ -127,6 +130,7 @@ OilPress Engine oil pressure, bar
OilTemp Engine oil temperature, C
OkToReloadTextures True if it is ok to reload car textures at this time,
OnPitRoad Is the player car on pit road between the cones,
PaceMode Are we pacing or not, irsdk_PaceMode
Pitch Pitch orientation, rad
PitchRate Pitch rate, rad/s
PitchRate_ST Pitch rate at 360 Hz, rad/s
Expand Down

0 comments on commit c681379

Please sign in to comment.