Skip to content

Implement more CAN protocols#33

Draft
xtitoris wants to merge 3 commits into
dron0gus:masterfrom
xtitoris:more-can-protocols-merge
Draft

Implement more CAN protocols#33
xtitoris wants to merge 3 commits into
dron0gus:masterfrom
xtitoris:more-can-protocols-merge

Conversation

@xtitoris

@xtitoris xtitoris commented Feb 7, 2026

Copy link
Copy Markdown

Implemented more CAN protocols both for AFR and EGT to make the module useable with other kinds of ECUs.
Would appreciate any thoughts on this. Tried to make it as backwards-compatible as possible.

There's an issue with AEM EGT protocol - the selected ID and message is tied to AEM EGT Gauge 1800F (30-0305) with address of 0x000A0305, which is single channel, and does not support additional messages.
In fact, 0x000A0306 is an AEM Boost Gauge 50psia (30-0306)
Better thing to implement would be 30-2224 8 channel k-type module
https://documents.aemelectronics.com/techlibrary_30-2224-_8-channel-k-type-can-module-instructions.pdf
But currently this breaks backward compatibility.

Tried to make TS UI as user-friendly as possible, while respecting the data memory layouts.

Branch with latest rusefi changes:
https://github.com/xtitoris/wideband/tree/more-can-protocols

@xtitoris

xtitoris commented Feb 8, 2026

Copy link
Copy Markdown
Author

Doesn't build at the moment, because its dependent on more recent rusefi changes.
But this PR is more for review/discussion.

Comment thread firmware/boards/port.h
Comment on lines +138 to +139
uint8_t NoLongerUsed0 : 6 = 0;
uint8_t CanMode : 2;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

TunerStudio tune file stores the values referenced by name.
So if firmware and ini file are updated, fw will load default values, and TS will restore everything by name, allowing us to repurpose the first byte.

As a side note, to allow seamless upgrades, we could remap CanIndexOffset from old ini file to new RusEfiIdOffset0 address, allowing TS to restore old values to new location.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think less than 1% of users ever update FW. This 1% is qualified enough to do manual settings migration :)

Comment thread firmware/boards/port.h
uint8_t pad[5];
uint8_t ExtraCanIdOffset;
uint8_t Reserved[5];
} egt[2];

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

As far as my research goes, every commercial thermocouple-to-can device sends 4 values per can bus message, so it does not really make sense to have separate settings per channel.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yep.
But in RusEFI we have implemented AEM 30-0305 - like protocol. Which is single channel. And we supporting up to 6 CAN EGT on 0x000A0305 + N addresses.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Understood.
Added 0305 back in, added support in TS ini to set separate offsets for this particular protocol

@xtitoris xtitoris force-pushed the more-can-protocols-merge branch from 748c4b9 to b6fea28 Compare February 8, 2026 10:48
Comment thread firmware/boards/port.h Outdated
Comment thread firmware/can/can_haltech.cpp Outdated
@xtitoris xtitoris force-pushed the more-can-protocols-merge branch from b6fea28 to c9d135f Compare February 8, 2026 11:49
@xtitoris

xtitoris commented Feb 9, 2026

Copy link
Copy Markdown
Author

@rusefillc
rusefi#37

@xtitoris xtitoris force-pushed the more-can-protocols-merge branch from f5d5202 to cea7a59 Compare February 18, 2026 05:26
@xtitoris xtitoris force-pushed the more-can-protocols-merge branch from c6ef6fe to 4676508 Compare February 18, 2026 13:49
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.

2 participants