# BEANalyzer UltraPro

Professional Toyota/Lexus **BEAN MPX** analyzer, decoder, plotting, replay, JSON/CSV export, manual TX and CAN gateway tool.

This project was made for Lexus IS200 / Toyota BEAN MPX research, but the decoder database is editable and can be adapted to other Toyota/Lexus vehicles.

## Recommended Python version

Use:

```text
Python 3.12.x
```

Python 3.13 may work, but Python 3.12 is the safest option for PySide6. Avoid Python 3.14 for now because PySide6 wheels may not be available for your platform.

## Features

- Live BEAN MPX capture from Arduino Serial bridge.
- Complete editable BEAN-DBC JSON database.
- Friendly BEAN-DBC editor with form fields, signal editor and examples.
- Timestamped table with context, DID, MID, decoded text, function and source/candidate ECU.
- User-selectable dashboard cards.
- User-selectable graphs for any numeric decoded signal.
- CSV logging.
- CSV replay.
- JSON session export.
- Manual BEAN TX.
- Manual CAN TX.
- Repetition, delay and infinite loop TX modes.
- CAN gateway using:
  - CANalyst-II through python-can.
  - CANable/slcan through python-can.
  - SocketCAN through python-can.
  - PCAN/Kvaser/Vector through python-can when drivers are installed.
  - Arduino/ESP32 CAN serial bridge using EasyMultiCAN/EasyESP32CAN-style API.

## Install on macOS

```bash
brew install python@3.12
cd ~/Downloads/BEANalyzer_UltraPro
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python beanalyzer_ultrapro.py
```

If Homebrew Python is externally managed, do not install packages globally. Always create the `.venv` first.

## Install on Linux

```bash
cd ~/Downloads/BEANalyzer_UltraPro
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python beanalyzer_ultrapro.py
```

If the serial port cannot be opened:

```bash
sudo usermod -a -G dialout $USER
```

Then log out and log back in.

## Install on Windows

```powershell
cd "$env:USERPROFILE\Downloads\BEANalyzer_UltraPro"
py -3.12 -m venv .venv
.\.venv\Scripts\activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python beanalyzer_ultrapro.py
```

Or double-click:

```text
run_beanalyzer.bat
```

## Launchers

```text
run_beanalyzer.sh       Linux/macOS Terminal launcher
run_beanalyzer.command  macOS double-click launcher
run_beanalyzer.bat      Windows launcher
```

## Arduino BEAN bridge

Upload:

```text
arduino/bean_capture_bridge_tx.ino
```

Serial output format:

```text
B,<millis>,<type>,<len>,<hex bytes>
```

Example:

```text
B,123456,R,8,01 53 FE CD 49 52 7E 40
```

Manual BEAN TX from the app sends:

```text
BTX,<hex bytes>
```

Example:

```text
BTX,62 D2 10 00 00
```

## Arduino CAN serial bridge

Upload:

```text
arduino/can_serial_bridge_easymultican_esp32.ino
```

It uses the EasyMultiCAN/EasyESP32CAN-style API:

```cpp
CAN.begin(...)
CAN.sendMsgBuf(...)
CAN.checkReceive()
CAN.readMsgBuf(...)
```

PC to Arduino CAN TX:

```text
CTX,<can_id_hex>,<extended 0/1>,<dlc>,<hex bytes>
```

Arduino to PC CAN RX:

```text
CAN,<millis>,RX,<can_id_hex>,<extended 0/1>,<dlc>,<hex bytes>
```

## CANalyst-II

Install support with:

```bash
python -m pip install "python-can[canalystii]"
```

In the app use:

```text
Interface: canalystii
Channel: 0
Bitrate: 500000
```

For channel 2 use:

```text
Channel: 1
```

CANalyst-II uses libusb. On Windows you may need Zadig/libusb-win32 depending on your device/driver.

## CANable / SLCAN

Use:

```text
Interface: slcan
Channel: /dev/ttyACM0
Bitrate: 500000
```

On Windows:

```text
Interface: slcan
Channel: COM7
Bitrate: 500000
```

## SocketCAN

Linux only:

```bash
sudo ip link set can0 up type can bitrate 500000
```

App settings:

```text
Interface: socketcan
Channel: can0
Bitrate: 500000
```

## Manual TX syntax

BEAN examples:

```text
62 D2 10 00 00
62 D4 20
FE CD 49
```

