Skip to content

Conversation

@logesh45
Copy link
Contributor

@logesh45 logesh45 commented Nov 6, 2025

Fix "Turn the speed blue" tutorial for current Raylib UI

Problem: The getting started guide "Turn the speed blue" was outdated and referenced the old Qt-based UI code that no longer exists in openpilot.

Solution: Updated the tutorial to work with the current Raylib-based UI system.

Changes Made

  • Updated file path from selfdrive/ui/qt/onroad/hud.cc to selfdrive/ui/onroad/hud_renderer.py
  • Replaced C++/Qt code example with current Python/Raylib implementation
  • Updated search command to find _draw_current_speed function
  • Changed color modification instructions from QColor to COLORS.white
  • Added proper color definition for the blue color example

Verification

  • ✅ Confirmed current code uses rl.draw_text_ex at line 175 in hud_renderer.py
  • ✅ Verified the updated search command finds the correct function
  • ✅ Tested that the new instructions work with the Raylib API

Impact

This fix removes a critical barrier for new contributors trying to follow the getting started guide. The previous tutorial would immediately fail with file not found errors and incorrect syntax examples.

Files changed:

  • docs/how-to/turn-the-speed-blue.md

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


---

## 4. Rebuild the UI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebuilding is no longer required with Raylib

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right! updated it.

@logesh45 logesh45 force-pushed the fix/turn-speed-blue-tutorial-raylib branch 2 times, most recently from 0ab8f08 to 4d5e488 Compare November 7, 2025 14:22
@sshane sshane requested a review from Copilot November 27, 2025 09:51
Copilot finished reviewing on behalf of sshane November 27, 2025 09:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the "Turn the speed blue" tutorial from the deprecated Qt/C++ UI implementation to the current Raylib/Python implementation. The update is essential for new contributors following the getting started guide, as the previous version referenced non-existent files and outdated code.

Key Changes

  • Updated file paths and references from selfdrive/ui/qt/onroad/hud.cc (C++) to selfdrive/ui/onroad/hud_renderer.py (Python)
  • Replaced Qt/C++ code examples with Raylib/Python equivalents
  • Changed execution commands from compiled binary (selfdrive/ui/ui) to Python script (./selfdrive/ui/ui.py)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sshane sshane merged commit ae534dd into commaai:master Nov 27, 2025
9 of 10 checks passed
@royjr
Copy link
Contributor

royjr commented Nov 27, 2025

we should add BIG=1 or do mici instead or both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants