commaai / new-connect

a rewrite of comma connect
https://new-connect.connect-d5y.pages.dev/
MIT License
11 stars 29 forks source link

`engage %` is not correct #75

Open BBBmau opened 4 months ago

BBBmau commented 4 months ago

It was quick to realize when looking at the timeline that the engagement percentage did not match up. Grey represents overrides by driver such as pressing on the gas or moving the steering wheel.

My understanding is it's marking one state as two (engaged AND overriding) here's the place where the percentage is being calculated.

https://github.com/commaai/new-connect/blob/84d1b82e08e0b985a0e2ffa8ec879d2065bb5e47/src/components/RouteStatistics.tsx#L9-L13

This is where the state is determined (engaged, overriding, alert, userflag)

https://github.com/commaai/new-connect/blob/84d1b82e08e0b985a0e2ffa8ec879d2065bb5e47/src/api/derived.ts#L126-L171

image