CAN examples:

```text
200#01 02 03 04 05 06 07 08
18DAF110#02 10 01
```

Repetitions:

```text
1      send once
10     send 10 times
0      infinite loop until Stop
```

## BEAN-DBC editor

The editor lets you modify messages without editing the full JSON by hand.

Signal kinds:

```text
u8
u16be
bool
flags
map
constant
```

Formula examples:

```json
{"name":"outside_temp","kind":"u8","offset":0,"formula":"raw - 48","unit":"°C","plot":true}
```

```json
{"name":"rpm","kind":"u16be","offset":0,"formula":"raw / 5.12","unit":"rpm","plot":true,"card":"rpm"}
```

```json
{"name":"body_status","kind":"flags","offset":0,"flags":{"10":"Any door opened","40":"Ignition ON"}}
```

## Safety notes

- Start with RX-only sniffing.
- Keep ACK disabled unless your bench test needs it.
- Do not connect LEDs directly to the BEAN line.
- Use high impedance input/buffered indicators.
- Be careful with manual TX. Wrong frames can confuse ECUs.
- Test on bench before connecting to the full vehicle network.

## Known limitation

The `Source ECU` field is metadata/candidate unless confirmed by physical isolation. BEAN MPX is not being treated as CAN arbitration-ID-per-message. A context byte is not automatically a guaranteed ECU source.


## Dashboard Card Display Modes

Each dashboard card can display the same signal in different formats:

```text
Decoded           Human value with unit, for example 0 km/h
Full decoded text Full decoder string
Raw decimal       Raw numeric value as decimal
Raw hex           Raw byte(s) as hexadecimal
Binary            Raw byte(s) as binary
Boolean           ON/OFF interpretation
```

This is useful when reverse-engineering BEAN MPX because you can compare the physical decoded value with the original byte value without opening the raw frame table.


## Change Monitor / Byte Watcher

The Live tab includes a Change Monitor that can watch specific BEAN commands and highlight byte/bit updates.

Controls:

```text
Highlight changes  Enable byte/bit comparison and row highlighting
Only monitored     Hide all frames that do not match the watch filter
CTX                Optional context byte filter, for example 53
DID                Optional DID filter, for example FE or 62
MID                Optional MID/command filter, for example 24, CD, AB, D4
raw/decoded        Optional text filter applied to raw frame and decoded text
Clear memory       Forget previous values used for comparison
```

When a watched frame changes, the `Changes` column shows details like:

```text
B0: 0->103 dec | 0x00->0x67 | 0b00000000->0b01100111 | changed b0,b1,b2,b5,b6
```

The changed data byte is also wrapped in brackets in the `Data` column:

```text
00 [67] 7E 00
```

This works for known decoded commands and also for unknown frames.


## Fixed Message Monitor Window

`Message Monitor` opens a second CANalyst-style window.

Unlike the Live tab, this monitor keeps one fixed row per command/ID:

```text
BEAN: CTX + DID + MID
CAN:  CAN arbitration ID
Unknown BEAN: first bytes of the frame
```

It shows:

```text
Bus
CTX
DID
MID / CAN ID
message name
function
source ECU
received packet count
cycle time in ms
last update time
decoded text
payload bytes B0..B15
raw frame
```

When a byte changes, that byte cell is highlighted in red and fades back after about 1.5 seconds. This makes it easier to detect which byte or bit moves when pressing a button, opening a door, turning lights on/off, or changing vehicle state.

The monitor window can also:

```text
Export CSV
Export JSON
Load a different BEAN-DBC decoder JSON
Reload the default decoder
Freeze updates
Filter rows
Show/hide unknown messages
```


### Opening Message Monitor

The fixed-row Message Monitor can be opened from:

```text
View -> Open Message Monitor
```

or from the `Message Monitor` button in the Live tab change-monitor toolbar.


## Adaptive UI / Small Screen Layout

BEANalyzer UltraPro includes adaptive layout helpers for laptops and low-height displays.

Useful options:

```text
View -> Compact top toolbar
View -> Fit window to screen
```

The top toolbar and Live-tab toolbar use horizontal scroll areas when the screen is not wide enough. The Live dashboard/table area is also split with a draggable divider, so the dashboard can be reduced and the frame table can use more vertical space.

Recommended for 2880x1080 or other low-height screens:

