No description
  • Python 69.1%
  • C++ 25.6%
  • Cap'n Proto 1.7%
  • C 1.3%
  • Shell 1.2%
  • Other 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Andrew Brower 8f1fbcf410
Some checks failed
action.yml / ooops (push) Failing after 0s
Debug Discourse Posting / test-discourse-post (push) Waiting to run
action.yaml / ooops (push) Failing after 0s
ooops
2026-08-19 01:31:11 -04:00
.github ci: cut prebuilt releases from develop onto main 2026-08-01 15:44:38 -05:00
.idea chore: remove compile_db from build targets (#1059) 2025-07-19 16:39:34 +02:00
.run tools: add new Pythons configs to compile & run big/small UIs (#1500) 2025-11-21 15:55:18 -05:00
.vscode cleanup leftovers from the shuffling (#38224) 2026-06-21 19:17:01 -07:00
docs mazda: drop BIT2 from the FSC settle gate 2026-08-06 15:47:43 -05:00
msgq_repo@bb6cc57ef4 sync: fix upstream conflicts 2026-07-19 23:18:43 -04:00
opendbc_repo@e1991a23c2 opendbc: bump submodule for the vision-lead debounce 2026-08-11 08:38:25 -05:00
openpilot ooops 2026-08-19 01:31:11 -04:00
panda@61b050f1bd sync: fix upstream conflicts 2026-07-19 23:18:43 -04:00
rednose_repo@9e19086c26 Move eigen dependency into rednose (#38321) 2026-07-11 12:59:49 -07:00
release/ci ci: let the runner installer target a single repository 2026-08-01 15:29:45 -05:00
scripts Merge commaai/openpilot fdd1df79 into sync-20260721 2026-07-24 11:07:06 -04:00
site_scons/site_tools unpin numpy (#33132) 2024-07-30 13:11:05 -07:00
teleoprtc_repo@c0f813f1c4 webrtcd: move to libdatachannel (#38228) 2026-07-17 15:28:39 -07:00
tinygrad_repo@ac1632ab96 [bot] Update Python packages (#38263) 2026-07-02 19:04:06 -07:00
tools mazda: fix the gas override handing the powertrain back mid-decel 2026-08-01 20:54:13 -05:00
.codespellignore version: a new beginning (#1411) 2025-10-21 17:12:57 -04:00
.editorconfig fix .editorconfig 2025-05-14 14:34:11 +01:00
.gitattributes mv root dirs into nested openpilot (#38219) 2026-06-21 18:49:46 -07:00
.gitignore hi 2026-08-18 23:26:08 -04:00
.gitmodules zoompilot: serve opendbc submodule from the zoompilot org fork 2026-07-25 21:54:39 -05:00
.lfsconfig install: skip the 1.8GB unused big driving model on device 2026-07-25 22:29:49 -05:00
.lfsconfig-comma LFS: Sync refs from upstream (#472) 2024-12-08 22:03:47 +01:00
.python-version set preference for python 3.12.13 (#37637) 2026-03-10 15:08:56 -07:00
CHANGELOG.md Update CHANGELOG.md 2026-06-26 21:33:25 -04:00
conftest.py Merge commit '91b067cca0' into sync-20260716 2026-07-16 00:58:32 -04:00
Jenkinsfile move some tools back to root (#38235) 2026-06-24 19:21:19 -07:00
launch_chffrplus.sh remove submodule symlinks (#38312) 2026-07-08 21:30:17 -07:00
launch_env.sh agnos 18.5 (#38302) 2026-07-17 15:24:34 -07:00
launch_openpilot.sh Revert "agnos: split launch for c3 and c3x to support custom agnos" (#1879) 2026-07-20 09:25:49 -04:00
LICENSE root directory non hidden files 2020-01-17 10:22:00 -08:00
LICENSE.md Add Custom MIT License (#438) 2024-11-15 08:11:51 +01:00
pyproject.toml Merge sunnypilot/master into mazda-dev + opendbc upstream sync 2026-07-25 11:08:20 -05:00
README.md readme: point installs at the prebuilt main channel 2026-08-06 15:47:46 -05:00
RELEASES.md move cereal/ into nested openpilot (#38220) 2026-06-21 17:55:17 -07:00
SConstruct Merge commaai/openpilot fdd1df79 into sync-20260721 2026-07-24 11:07:06 -04:00
SECURITY.md Create SECURITY.md 2022-08-13 23:28:44 -07:00
uv.lock Merge commaai/openpilot fdd1df79 into sync-20260721 2026-07-24 11:07:06 -04:00
zensical.toml docs: add feedback guide (#37842) 2026-04-15 19:13:30 -07:00

zoompilot

A Mazda-optimized fork of sunnypilot for the CX-5 and CX-9. My goal is to enable the best steering possible and support all sunnypilot features on the 2022-2025 CX-5, staying within openpilot's safety guidelines.

This is what I run on my own 2022 CX-5 every day. There's a nicer tour of all of this at zoompilot.ai.

Install

When your comma device asks for a custom software URL during setup, type:

zoompilot/main

main carries the releases, built ahead of time so the device doesn't have to compile on install. develop is where the day to day work lands if you want it earlier. Devices installed from my old personal fork move themselves to main on their next start.

This is experimental software. You drive the car, you follow the law where you live, and you carry the risk. It ships with no warranty and no liability for any damage or injury.

steering improvements

Using a data driven approach I reverse engineered the steering hardware and developed features to use the EPS to its full potential.

  • Speed-dependent torque. The EPS caps the steering torque it will deliver, and that cap changes with speed. We encode the whole curve, so openpilot knows the extra torque it has at low speeds and the reduced torque at high speeds. More confident in the neighborhood, fewer wobbles on the highway.
  • Speed-dependent tuning. Stock openpilot learns ONE lateral acceleration factor and ONE friction value for every speed. We let it learn across seven speed ranges instead, matching the EPS's non-linear speed-dependent behaviour.
  • Rate-matched commands. The EPS accepts steering commands changing by up to 12 units a frame; stock asked for 10, leaving ~17% of that rate unused. We ask for the full 12, so torque ramps in faster.
  • Factory-matched specs. Steering ratio, mass, wheelbase, and steering lag, set to Mazda's real figures and refined against thousands of miles of learned data, so commands land where the planner intends.

fix annoyances

The stock port threw warnings that should have only applied to pre-2022 cars. I pulled the logs from many drivers and cut the false ones. The real ones still fire.

  • Place hands on wheel alert. The Mazda port was built on pre-2022 cars, where an LKAS_BLOCK signal meant steering control was lost. Across thousands of logged miles from many drivers, we found 2022+ EPS keeps steering through LKAS_BLOCK. It mostly fires near a stop, or when stock LKAS loses the lane lines. Real faults still disengage; we just stopped alerting when the car is still steering.
  • Steering override hysteresis. The same override filter Hyundai, Ford, Tesla, and Rivian run. It weighs more frames before deciding you've taken the wheel, so a pothole or rough patch no longer trips a phantom takeover.

wire up sensors

Your CX-5 ships with sensors the stock port never reads. We wire them in.

  • Forward radar. A radar behind the front badge runs the factory cruise. We read it too: distance, angle, and closing speed for up to four cars ahead, fused with the camera. Braking and throttle stay factory.
  • Blind-spot monitors. The factory blind-spot sensors already watch the lanes beside you. We feed what they see into openpilot before every lane change.
  • Speed-limit signs. The camera already reads posted limits for your dash. We route those into speed-limit assist, which can set your cruise to match, so you're not re-dialing at every sign.

radar cruise enhancements

The CX-5 keeps its factory cruise; zoompilot can set the speed for you by 'pressing' your wheel buttons.

  • Fixed ICBM. sunnypilot's Intelligent-Cruise-Button-Management and Smart-Cruise are broken for Mazda. I rebuilt how zoompilot works your wheel buttons. The speed you dial is remembered exactly: curves and speed limits can borrow it for a while, but you get your number back, never one or two under it. If the car misses a press, it quietly catches up.
  • Speed-limit assist that sticks. When the car sees a new limit, the screen asks once. Tap minus to accept a lower one and zoompilot dials the car down for you. It used to forget your answer a moment later; now it holds until the road changes. Press plus while it has you at a limit and it steps aside until the next sign. Your buttons always win.
  • Smart Cruise. A sunnypilot feature that reduces your set speed before a curve in the road and sets it back after. You can use vision or downloaded maps to determine when to slow down. Enable it in the cruise settings menu.
  • Deceleration overshoot (alpha). The Mazda does not instantly react to adjustments in set cruise speed. This option reduces the set cruise speed MORE than what the model calls for, to get the deceleration the curve needs.

additional Mazdas covered

Not just the CX-5.

  • EPS swaps. Swapped a 2022+ CX-5 steering rack into an older Mazda? We fingerprint the rack by its firmware, not by the car openpilot thinks you're driving, and steer it all the way to a stop.
  • CX-9. Supported for all features, but speed-dependent torque will take longer to learn since I only supply seeds for the CX-5. The CX-9 specs are also updated to match Mazda's official figures.
  1. Factory-reset the device before you install. A clean device carries no stale settings from a previous fork.
  2. Pick a driving model. I run Firehose. DTRv6 is a favourite and MacroStiff is great at high speed.
  3. Under steering: turn on torque control, then self-tune, then speed-dependent self-tune.
  4. Leave custom tune and manual real-time off. Let the car teach the software. That's the point.

Want to slow down for curves? Under cruise, turn on intelligent cruise button management, then pick smart cruise vision, maps, or both. Maps need a region downloaded through SunnyLink first.

You can manage almost all of it from the device screen. No laptop, no cloud editor. SunnyLink still works if you like it.

issues

Something misbehaving on your Mazda? Open an issue on the tracker. A route ID or dashcam clip helps a lot.

credits

zoompilot stands on sunnypilot, which stands on openpilot by comma.ai. Nearly everything here rides on their work. Star their repos and read their docs.

These features would work on other vehicles and could be upstreamed into sunnypilot or openpilot. I'm slowly working on that, but it's easier to share my own fork in the meantime.

Mazda, comma.ai, and the sunnypilot project neither endorse this nor have anything to do with it.

zoom-zoom-zoom