openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Mazda: get blinker state from switch

Open Jafaral opened this issue 3 years ago • 6 comments

Jafaral avatar Aug 26 '22 05:08 Jafaral

What's the difference? Can you post a route?

adeebshihadeh avatar Aug 27 '22 00:08 adeebshihadeh

Hmm, this removes the ability to use the convenience blinker for lane changes, I'm not sure we want that.

Screenshot from 2022-08-26 17-42-25

sshane avatar Aug 27 '22 00:08 sshane

If there's benefit to using this signal, convenience lane changes can be preserved by wrapping it in update_blinker_from_stalk instead of the existing update_blinker_from_lamp.

jyoung8607 avatar Aug 27 '22 02:08 jyoung8607

@sshane , not sure where you pulled the data, here is what I see:
image

Jafaral avatar Aug 27 '22 04:08 Jafaral

I thought that is a cleaner signal to use, it is the actual turn signal, and not the lamp signal. Or am I missing something from OP logic here?

Jafaral avatar Aug 27 '22 04:08 Jafaral

I see the point now. Updated using the stalk function per @jyoung8607 suggestion. Thanks!

Jafaral avatar Aug 27 '22 04:08 Jafaral

I will test that scenario.

Jafaral avatar Aug 30 '22 06:08 Jafaral

Have a route with the changes? Have you made sure that the convenience blinker is one second? Nevermind about that test, looks like you switched to update_blinker_from_stalk

sshane avatar Aug 30 '22 06:08 sshane

@sshane 8c521516df3527d8|2022-08-30--10-05-04--2

There was a bit of a lag before with lamp signals, now it is instantaneous.

Jafaral avatar Aug 31 '22 04:08 Jafaral

The blinker preference is generally in this order: continuous signal when blinker is activated, lamp state, then stalk position. The lamp state is better than the stalk state since you don't need to worry about things like convenience blinkers.

adeebshihadeh avatar Sep 05 '22 21:09 adeebshihadeh

What is stake state vs continous signal @adeebshihadeh ?

Jafaral avatar Sep 05 '22 22:09 Jafaral

Because what I have above looks like continuous signal to me.

Jafaral avatar Sep 05 '22 22:09 Jafaral

As far as I understand, this new signal is the position of the blinker stalk, which doesn't capture things like the convenience blinkers.

adeebshihadeh avatar Sep 05 '22 22:09 adeebshihadeh