```text
1. View -> Compact top toolbar
2. Reduce Dashboard height to around 180-220
3. Reduce Cards min to around 80-100
4. Drag the Live splitter upward to give more room to the frame table
```


## Startup Splash Screen

BEANalyzer UltraPro includes a startup splash screen shown automatically before the main GUI appears.

Splash assets are stored in:

```text
assets/splashscreen.png
assets/app_icon.png
```

The splash screen is displayed for a short minimum time and then closes automatically when the main window is shown. The app also uses `assets/app_icon.png` as the application/window icon when available.

To replace the splash screen, keep the same filename:

```text
assets/splashscreen.png
```

Recommended splash aspect ratio:

```text
16:9
```


## v2.2 Fix Notes

- Fixed CSV replay compatibility with BEANalyzer CSV logs that include the `changes` column.
- Replay mode now supports BEAN and CAN rows from exported CSV logs.
- Replay mode now tolerates common CSV variants such as `raw`, `raw_hex`, `frame`, `payload_hex`, and CAN `ID#DATA` format.
- CAN frames are now also counted and exported consistently.
- Replay mode now validates the selected CSV path and reports skipped rows/errors in the Replay log.
- Updated application icon assets.
- macOS/Linux launchers and the macOS app executable are packaged with executable permissions.


## Help Menu

The application includes a top-level `Help` menu:

```text
Help -> Check for Updates...
Help -> About
```

`Check for Updates...` opens the AE&D website in the default system browser.
`About` opens a professional software information dialog with the BEANalyzer UltraPro icon, AE&D manufacturer logo, website link, version information, and © 2026 AE&D copyright notice.


## macOS About Menu Fix

Version 2.4 sets the Qt application identity to **BEANalyzer UltraPro** before the menu bar is created and adds a native macOS About action named **About BEANalyzer UltraPro**.

When the application is launched from the bundled `.app`, the macOS application menu should identify the program as BEANalyzer UltraPro. If the raw Python script is launched directly from Terminal, macOS may still show the interpreter process name in the very first system menu, but the application Help menu and About dialog remain branded correctly.


## v2.5 Startup / About Menu Fix

- Hardened the About menu role handling for different PySide6 builds.
- Removed a risky macOS launcher override that could cause the app to open and close immediately on some systems.
- Added runtime/crash logging under `~/Library/Application Support/BEANalyzer UltraPro/logs/` on macOS.
- Help -> About BEANalyzer UltraPro remains available, and Check for Updates opens https://aend-tech.com.


## BEANalyzer UltraPro v2.6 - CAN Gateway Monitor

This version adds a dedicated CAN Gateway Monitor window. It can be opened from:

```text
View -> Open CAN Gateway Monitor
Devices / CAN Gateway -> Open CAN Gateway Monitor
```

The CAN Gateway Monitor shows CAN RX/TX traffic in real time, including frames received from python-can hardware such as CANalyst-II, CANable/SLCAN, SocketCAN, PCAN, Kvaser, Vector, or virtual backends, plus frames sent through the Arduino CAN serial bridge.

The window includes:

```text
- Live RX/TX table
- Backend/source column
- CAN ID, extended flag, DLC and data bytes
- Raw CAN notation ID#DATA
- Per-ID counter
- Per-ID delta time
- CSV export
- JSON export
- Manual CAN transmit console
- Repetition count
- Delay between transmissions
- Continuous loop mode when Count = 0
```

The manual CAN transmit console can send through either:

```text
python-can
Arduino CAN serial bridge
```

For CANalyst-II, remember that it normally does not use a COM/tty serial port. Use the python-can backend with interface `canalystii`, device/channel configuration, and the selected bitrate.


## Replay BEAN stream

The Replay / Export tab now includes an optional **Enable BEAN stream** checkbox.

When enabled, BEAN frames from a CSV replay are transmitted through the connected Arduino BEAN bridge.

Expected TX format sent to the Arduino bridge:

```text
BTX,DID MID DATA...
```

BEANalyzer automatically removes typical captured BEAN trailer bytes such as `7E 40` or `7E 00`, because captured RX rows usually contain bus framing bytes while TX expects only the BEAN payload.

Use this only on a bench harness or controlled isolated network. Do not stream unknown logs into a live vehicle network without understanding the traffic.


## Replay ID/MID filter

The Replay / Export tab can scan a CSV log and build a Message-Monitor-style fixed list of replayable IDs/commands.

