|
11 | 11 | # create a random distance round track
|
12 | 12 | DISTANCE_ROUND_TRACK=$(shuf -i 0-10000 -n 1)
|
13 | 13 |
|
14 |
| -TOPIC="/crewchief/durandom/1669233999/iRacing/sebring international/Ferrari 488 GT3 Evo 2021/Race" |
| 14 | +TOPIC="crewchief/durandom/1669233999/iRacing/sebring international/Ferrari 488 GT3 Evo 2021/Race" |
15 | 15 | T='{"CarModel": "Ferrari 488 GT3 Evo 2020", "GameName": "iRacing", "SessionId": "1669233672", "SessionTypeName": "Race", "TrackCode": "sebring international", "Brake": 0.0, "Clutch": 1.0, "CurrentLap": 1.0, "CurrentLapTime": 0.0, "DistanceRoundTrack": 5564.84961, "Gear": 3.0, "Handbrake": 0.0, "Rpms": 0.0, "SpeedMs": 46.2075653, "SteeringAngle": -0.232568219, "Throttle": 0.995530248}'
|
16 | 16 |
|
17 |
| -TOPIC="crewchief/goern/1689266594/Automobilista 2/Taruma:Taruma_Internacional/Formula Vee/Qualify" |
18 |
| -T='{"time": '$TIMESTAMP', "telemetry": {"Clutch":0.0,"Brake":1.0,"Throttle":0.0,"Handbrake":0.0,"SteeringAngle":-0.0103,"Rpms":0.0,"Gear":0,"SpeedMs":0.0,"DistanceRoundTrack":'$DISTANCE_ROUND_TRACK',"WorldPosition_x":37.7886124,"WorldPosition_y":1.904185,"WorldPosition_z":-204.916718,"CurrentLap":1,"CurrentLapTime":-3.0,"LapTimePrevious":-1.0,"CurrentLapIsValid":false,"PreviousLapWasValid":true,"CarClass":"F_VEE"}}' |
| 17 | +# TOPIC="crewchief/goern/1689266594/Automobilista 2/Taruma:Taruma_Internacional/Formula Vee/Qualify" |
| 18 | +# T='{"time": '$TIMESTAMP', "telemetry": {"Clutch":0.0,"Brake":1.0,"Throttle":0.0,"Handbrake":0.0,"SteeringAngle":-0.0103,"Rpms":0.0,"Gear":0,"SpeedMs":0.0,"DistanceRoundTrack":'$DISTANCE_ROUND_TRACK',"WorldPosition_x":37.7886124,"WorldPosition_y":1.904185,"WorldPosition_z":-204.916718,"CurrentLap":1,"CurrentLapTime":-3.0,"LapTimePrevious":-1.0,"CurrentLapIsValid":false,"PreviousLapWasValid":true,"CarClass":"F_VEE"}}' |
19 | 19 |
|
20 | 20 | # TOPIC="replay/crewchief/durandom/1689266594/Richard Burns Rally/Sardian Night/Renault Clio 16S Williams GrpA/Race"
|
21 | 21 | # T='{"time": '$TIMESTAMP', "telemetry": {"Clutch":0.0,"Brake":1.0,"Throttle":0.0,"Handbrake":0.0,"SteeringAngle":-0.0103,"Rpms":0.0,"Gear":0,"SpeedMs":0.0,"DistanceRoundTrack":'$DISTANCE_ROUND_TRACK',"WorldPosition_x":37.7886124,"WorldPosition_y":1.904185,"WorldPosition_z":-204.916718,"CurrentLap":1,"CurrentLapTime":-3.0,"LapTimePrevious":-1.0,"CurrentLapIsValid":false,"PreviousLapWasValid":true,"CarClass":"F_VEE"}}'
|
|
42 | 42 | TLS_CERT_OPTS=""
|
43 | 43 | fi
|
44 | 44 |
|
45 |
| -mosquitto_pub -u crewchief -P crewchief \ |
| 45 | +USERNAME=crewchief |
| 46 | +PASSWORD=crewchief |
| 47 | +mosquitto_pub -u $USERNAME -P $PASSWORD \ |
46 | 48 | -t "$TOPIC" \
|
47 | 49 | -p $MQTT_PORT -h $MQTT_HOST $TLS_CERT_OPTS \
|
48 | 50 | -i $CLIENT_ID -d \
|
|
0 commit comments