openpilot
openpilot copied to clipboard
ui: improve `update_line_data()`
Continuing the optimization of update_line_data() after https://github.com/commaai/openpilot/pull/25001 by eliminating all memory operations (3 allocations/deallocations and 2 copies).
Think this change is worth it since update_line_data() is the only ui.cc function needing memory operations and is often called in loops.
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- the change is something we merge
- include a route or your device' dongle ID if relevant
This PR has had no activity for 14 days. It will be automatically closed in 3 days if there is no activity.
@adeebshihadeh this flipped the y coords for the path, causing the coloring to be inverted. Green ahead means red now!