Is there a bug in the Telemetry Internal Plugins event?

Discussion in 'Plugins' started by B1K3R, Apr 6, 2013.

  1. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    I have noticed that at times, I get a Telemetry object for the same car with a different mID in the same session.

    As you can see in the image, the last three records refer to the same car, but the mID is different! Actually, it's similar, just with an added integer at the end.

    Has anyone came across this issue?

    Cheers

    View attachment 7144
     
  2. 64r

    64r Registered

    Joined:
    Jan 16, 2012
    Messages:
    191
    Likes Received:
    35
    Hi,

    Can you provide more details, looking at the attachement I do not understand the problem. The last 3 rows look like different cars to me?
     
  3. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    That's the issue....the last 3 rows are not different cars, they are in fact the same cars. There were 16 cars in the session and those last 3 make it 19.

    So 75 and 755 are same car, like 81 and 8181, 83 and 833, which means these are duplicate (I'm 100%). The mID came from the plugin with different value for the same car.

    I will investigate more on this.

    Cheers
     
  4. 64r

    64r Registered

    Joined:
    Jan 16, 2012
    Messages:
    191
    Likes Received:
    35
    Ok, I now understand the issue but I do not see the same problem.

    Here's a VS screenshot below that I get from the plugin.

    I suspect (but hate to point the finger) that the issue could be in your code. It looks like you are doing some data combining from the VehicleScoringInfoV01 and the TelemInfoV01 data structs to build the results tables, I suspect that this is where the issue is. If you'd like I'm happy to look over the code to try to help?

    View attachment 7155
     
  5. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Thanks 64r. Yeah, I found it to be very weird those values. And it only happens once during multiple sessions. Tried to find the bug but could not find it as it happens rarely.

    I'll put some debug logs and see if I can find the error. :)

    Thanks!
     
  6. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,388
    Likes Received:
    6,602
    Like 64r I think the error is in your code. Your table looks like it should be scoring data but contains telemetry values... hard to know what you're doing and where it might be going wrong.

    You said there are 16 cars, and in your table the top 13 rows all have pretty much the same mElapsedTime. The last 3 are much older (is this the whole table?). But obviously on any given update there is only 1 value for 'elapsed time', and mElapsedTime is a telemetry value (not scoring), so something weird is going on there.

    Where did 'ID' come from?
     
  7. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Hi Lazza,

    Yeah, that's the telemetry table. It must be a bug in my code, will have to dig deeper. The last 3 are old because they were inserted once and not updated again since the mID was not in memory (coming from plugin). I think I did not show all 16 records sorry.

    The ID is just a record ID for the table, insignificant really :)

    PS: miss down under mate, lived in Brissy for a year in 2011 and it was paradise :)

    Cheers
     
  8. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,388
    Likes Received:
    6,602
    Ok, I don't know whether I've been missing something for years or something's been changed with the plugin interface recently, but that doesn't sound right to me :)

    UpdateTelemetry() is passed a reference to a single instance of TelemInfoV01, which is data for the local vehicle. Getting data for all current vehicles should require the use of ScoringInfoV01 as passed to UpdateScoring(), and that scoring data doesn't include (for example) current or max RPM, but you have those in your table above and from a quick glance they look like they might be correct.

    But if you are somehow referencing telemetry data for all vehicles (rather than scoring data), and you're getting that data at the usual 100Hz (as your mDeltaTime values would suggest), all the mElapsedTime values should be the same.

    Yep, I'm confused :p

    PS I'm between Brisbane and the Gold Coast... beautiful, especially this time of year :)
     
  9. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Ah, well, I am not sure how it was before and I only started playing with the plugin recently. The way it is now is like this:

    1. Telemetry object which contains an instance for each driver
    2. Score object which I only get one for the current user (myself in this case)
    3. Vehicle Score, an object for each driver.

    Maybe I messed up don't know, but that's what I am getting from the events. Not all fields are shown in screen shot.

    PS: I stayed in Holland Park while there and was jumping between the Gold Coast and Sunshine Coast on the weekends. Or exploring some new place :) Heh........
     
  10. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    The bug was from my side and I managed to fix it :eek:

    Thanks ;)
     

Share This Page