For BEAN MPX the filter key is:

```text
CTX + DID + MID
```

For CAN the filter key is:

```text
CAN arbitration ID
```

Workflow:

```text
1. Open CSV
2. Press Scan CSV IDs
3. Enable Replay filter
4. Check/uncheck the IDs or commands you want
5. Start replay
```

If **Enable BEAN stream** is also enabled, only the checked BEAN rows will be transmitted to the BEAN bridge.


## BEAN Protocol Tools v3.2

The `BEAN Protocol` tab adds low-level Toyota BEAN MPX utilities:

- Build a logical BEAN frame from `DST/MID/DATA`.
- Validate CRC-8/BEAN frames.
- Extract TX payload from captured BEANalyzer raw frames.
- Preview bit stuffing from SOF/header through CRC.
- Send the extracted/built payload through the connected Arduino BEAN bridge.

Protocol reference used by the tool:

```text
Bitrate: 10 kbit/s
Levels: 12V = 1, 0V = 0
Header: PRI(4 bits) + ML(4 bits)
ML: length of DST-ID + MES-ID + DATA
CRC-8/BEAN: poly 0x13, init 0x00, refin false, refout false, xorout 0x00
EOM: 0x7E
Bit stuffing: after five equal bits, insert one inverted bit
Reference check: CRC8(13 FE 24 00) = B4
```

The default BEAN-DBC also includes extra TX templates from the BeanTransmitter reference, including examples for outside temperature, fuel, ABS/VSC, ECT, gear, engine temperature, lights and SRS.


## BEAN Data Link Layer v3.3

The BEAN Protocol tab now shows a more accurate data link layer interpretation:

```text
Access method: CSMA/CD with bit-wise arbitration
Error check: 8-bit CRC
Response: ACK / NAK
DATA length: 1..11 bytes
```

Frame layout:

```text
SOF | PRI | ML | DST-ID | MES-ID | DATA1..11 | CRC8 | EOM | RSP | EOF | IFS | IDL
```

Important rule:

```text
ML = length of DST-ID + MES-ID + DATA
DATA length = ML - 2
Normal ML range = 3..13
```

The validator now displays post-EOM raw byte, RSP candidate bits and EOF candidate bits. The exact ACK/NAK mapping still needs validation with the specific sniffer/firmware alignment.


## Manual TX bridge payload examples v3.4

The Manual TX examples were corrected for the Arduino BeanMPX bridge used by BEANalyzer.

Manual TX sends the BEAN payload exactly as written after `BTX,`.

For this bridge, dashboard commands normally use `0x62` as the first byte:

```text
62 D2 10 00 00
```

Low-level physical BEAN reference payloads using destination `0xFE`, such as:

```text
FE D2 10
```

are protocol-level examples and may not work with the Arduino BeanMPX bridge firmware.

Correct Manual TX examples now use:

```text
62 CD 49
62 D2 10 00 00
62 D4 20 00 00
62 A4 75 00 75
62 91 A0 00 00
```


## BEAN-DBC Editor Test Mode v3.5

The BEAN-DBC Editor now includes a **Selected command test** panel.

When a DBC message is selected, its `tx_templates` are loaded into a template selector. The test panel prefers `bridge_payload` because Manual TX and the Arduino BeanMPX bridge send the bytes exactly as written after `BTX,`.

Workflow:

```text
1. Connect BEAN.
2. Open BEAN-DBC Editor.
3. Select a message.
4. Choose a TX template.
5. Press Load template.
6. Set Repetitions and Delay.
7. Press Start Test.
8. Press Stop Test to stop a continuous loop.
```

Repetitions:

```text
1 = send once
10 = send ten times
0 = continuous loop until Stop Test
```

Template fields:

```json
{
  "name": "SNOW icon",
  "payload": "FE D2 10",
  "bridge_payload": "62 D2 10 00 00",
  "low_level_payload": "FE D2 10"
}
```

Use `bridge_payload` for real testing with the Arduino BeanMPX bridge. Use `low_level_payload` only as protocol reference.


## BEAN-DBC Editor UI and Template Fix v3.6

The BEAN-DBC Editor now normalizes old and new TX template formats.

Supported template formats:

```json
{"name": "SNOW", "bytes": ["62", "D2", "10", "00", "00"]}
{"name": "SNOW", "payload": "62 D2 10 00 00"}
{"name": "SNOW", "payload": "FE D2 10", "bridge_payload": "62 D2 10 00 00"}
["62", "D2", "10", "00", "00"]
"62 D2 10 00 00"
```

