move-fast / openpilot

openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 85 supported car makes and models.
https://comma.ai/
MIT License
21 stars 3 forks source link

suppress nav mode switch when speed limit button pressed on C3 #10

Closed twilsonco closed 3 years ago

twilsonco commented 3 years ago

Description On C3, any mouse press causes the onroad gui to 3-way toggle between map, sidebar, neither, and the speed limit button only responds when pressed in nav mode. Nav is now only toggled when the mouse press is not on the speed limit button.

Verification My own lying eyes!!

twilsonco commented 3 years ago

Also with this the speed limit button works when in nav or normal (no sidebar) mode.

alfhern commented 3 years ago

Thanks for this, have not noticed this situation myself. I will consider moving all our custom MouseEvent logic from home.cc to onroad.cc as it actually is only valid when onroad and will be better encapsulated there.