Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Camera Change Widgit not functional #75
I also tried moving the logging up to FINEST, but there were no additional messages printed at the time.
EDIT: Actually, I have a correction to this now. It isn't that the widget isn't working at all, it's that it isn't working correctly. I did additional testing and did a screen capture of what I was seeing.
Based on the log messages and what the screen recording is showing, it appears the code is confusing Car Number (the number on the car and on the app) with the car's actual sim-based ID. From the attached video, for example, I click to change to Car Number 13, but it instead switches me to Car Number 26. It does this for a few other examples as well, which are included in the video. There are also several cases where attempting to switch to a higher numbered car simply does not do anything.
My guess is that the code has essentially transposed CarxID with Car Number in the camera code. The Reference Car updates correctly when using Broadcaster,Spotter-CAMERA, for example.
Thanks I will test when I get home. in the meantime can you tell me if you can change the camera manually in the session that you're in
Thanks for the video, that helped a lot. I have been able to confirm what you say. All my testing has been done as a spectator in official sessions where the car number and the car index is the same. I got into a practice session and I saw the problem. The camera code wants the car number, not the car index (which is what I was using). I tested that it can work by changing the code to the car number, but I know there's a trick to get it to work with numbers that have a leading zero. The iRacing API wants the car number as an integer. Tomorrow I will search the forum for the math to distinguish between 1, 01, 001.
Thanks again for your help.