The Selected command test panel now prefers:

```text
bridge_payload
```

and falls back to:

```text
payload
```

Low-level physical BEAN templates beginning with `FE` are automatically converted to a bridge payload beginning with `62` when possible.

The DBC editor layout was also improved with larger table columns, larger Signals/TX template editors, and a wider right-side editor area.


## BEAN-DBC Editor Pro UI v3.7

The BEAN-DBC Editor has been reorganized into separate sub-tabs:

```text
Message / Test
Signals
TX Templates
Raw DBC JSON
```

This prevents the editor from being vertically compressed on laptop displays and makes the database easier to edit.

The message form now supports editing:

```text
Name
DID / DST-ID
MID / MES-ID
Category
Function
Source ECU / candidate
Doc status
Example / observed frame
Notes
References
Signals JSON
TX templates JSON
Raw full DBC JSON
```

Notes and references can be edited directly from the Message / Test tab. Advanced or custom fields can still be edited in the Raw DBC JSON tab.


## BEAN-DBC Command Preview and Template Completion v3.8

The BEAN-DBC database and editor were improved:

- Every default DBC message now has a DID / DST-ID.
- Every default DBC message now has at least one TX template.
- The editor now shows a **Full command preview**.
- The preview shows the exact bridge command sent to the Arduino BeanMPX bridge:

```text
BTX,62 D2 10 00 00
```

- When a low-level payload is available, the preview also shows a logical BEAN frame with header, CRC and EOM:

```text
23 FE CD 49 CRC 7E
```

- Missing DID/DST-ID values are auto-filled from low-level templates, observed frames or conservative protocol defaults.
- Candidate templates were added for documented but not yet validated MIDs, marked as candidates/placeholders where appropriate.

This makes the BEAN-DBC usable both as a decoder database and as a practical command/testing database.


## DBC Reset on Stop v3.9

The BEAN-DBC Editor Selected command test panel now supports reset/clear commands.

New controls:

```text
Reset on Stop
Reset payload
Send reset
```

When **Stop Test** is pressed and **Reset on Stop** is enabled, BEANalyzer sends a reset payload after stopping the loop.

If a template defines `reset_payload`, that value is used.

Example:

```json
{
  "name": "IS200 SNOW",
  "bridge_payload": "62 D2 10 00 00",
  "reset_payload": "62 D2 00 00 00"
}
```

If `reset_payload` is missing, BEANalyzer auto-generates a reset payload by keeping the bridge prefix and MID and clearing all data bytes:

```text
62 D2 10 00 00 -> 62 D2 00 00 00
62 D4 20 00 00 -> 62 D4 00 00 00
62 7A E3       -> 62 7A 00
```

This prevents dashboard indicators or test states from staying active after stopping a test.


## BEAN-DBC Scrollable Editor v4.0

The BEAN-DBC Editor has been updated for smaller and low-height screens.

The following internal tabs now use scrollable content areas:

```text
Message / Test
Signals
TX Templates
```

This prevents fields from being crushed when the window height is limited.

The Message / Test tab now supports both vertical and horizontal scrolling inside its own area, so large metadata blocks, reset controls and full command previews remain accessible.

The left message table was also slightly compacted to give more room to the editor side.


## Real IS200 Log Decoder Fix v4.1

This update was created after analyzing a real Lexus IS200 BEAN MPX log captured with BEANalyzer.

Important parser fix:

```text
01 HEADER DST-ID MES-ID DATA... CRC 7E POST
```

The decoder now parses the BEAN data link layer correctly:

```text
HEADER = PRI + ML
ML = DST-ID + MES-ID + DATA length
DATA length = ML - 2
CRC is validated
Only real DATA bytes are passed to the BEAN-DBC decoder
```

This fixes a previous issue where CRC/EOM/Post-EOM bytes could be treated as DATA.

Example:

```text
01 53 FE 24 00 67 7E 40
```

Correct interpretation:

```text
HEADER = 0x53
DST-ID = FE
MES-ID = 24
DATA = 00
CRC = 67
EOM = 7E
POST = 40
```

Previous builds could incorrectly decode `0x67` as a second data byte / meter flags. v4.1 prevents that.

New/candidate DBC entries were added from the real log, including DST/MID pairs such as:

