Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates txlogger for the 2.1.10 release with a large performance- and UX-focused refactor across UI rendering, logging, and internal messaging. Major themes include faster plot/map rendering (including new mesh backends and decimation), a new typed pub/sub bus, and a simplified log-writing pipeline via ordered “channels” plus a new BPL log format.
Changes:
- Refactor logging writers and ECU loggers to write via an ordered
[]Channelabstraction; add BPL writer support. - Rework visualization performance: plotter seek coalescing + decimated plotting, meshgrid shader/polygon backends + surface fill modes, and multiple renderer object-list caching optimizations.
- Replace legacy eventbus usage with a new type-safe
pkg/busimplementation and update consumers accordingly.
Reviewed changes
Copilot reviewed 70 out of 75 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pprof.go | Optional pprof server behind build tag |
| pkg/windows/mainWindow.go | UI tweaks; wideband range config change |
| pkg/windows/mainWindow_internal.go | Remove EBUS monitor window plumbing |
| pkg/widgets/vbar/vbar.go | Renderer object caching |
| pkg/widgets/symbollist/symbollist.go | Sorting/locking + allocation reductions |
| pkg/widgets/settings/wbleditor.go | Cache renderer object list (needs invalidation) |
| pkg/widgets/plotter/plotter.go | Seek coalescing + decimated plotting path |
| pkg/widgets/plotter/plotter_render.go | Renderer object caching |
| pkg/widgets/plotter/plotter_bench_test.go | Plot performance benchmarks |
| pkg/widgets/plotter/bresenham.go | Add vertical-run fill primitive |
| pkg/widgets/multiwindow/multiplewindows.go | Drag/layout improvements; reuse buffers; layout guards |
| pkg/widgets/multiwindow/innerwindow.go | Avoid brittle title lookup; cache title label |
| pkg/widgets/multiwindow/arrange.go | Nil-guard in space search |
| pkg/widgets/meshgrid/meshgrid_widget.go | Major meshgrid backend + cursor + render modes |
| pkg/widgets/meshgrid/meshgrid_surface.go | CPU surface fill + shading utilities |
| pkg/widgets/meshgrid/meshgrid_shader_test.go | Shader encoding/projection tests + compile checks |
| pkg/widgets/meshgrid/meshgrid_render_test.go | Meshgrid render/cursor/polygon tests + benches |
| pkg/widgets/meshgrid/meshgrid_poly.go | Polygon backend implementation |
| pkg/widgets/meshgrid/meshgrid_mouse.go | Orbit behavior changes |
| pkg/widgets/meshgrid/meshgrid_draw.go | Surface render integration + cursor projection |
| pkg/widgets/meshgrid/meshgrid_axis.go | Axis overlay primitives for non-image backends |
| pkg/widgets/mapviewer/mapviewer.go | Mesh render mode toggle + 2D graph for flat maps |
| pkg/widgets/mapviewer/mapviewer_mouse.go | Selection perf improvements |
| pkg/widgets/mapviewer/mapviewer_keyhandler.go | Avoid redundant cursor rect updates |
| pkg/widgets/logplayer/logplayer.go | Switch to new typed bus; renderer cache |
| pkg/widgets/ledicon/ledicon.go | Renderer object caching |
| pkg/widgets/icon/icon.go | Renderer object caching + explicit receiver field |
| pkg/widgets/hbar/hbar.go | Renderer object caching + receiver refactor |
| pkg/widgets/grid/grid.go | Renderer object caching + receiver refactor |
| pkg/widgets/graph2d/graph2d_render_test.go | Graph2D render tests |
| pkg/widgets/dashboard/setters.go | Reduce allocations in IDC text formatting |
| pkg/widgets/dashboard/dashboard.go | Wideband range validation + layout cleanup |
| pkg/widgets/combinedlogplayer/combinedlogplayer.go | Swap eventbus for typed bus |
| pkg/widgets/cbar/cbar.go | Clamp + faster text positioning |
| pkg/wbl/zeitronix/zeitronix.go | Robust reconnect/stop handling |
| pkg/wbl/stag/stag.go | Robust reconnect/stop handling |
| pkg/wbl/innovate/innovate.go | Robust reconnect/stop handling |
| pkg/wbl/aem/aem_uego.go | Robust reconnect/stop handling |
| pkg/ebus/ebus.old | Legacy ebus implementation snapshot |
| pkg/ebus/ebus.go | Switch ebus to new typed bus + aggregators |
| pkg/datalogger/txbridgelogger_t8.go | Switch writer calls to []Channel |
| pkg/datalogger/txbridgelogger_t7.go | Switch writer calls to []Channel + router |
| pkg/datalogger/txbridgelogger_t5.go | Switch writer calls to []Channel |
| pkg/datalogger/t8logger.go | Switch writer calls to []Channel |
| pkg/datalogger/t7logger.go | Switch writer calls to []Channel + error handling |
| pkg/datalogger/t5logger.go | Switch writer calls to []Channel |
| pkg/datalogger/log.go | Writer factory updates; TXBinWriter stub remains |
| pkg/datalogger/log_txl.go | TXL writer updated to channel-based output |
| pkg/datalogger/log_csv.go | CSV writer updated to channel-based output |
| pkg/datalogger/log_bpl.go | BPL writer updated to channel-based output |
| pkg/datalogger/datalogger.go | LogWriter interface updated |
| pkg/datalogger/channel.go | New channel abstraction for log columns |
| pkg/datalogger/baselogger.go | Build ordered channel list (order is nondeterministic currently) |
| pkg/bus/bus.go | New type-safe pub/sub bus |
| pkg/bus/bus_test.go | Bus correctness tests |
| pkg/bus/bus_bench_test.go | Bus benchmarks |
| pkg/bus/aggregators.go | DIFF aggregator for derived topics |
| pkg/bus/aggregators_test.go | Aggregator tests |
| pkg/assets/WHATSNEW.md | 2.1.10 release notes |
| main.go | Remove commented pprof import |
| go.sum | Dependency bumps |
| go.mod | Dependency bumps + go toolchain updates |
| experiments/eventbus/unbounded.go | Experimental unbounded channel |
| experiments/eventbus/unbounded_test.go | Tests for experimental unbounded channel |
| experiments/eventbus/eventbus.go | Experimental eventbus implementation |
| experiments/eventbus/eventbus_test.go | Tests for experimental eventbus |
| experiments/eventbus/bench_test.go | Benchmarks for experimental eventbus |
| experiments/eventbus/aggregators.go | Experimental aggregators |
| experiments/ebusmonitor/ebusmonitor.go | Experimental ebus monitor widget |
| .github/workflows/windows.yml | CI Go/NSIS version bumps |
| .github/workflows/windows-release.yml | CI Go/NSIS version bumps |
| .github/workflows/linux.yml | CI Go version bump |
| .github/workflows/linux-release.yml | CI Go version bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+137
to
+142
| func (bl *BaseLogger) buildChannels() []Channel { | ||
| order := bl.appendExtraSysvars(bl.sysvars.Keys()) | ||
| channels := make([]Channel, 0, len(order)+len(bl.Symbols)) | ||
| for _, name := range order { | ||
| channels = append(channels, newSysvarChannel(bl.sysvars, name)) | ||
| } |
Validated against MyBooty.asm and TrionicCANLib (Trionic5.cs) as references; the full flow is hardware-tested on a T5.5 (AMD 28F010), including a deliberate mid-flash cable pull and recovery. Flashing: - Determine the box from the FLASH chip id (C9) instead of the footer, and validate bin size against it BEFORE erasing. Wrong-size bins are refused and the ECU is reset back to its intact firmware. - T5.2 bin on a T5.5 box is written twice back to back so the CPU finds its reset vectors at chip offset 0 (matches TrionicCANLib). - Validate the bin checksum before erase using the same footer-based algorithm (ROM_Offset/Code_End) MyBooty runs in the C8 command, including a guard for odd-length regions that would hang the loader. - Verify after flashing: C8 checksum + read-back of the regions C8 cannot see (boot vectors at flash start, footer block). - Retry transport errors per data frame (frames are offset-addressed and idempotent); abort immediately on bootloader-reported programming failures with the failing address. - Failures after erase are tagged with an explicit "do NOT turn off the ignition, retry flashing" warning since the SRAM loader is the only way back (no ROM boot on the 68332). Robustness: - New command helper validates DLC and command echo on every reply; a short/garbled frame from a flaky adapter can no longer panic the app mid-flash. - chipTypes/footer caches moved from package globals to the Client, and the footer cache is invalidated on erase. Recovery no longer depends on accidentally-stale globals: RecoverECU now simply calls FlashECU, which works with an erased footer. - Timeouts aligned with TrionicCANLib: 1s general (was 150-250ms), 60s erase (was 20s), 10s checksum (was 1s). - Erase failures decode MyBooty's documented error codes 01-0A plus the failing address. - C1 boot vector is fire-and-forget again with a 200ms settle: the firmware jumps to SRAM without replying (hardware-verified), so waiting for an ack always timed out. - Footer reads retried; footer parser bounds-checked against corrupt data; documented the 1C 01 "bootloader already running" heuristic (MyBooty's Flash_Programming range check rejects the 0x5000 upload). Fixes: - Bin checksum end-marker scan could miss the 4E FA FB CC marker after a repeated prefix byte; replaced by footer-based parsing. - ROM End (0xFC) and Code End (0xFE) labels were swapped in ECU info. - ECU info now also reports the decoded FLASH chip identity, e.g. "AMD 28F010 (256 kB)".
- Replace the binding.StringList/List log with a selectable monospace label in a scroll container; drop the data listener plumbing. - Route every operation (info/dump/flash/marry/recovery) through the same timestamped t.log helper instead of four hand-rolled variants. - After a successful flash, read and log the ECU info while the bootloader is still running so the user sees the new bin's part number and FLASH chip type as confirmation.
New t5cli widget that talks to the T5 firmware's built-in ASCII serial monitor via the C4 (feed one input char) / C6 (poll one output char) CAN commands: line-based input with arrow-up/down history, output in a trimmed TextGrid, and per-char timeouts to detect an empty output FIFO. Reachable from the Tools menu as "T5 CLI".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.