update frame drop filter (#2592)

pull/2602/head
Adeeb Shihadeh 4 years ago committed by GitHub
parent cb9bf8df23
commit d92f923d70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/controls/controlsd.py
  2. 2
      selfdrive/modeld/modeld.cc

@ -232,7 +232,7 @@ class Controls:
self.events.add(EventName.relayMalfunction) self.events.add(EventName.relayMalfunction)
if self.sm['plan'].fcw: if self.sm['plan'].fcw:
self.events.add(EventName.fcw) self.events.add(EventName.fcw)
if self.sm['model'].frameDropPerc > 1 and not SIMULATION: if self.sm['model'].frameDropPerc > 2 and not SIMULATION:
self.events.add(EventName.modeldLagging) self.events.add(EventName.modeldLagging)
if not self.sm.alive['frontFrame'] and (self.sm.frame > 5 / DT_CTRL) and not SIMULATION: if not self.sm.alive['frontFrame'] and (self.sm.frame > 5 / DT_CTRL) and not SIMULATION:
self.events.add(EventName.cameraMalfunction) self.events.add(EventName.cameraMalfunction)

@ -147,7 +147,7 @@ int main(int argc, char **argv) {
// setup filter to track dropped frames // setup filter to track dropped frames
const float dt = 1. / MODEL_FREQ; const float dt = 1. / MODEL_FREQ;
const float ts = 5.0; // 5 s filter time constant const float ts = 10.0; // filter time constant (s)
const float frame_filter_k = (dt / ts) / (1. + dt / ts); const float frame_filter_k = (dt / ts) / (1. + dt / ts);
float frames_dropped = 0; float frames_dropped = 0;

Loading…
Cancel
Save