```text
62/20
FE/CC
13/D6
98/F8
40/AF
FE/1E
FE/1F
FE/53
FE/54
FE/55
62/D2
```

The package also includes:

```text
Real_IS200_Log_Analysis_v4_1.txt
```


## Real Event Analyzer v4.2

BEANalyzer now includes a real event analysis workflow based on real Lexus IS200 BEAN MPX logs.

### Live Event Markers

The Live tab includes event marker controls. Markers can be written into the live table and CSV log while recording.

Preset markers:

```text
Engine OFF
Driver door open
Driver door closed
Remote lock
Remote unlock
Custom
```

### Physical CSV fields

CSV export now includes BEAN physical/link-layer fields:

```text
capture_marker
bean_header
priority
ml
data_len
dst_id
mes_id
crc
crc_ok
eom
post_eom
rsp_candidate
eof_candidate
event_marker
```

These fields prevent CRC/EOM/Post-EOM bytes from being confused with real DATA.

### Event Analyzer

The Event Analyzer tab can analyze either the active session or an existing CSV log.

It reports:

```text
Top DID/MID messages by count
CRC OK/BAD summary
Candidate event timeline
SNOW transitions
Driver door candidate transitions
Body/door/remote candidate transitions
Remote/key pulse candidates
Motor/IGN stream hints
DBC suggestions
```

### New DBC candidates

The default DBC now includes additional candidates discovered from the real IS200 log:

```text
FE/DB driver door status candidate
FE/DF body / door / remote status candidate
FE/E4 lights / key / remote pulse candidate
FE/1E remote/key/lock pulse candidate
FE/1F small body/key flags candidate
FE/CC unknown live value candidate
13/D6 unknown slowly changing value
98/F8 unknown status flags
40/AF unknown alive/status
FE/D7 climate relay/state candidate
40/52 unknown fixed status
FE/EF rare candidate
```


## Event Marker UI v4.3

The Live tab event marker controls were moved out of the crowded table toolbar.

Event markers now have their own dedicated row with larger fields:

```text
Marker preset
Optional custom marker text
Add marker
Quick marker buttons
```

Quick marker buttons:

```text
Engine OFF
Door open
Door closed
Remote lock
Remote unlock
```

The event marker row is horizontally scrollable when the window is narrow, instead of crushing the input fields.


## Units Menu v4.4

BEANalyzer now includes a top menu called **Units**.

Available modes:

```text
Metric
Imperial
Raw ECU / decoded
```

The unit mode is applied as a display layer. The decoder can keep ECU/base values in their original form while the UI converts user-facing values.

Examples:

```text
km/h  -> mph
°C    -> °F
km    -> miles
L/100km -> mpg US
km/L -> mpg US
L/h -> gal/h US
```

Raw display modes still use the original bytes:

```text
Raw decimal
Raw hex
Binary
```

This is important because Toyota/Lexus ECUs may stream a base value while the dashboard or display ECU applies a firmware conversion for the target market.


## Force Imperial Units v4.5

The Units menu now includes:

```text
Force Imperial Units
```

This mode assumes Toyota/Lexus bus values are metric/base ECU values and forces metric-to-imperial display conversion when the signal name clearly represents a measurable value.

This is useful when the vehicle likely transmits a base value internally and the dashboard/display ECU performs the final user-facing conversion in firmware.

The Units info dialog was also fixed so newline formatting displays correctly.


## Replay Loop Mode v4.6

Replay behavior was clarified and improved.

Default behavior:

```text
Start replay = play the selected CSV once and stop automatically
```

New option:

```text
Loop Mode
```

When Loop Mode is enabled, replay repeats the CSV continuously until **Stop replay** is pressed.

Loop Mode works with:

```text
visual/log replay
BEAN stream replay
replay filters
speed multiplier
```

Safety note: when BEAN stream is enabled, Loop Mode will continuously transmit replayed BEAN frames until stopped. Use only on a bench harness or controlled isolated network.


## v4.13 Stable Replay + Derived Fuel + Old CSV Compatibility

Replay code is unchanged from v4.11/v4.6. Derived fuel consumption is added correctly in the main UI signal path. A converter script is included for older CSVs where the data column contains DATA+CRC+EOM+Post-EOM.


## Message Monitor Physical Columns v4.15

The Message Monitor RAW column is plain text again.

