Repository navigation
v5.1.0 (internal development build)
Internal development build, never posted for download. Everything in it ships in 5.1.2, the build to install.
5.1.0 introduces the GCU Utility desktop app, a compressor refill watchdog, and per-car gear sensor and compressor correction. It also makes the GCU's logs much harder to lose or corrupt, and it adds an owner-readable shift record that says whether each shift worked. 5.1.0 never had a final public build: it went out as test builds 5.1.0-rc1 through rc7, and everything in them ships to owners in 5.1.2. These notes describe the combined changes since 5.0.0. Run this release's GCU Utility with this firmware: a 5.0.0 Utility connects to 5.1 firmware but never fills its Config tab, and an older Utility cannot import logs from it.
Two changes need you to act. A car that has ever saved its settings keeps the old 70/90 psi tank band until you run SET tank_min_psi 85, SET tank_max_psi 105 and SAVE_CONSTS. A dash or AiM channel that decodes 0x704 bytes 6-7 as counts has to be re-pointed to millivolts.
Shifting and the gear sensor
- Shift records now say whether the shift worked.
SHIFT_OK_*means the drum confirmed the gear, andSHIFT_FAIL_*means the valve fired and the drum never arrived. A refusal at either end of the drum isSHIFT_BLOCK_TERMINAL_GEARand no longer counts as a failure. Every accepted shift also writes aSHIFT_BEGINandSHIFT_ENDpair, so a shift is still on record when its optional trace is lost. Neutral shifts get a start line too, and serial bench shifts log assrc=serialinstead of reading as ghost or double shifts. - New tunable
gear_settle_ms(0 to 40 ms, default 15) holds the shift valve open a little longer after the gear confirms, so a drum that drifts out of the target gear is not booked as a success. It also holds the ECU cut or blip for the same time, so a confirmed shift now sends the cut 15 ms longer than on 5.0. A shift whose gear confirms too late to finish this wait is reported as a timeout.gear_settle_ms 0restores the 5.0 timing. - Gear detection no longer trusts a false N. With the compressor running, the sensor can read 2nd low enough to land in the N band. The GCU now refuses an N the drum cannot have reached and uses the CAN gear or the last gear it saw (logged as
GEAR_MISMATCH). In moto mode the NT button is refused in that state, and a downshift is refused when the compressor drops the sensor into N after a downshift from 3rd or above, until the ECU catches up or the sensor reads a gear again. A 2nd to 3rd upshift that times out with no 3rd confirmed no longer fires the countershift pulse, which could knock a drum still in 2nd into neutral. A shift pulled right after another one now judges the live drum instead of a frozen reading, and a CAN gear the ECU stopped reporting goes invalid after 500 ms (CAN_TIMEOUT_GEAR), so it can no longer be used for a money-shift check. - Misshift and bounce retries work without an RPM reading, so a CAN car with no RPM frame and a bench shift with the engine off can both retry. Post-shift bounce checking (
post_shift_validate_ms, still off by default) now uses the gear the GCU trusts. Every full shift sends the gear-shift signal to the ECU, including N to 1st, N to 2nd and a shift from an unknown gear. A car-mode N to 1st now blips and a moto-mode N to 2nd now cuts. - Paddle noise is handled. A relay or solenoid transient no longer counts as a press or a release, release bounce no longer starts a shift, a stray HIGH reading on a held down paddle no longer drops an auto-downshift walk, and noise on a held paddle can no longer turn one pull into several shifts. Rejected presses reported on
0x702now count each re-pull in a shift. - Auto-downshift is faster and lands lower. It no longer waits out the background trace after a confirmed shift, which paces the walk at about 300 ms per gear in the shift timeline (it measured 536 ms per gear on a car before; the new pace has not been measured on a car yet). New setting
auto_downshift_max_rpm(CAN builds, default 10000, range 7000 to 11800) caps where an auto step may land, so a walk no longer lands just under the money-shift block. A step held back by it counts asceiling=on theAUTO_DS_VETOline inDUMP_STATUS. The 4 second hold limit and the stuck-paddle lockout restart each time a downshift lands and is confirmed, so a long walk through a braking zone is no longer cut off partway. - The neutral mode labels now match what the paddle does. Car mode (
n12): the down paddle from 1st finds neutral. Moto mode (1n2): that paddle is blocked and N comes only from the NT button. The mode you set by holding both paddles now survives a power cycle on every car. If the save fails, the serial lineWARN neutral mode not savedsays the mode will revert. - The GCU no longer does flash work in the middle of a shift. The first GPS time fix is kept in RAM and written after the shift ends, and every serial command that writes flash (
SAVE_CONSTS,CLEAR_ROLLING,FLUSH_LOGSand the rest) answersERR SHIFT_IN_PROGRESSduring a shift. Log reads (SESSION_LIST,SESSION_GET,DUMP_ROLLING,DUMP_EXCEPTIONS) are refused during a shift or with the engine running.
Compressor and air
- The compressor shuts itself off when a refill stalls. Below
tank_min_psi, the relay latches off when a run gains less than 2 psi in the stall window, hits the maximum on-time backstop, or the tank sensor reads garbage. That logsCOMPRESSOR_TIMEOUT, andCOMPRESSOR 1answersERR COMPRESSOR inhibiteduntilCOMPRESSOR 0or a reset. A stall inside the band logsCOMPRESSOR_RELIEF_SUSPECT. These limits are not calibrated on a car yet. - Tank pressure reads the sender that is actually fitted. The conversion is now a table measured on two cars for the Ashcroft sender, the compressor band is 85 to 105 psi, and the critical cutoff moves from 110 to 125 psi.
tank_min_psiandtank_max_psican no longer be set inverted: the value you just set wins and the other threshold moves to meet it, logged asCONSTS_MIGRATED.DUMP_STATUSreturns aTANK_PRESSURE adc=... psi=...line so you can check it against a mechanical gauge without running the compressor. - The compressor no longer starts in the middle of a shift. Its relay adds a voltage step to the gear reading, and starts used to land while the GCU was waiting to confirm the new gear. An automatic start now waits for the shift to end, for at most 500 ms, and starts at once if the tank is more than 5 psi under
tank_min_psi.COMPRESSOR 1and a compressor that is already running are not affected. - Gear detection corrects for compressor droop. The running compressor pulls the gear reading low, which could make a 3 to 4 upshift miss or run to its timeout. The GCU now measures this on each car: every time the compressor switches on or off away from a shift, it compares how far the reading moved with the old fixed correction and scales the correction in every gear to match. Right after power-up it uses the old fixed correction until the first clean measurement, nothing is stored, and each measurement is logged as
DROOP_LEARNED. Setrelay_flyback_installedto 1 on a car whose compressor wiring is fixed to turn the correction off. - CAN cars also learn where each gear sits on the gear sensor and move the gear bands to fit. When the compressor is off, no shift ran in the last second and the ECU's gear is steady, the GCU keeps a running average of the sensor reading for that gear. Once a gear has a few samples, the edges beside it move to halfway between neighbours. Until then, and after every power-up, the standard table is used. Neutral is never learned, and each change logs
BAND_LEARNED. - Two settings describe how the car is wired, so they are now kept:
relay_flyback_installedandgp_sensor_fitted(set it to 0 on a car whose gear sensor is absent, unplugged or dead, so a floating input is not read as a real gear). Restore Factory Settings, firmware updates, an unreadable settings file and a trip back to 5.0 all leave them alone. Only setting them again and saving changes them.
Dash and CAN
0x704bytes 6-7 (FBKA) now carry the front brake sensor in millivolts, 0 to 4477 mV, not raw counts, and a shorted or unplugged sensor reads 0 mV. A dash or AiM channel that decodes these bytes as counts has to be re-pointed.- New CAN channels for dash and AiM diagnostics.
0x705bytes 4-5 carry the gear sensor output in millivolts, what a meter on the sensor wire shows.0x702bytes 6 and 7 count up and down paddle presses the GCU dropped without shifting.0x703Shift Result now goes out every 1 s instead of every 5 s. Corner minimum and straight maximum speed publish on0x705in mph, from AiM GPS speed, with confirm windows set bycorner_min_accel_confirm_msandstraight_max_brake_confirm_mson CAN builds. - The dash status byte (
0x701byte 6) shows every active warning and clears again. Before, each warning overwrote the whole byte and a money-shift block from the out lap could still be lit at the chequered flag. A shift block now holds for 3 s from the first frame that reaches the wire, and a CAN bus-off lights the CAN-error bit (byte 6 bit 7), which it never did before. The money-shift and invalid-CAN block counts in0x703stop at 15 instead of wrapping to 0. - On a Suzuki car, throttle and grip now reach the GCU from the real
0x1A1frame. The firmware used to read them only from0x102and0x101, which no Suzuki car sends, so every logged shift trace showedtps_pre:0. Nothing that decides a shift reads either value. - On a Suzuki car the GCU keeps a session fuel used total. It adds up the ECU's instant fuel channel (
0x221) over time and sends the total once a second on a new frame,0x706, in tenths of a mL.DUMP_STATUSshows it on aSESSION_FUELline, Live Data shows it, and the newFUEL_RESETcommand zeroes it. The total starts at 0 on every power-up. The scale is an estimate that no measured fill-up has checked yet, so treat the number as relative.
Logging
- The GCU keeps its vehicle identity across a reboot. Before, every power cycle and every firmware flash came up unassigned and Update Firmware failed with
Identity: unassigned after update. - The heartbeat is a legend plus a values row, so it can no longer outgrow the wire. The old keyed
HBline could reach 275 bytes against a 254-byte cap and a split line lost its last number. The firmware now sendsHBK(the key list, about every 10 s) andHBV(the values, once per second). An older Utility shows Live Data as Waiting on a car with this firmware. - A long stint no longer loses the oldest shift records first. When the log queue fills on track, the GCU drops routine records (compressor, wheel-speed) first, then shift traces, and keeps shift ends and every failure record longest. In one real session mix, shift outcomes and failures now last about 58 minutes of continuous track time instead of about 19. Dropped records are counted, the count reaches flash as
LOG_DROPPED, andDUMP_STATUSshows it on aLOG_DROPSline. - Logs are saved to flash in batches of about 3.5 KB instead of one record at a time. Replaying one session's 570 records took 46 block erases instead of 623, so the flash wears less and a full queue drains faster in the pit. When flash fills, the GCU now deletes sessions that logged nothing before older sessions that did, so a bench boot can no longer push a real outing out of flash.
- Log timestamps are honest about the timezone. A car that was never told its timezone stamps UTC with a trailing
Zinstead of a confident local time,tz_offsetis now a public tunable on CAN builds, and a record keeps the timezone it was written under when you changetz_offsetlater. The boot record includes the firmware's Git hash and build time, every boot logs the settings in effect, andDUMP_STATUSnow names the reset cause correctly: a real core brownout used to read aspower-on. - A dump or log transfer that was cut short no longer closes like a complete one.
DUMP_ROLLINGandDUMP_EXCEPTIONSnow end withstatus=complete,status=truncated reason=stallorstatus=truncated reason=read_error, and other framed replies that lose a line stop without anEND. The Utility warns that the log is incomplete and refuses to analyze it. Every complete log the GCU sends also ends with a checksum, and the Utility discards and re-reads a copy that does not match. The GCU's own status lines no longer land inside a session transfer and break its checksum, they wait until it closes. Clearing logs can no longer reset the GCU when the computer on the USB cable stops reading, and flash errors no longer print raw serial under the watchdog. - The log system survives bad reads. A flash read error at boot no longer erases anything: the GCU retries, formats only a chip that reads fully erased, and otherwise runs with logging off for that boot. If the saved settings file cannot be read,
SAVE_CONSTSand the paddle neutral toggle are refused instead of writing defaults over your tuning. A session index that cannot be read is not replaced by an empty one, so session titles survive. A saved vehicle identity that fails to write now saysERR ID_WRITE save failedinstead of blaming the fields you typed. - New diagnostic lines in
DUMP_STATUS:SETTINGS rejected=<n>(the boot could not apply some saved settings rows, which stay at default),STACK_FREE_MIN,ADC_A6(a raw read of theVDivinput for bench checks),DASH_STATUS, and on CAN buildsWSSwith aWSS_STATErecord on every change, so the logs can say whether the wheel-speed output was running. Session lists report each session's top speed asvmax_mphwhen an AiM dash is connected. - If you save settings on 5.0, it deletes the settings 5.0 does not have, and they read their defaults once the car is back on 5.1 with nothing saying which ones. Check your per-car settings first and set any you changed again before saving on 5.1. On a public CAN build
tz_offsetgoes back to unknown.
Settings and bench tests
- The GCU reports which settings are unsaved.
DIRTYanswersflash=<0|1> rows=<n>andGET_CONSTSadds aSAVEDrow for each setting whose live value differs from flash, so a lost reply, a reconnect or an unsavedRESET_CONSTSstill reads right. A car whose settings file was migrated or clamped at boot no longer shows phantom unsaved changes.GET_MANIFESTalso describes each setting in words. - Bench tests run on a lease. A bench command (
GSS,BRAKE_TEST,WSS,COMPRESSOR) used to stay on if the laptop crashed mid-test. Now it runs under a 5 second lease that the Utility keeps renewing. When the lease ends for any reason, the firmware resets every output and reports what it read back. A manualCOMPRESSOR 1stops after 60 s. - Settings writes from the Utility reach the GCU: Apply Temporarily, Review & Save All Changes and Restore Factory Settings unlock write access for the write and lock it again. After Apply Temporarily the row stays selected and shows the value the GCU is running or its reason for refusing. Restore Factory Settings resets every setting except the two wiring settings, and its confirm message names them. Fixes in Settings and the Update page: Restore Factory Settings opens its confirmation, clicking a setting opens its value field, Discard puts each unsaved setting back to its saved value instead of resetting everything to factory defaults, and the Settings table scrolls and fits its window.
GCU Utility: install, connect and update firmware
- The GCU Utility is one desktop app with six pages: Overview, Update Firmware, Live Data, Logs, Settings and Advanced. It ships for macOS and Windows, opens on Overview, connects by itself when exactly one GCU is attached, and offers a device menu when there are several. Help opens the GCU owner's manual, and nothing in the package needs Python. The old classic GCU Firmware Flasher window and its serial console are gone. A Raw Log window (Window, Raw Log on macOS; View, Raw Log on Windows) lists every command sent, every line received and every connection event, so a failed connect shows why.
- Update Firmware flashes a connected GCU, or a port with no GCU answer. It is refused while the engine runs or a shift is in progress, and your sessions, settings and identity are kept. The page shows the version written next to the version the GCU reports, and a board with no vehicle identity gets a warning instead of a failure. A refusal always says what happened and what to do next. Return to Production Firmware puts a car back on its matching public or developer build after a diagnostic build. A CAN GCU on public 5.0.0 updates to 5.1 in one step. Assign identity writes in one click: it opens write access, writes the identity, closes access again and tells you what the board was left with.
- A GCU on 5.0.0 or 5.0.1 connects, and a page that needs newer firmware says so with an Update Firmware button. A failed connect says what it found, offers Update Firmware, and lets go of the port so Retry works.
- Flashing is sturdier. The Utility waits 3 s after the bootloader appears before it starts, because starting within 500 ms made the write die mid-way on a test Feather. A write that hangs for 30 s is stopped, retried once, then reported with Retry and a window that can still be closed. On macOS the Utility bundles a native arm64 upstream bossac, which verifies again on macOS 27 and shows no Rosetta warning, and it refuses the Arduino fork of bossac that fails verify. On Windows it handles folder names outside the system code page, and the first connect no longer fails with
handshake failed: GET_MODE: timeout, because the Utility waits 1.5 s after opening a COM port. Refreshing the port list is instant instead of taking about 10 s. The session list on a GCU with many sessions is no longer cut short by serial buffering, and a large log download keeps going while lines keep arriving.
GCU Utility: pages
- Overview has a Device card (chassis, firmware, build, uptime, reset cause, session count, when this app last flashed the board, chip ID) and four task cards. Live Data is a board of headline tiles (Gear, Engine RPM, Tank pressure, CAN), grouped panels and a recent-activity strip, and shows a single "No GCU connected" state when nothing is attached. Old values never pass as current: a reboot clears the previous boot's numbers and a disconnect clears the ended session's.
- Advanced groups connection identity, access, the bench lease, System Readiness, bench controls and a read-only console. Opening Advanced starts the bench test when the engine is off and no shift is running. Bench controls show only while a lease is open. Export Console Capture saves every line received since the app started, with a marker for each connection.
- Pages repaint in place while the GCU is polled, so a scrolled page stays where you left it and Settings keeps the value you are typing. Cards, tables, status pills and dialog text reflow instead of being cut off at 144 dpi (150% scaling) in the 1200x720 window, which is now the minimum size. Windows draws text in Segoe UI. One failing part of the update loop no longer stops serial reads, reconnect and flashing for the whole app.
GCU Utility: logs and sessions
- The GCU indexes its logs as sessions. A mid-run log rollover no longer looks like a second session.
SESSION_LIST,SESSION_GET(resumable),SESSION_TITLEandHIST_GETgive each boot a stable session id, a title and its fault history. Session ids stay unique after a 5.0 to 5.1 upgrade, and a GCU with more sessions than one list carries lists the newest and says the list is partial. - The Logs page is a Device Sessions page with Sources, the sessions on this GCU, and a preview. Import runs only when you start it, one session at a time. A 5.0.x GCU has only its rolling dump, so Import Whole Log splits it into one session per boot, and a second dump imports only the new sessions. An import is byte for byte what the GCU stored, a retry resumes correctly, and a session the GCU kept recording into is updated in the library with its title, notes and tags kept. Importing, renaming, notes and deleting all run inside the Utility without Python.
- Sessions can be named, with the new title saved in the library at once and sent to the GCU when you apply it. Titles with accented letters or emoji are saved correctly, and a title too long for the GCU's command line is refused with the number of bytes that fit. Session rows show date, time, size, shift count and whether the copy is in the library or only on the GCU. Prune Empty, under Maintenance in Sources, removes library sessions with no shifts and no warnings after asking, and never touches anything on the GCU.
- The Session Report has Summary, Timeline and Raw Log tabs, editable notes, and a self-contained HTML export. A truncated or unreadable capture carries a
NOT COMPLETEbanner, and a raw log that fails its hash check says so. Safety & Fault History groups the GCU's fault records by session, and Open in Session jumps to that session's report. Log Analysis reads the rolling log or a saved capture and reports clean, flagged or unavailable, and it never shows a failure as clean.