long_mpc: fix e2e source condition (#26546)

* fix long_mpc source param

* rm print

* add back space for formatting
This commit is contained in:
YassineYousfi
2022-11-21 15:25:23 -08:00
committed by GitHub
parent 5b8f0db3e5
commit ded66e6307
@@ -352,7 +352,7 @@ class LongitudinalMpc:
x_and_cruise = np.column_stack([x, cruise_target])
x = np.min(x_and_cruise, axis=1)
self.source = 'e2e' if x_and_cruise[0,0] < x_and_cruise[0,1] else 'cruise'
self.source = 'e2e' if x_and_cruise[1,0] < x_and_cruise[1,1] else 'cruise'
else:
raise NotImplementedError(f'Planner mode {self.mode} not recognized in planner update')