-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Understanding the code #120
Comments
Hey, if you didn't modify the shared memory mapped created by the plugin, the offset for the speed is somewhat over 700 and the truck position even has a much higher offset in the memory. If I read your code correctly, you take the first bytes from it. But there is other data located. The data starts with In To direct fetch specific values, you would need to create/calculate the offset to the specific value first. It is not that difficult, but currently there is no available table for that. |
Thanks for the fast reply so something like this then? The data seems to make much better sense now, its just finding the right offset. Current truck speed: 3 m/s (6.7108197 mph) Truck cabin position: X=0, Y=0.9946883, Z=-1.8208612 using System; namespace ATS_API
} |
I want to make sure I am heading down the right path for getting the data from the memory mapped file. This is the code I have so far but it always returns crap data of (Current truck speed: 1E-45 m/s (3E-45 mph) Truck position: X=1E-45, Y=5.7172556E-31, Z=0)
using System;
using System.IO.MemoryMappedFiles;
using System.Runtime.InteropServices;
using System.Threading;
namespace ATS_API
{
class Program
{
static void Main()
{
var telemetryHandler = new TelemetryHandler("Local\SCSTelemetry");
telemetryHandler.Start();
}
}
}
The text was updated successfully, but these errors were encountered: