SHWotever / SimHub

Multi sim dashboard, bass shaker driver, ....
http://www.simhubdash.com/
801 stars 98 forks source link

rFactor 2 Formula E - No battery consumption data because not supporting regeneration of battery charge (or just fuel) #487

Closed KrustiJr closed 4 years ago

KrustiJr commented 4 years ago

DataCorePlugin.Computed.Fuel_CurrentLapConsumption works when the lap starts, but whenever the car decelerates and the regen start to work (which simply means the "fuel' level increases) it turn back to -1. It looks like the DataCorePlugin.Computed.Fuel_CurrentLapConsumption data support only increasing, not decreasing values (?). It's then impossible to have data like the fuel used in the last lap, the average and such.

Everything works good if you drive in a track with no braking zones (like a superspeedway), it just stops to work at the first REGEN.

Would be very useful if this get fixed (or implemented) since the battery management is the key with these cars.

SHWotever commented 4 years ago

Hi ! Indeed, as a safety measure any fuel raise invalidates the current lap for tracking. I will look what I can do to unlock that without compromising data quality for all the other cases

KrustiJr commented 4 years ago

I suspected it's as designed indeed, cool then, hope you will get it sorted!

MisterCadrega commented 4 years ago

Hi ! Indeed, as a safety measure any fuel raise invalidates the current lap for tracking. I will look what I can do to unlock that without compromising data quality for all the other cases

For RF2 you could set the lap as invalid only if you register a fuel increase when the driver is in the pits

pseudocode

if(fuel.hasIncreased && (game == "rFactor2"))
{
    if(isInPits())
    {   
        currentLap.Invalidate()
    }
}
D3nn1sFFM commented 4 years ago

Any news on that matter ?

SHWotever commented 4 years ago

I removed any fuel raising checks, now only a valid lap with no pit / pit lane stops count, that should be enough to cover this case.