Instead of coloring individual RAW bytes inside the RAW string, Message Monitor now exposes the BEAN physical/link-layer parts as separate columns:

```text
Capture
Header
PRI
ML
DataLen
DST
MES
CRC
CRC OK
EOM
Post-EOM
RSP
EOF
```

The B0-B15 payload columns still highlight changed payload bytes in red with fade.

### Column visibility menu

Right-click the table header to open a show/hide column menu.

Checked columns are visible. Unchecked columns are hidden.

Quick actions:

```text
Show all columns
Hide BEAN physical fields
Show BEAN physical fields
Compact default view
```


## Visible Fuel Consumption Cards v4.16

Derived fuel consumption cards are shown in the Live dashboard selector after the required live signals are decoded.

Calculated cards:

```text
fuel_consumption_l_100km
fuel_consumption_mpg_us
```

Formula:

```text
L/100km = (L/h / km/h) × 100
MPG US = 235.214583 / L/100km
```

Required decoded values:

```text
speed
fuel_rate_lh or fuel_rate_lh_candidate
```

The calculation also accepts any numeric signal with unit `L/h` when the signal name clearly represents fuel rate or fuel consumption.

Use:

```text
Units > Metric
Units > Imperial
Units > Force Imperial Units
```

to control how the calculated values are displayed.


## Integer RPM Display v4.17

RPM values are displayed without decimals.

Example:

```text
2509.96 rpm -> 2510 rpm
```

This applies to decoded UI text, dashboard cards and Message Monitor.

Raw decimal / raw hex / binary views still show original raw data.


## Live Table Column Visibility v4.18

The Live table now supports column visibility control.

Right-click the Live table header to open the column menu.

Checked columns are visible. Unchecked columns are hidden.

Quick presets:

```text
Show all columns
Compact default view
Essential live view
Decoded focus view
Raw/debug focus view
```


## Trip Computer v4.19

BEANalyzer now includes a top menu called **Trip Computer**.

### Menu options

```text
Reset Fuel Level Average
Reset Remaining Fuel Estimate
Reset Consumption Average
Reset Range Estimate
Reset All Trip Calculations
Pause Calculations
Resume Calculations
Trip Calculation Settings...
Trip Computer Info...
```

### Derived values

```text
fuel_raw_avg_10s
fuel_remaining_percent
fuel_remaining_liters
instant_l_100km
avg_l_100km_60s
fuel_consumption_l_100km
fuel_consumption_mpg_us
estimated_range_km
estimated_range_miles
safe_range_km
safe_range_miles
```

### Lexus IS200 defaults

```text
Tank capacity: 70 L
Fuel raw empty: 153
Fuel raw full: 40
Fuel level average window: 10 s
Consumption average window: 60 s
Minimum speed for L/100km: 5 km/h
```

The fuel sender is inverted:

```text
More raw = less fuel
Less raw = more fuel
```

### Main formulas

```text
fuel_percent = (153 - fuel_raw_avg) / (153 - 40)
fuel_liters = fuel_percent × 70
instant_l_100km = (fuel_rate_lh / speed_kmh) × 100
estimated_range_km = (fuel_remaining_liters / avg_l_100km_60s) × 100
```


## Windows UI Fix v4.20

The Windows UI theme has been reworked for readability.

Fixes:

```text
Missing import os
Grey backgrounds with unreadable white text
Oversized native Windows scrollbars
Inconsistent native widget colors
Low-contrast menus/context menus
Low-contrast table headers
```

The app now forces Qt Fusion style and applies a stronger dark stylesheet with compact scrollbars.


## Adaptive UI Scale v4.21

BEANalyzer now adapts the UI scale to the screen resolution.

Use:

```text
View > UI Scale
```

Available modes:

```text
Auto
Compact / Low Resolution
Normal
Large
```

Auto mode is designed for:

```text
1366x768 laptops -> compact UI
1920x1080 laptops/desktops -> normal UI
2560x1440 or higher -> slightly larger UI
```

Compact mode reduces font size, padding, scrollbar thickness, table row height and dashboard panel height to make the interface more usable on smaller screens.


## Checkbox Visibility Fix v4.22

Windows dark theme checkbox visibility has been improved.

Changed widgets:

```text
QCheckBox
QRadioButton
QListWidget checkboxes
QMenu check indicators
```

Unchecked boxes now have a visible border. Checked boxes use a high-contrast cyan fill.
