Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Ford checksums #701

Closed
wants to merge 2 commits into from
Closed

support Ford checksums #701

wants to merge 2 commits into from

Conversation

incognitojam
Copy link
Contributor

@incognitojam incognitojam commented Sep 2, 2022

WIP

  • Ford checksums are named "SignalName_Cs" and counters are named "SignalName_Cnt"
  • The checksum algorithm and byte position changes for each message
  • Ford also sometimes has multiple checksums in one message...

example (although I can't see this message on the bus anyway):

BO_ 931 Body_Info_9_FD1: 8 GWM
 SG_ PtWakeReas_D_Stat : 38|4@0+ (1,0) [0|15] "SED"  PCM_HEV
 SG_ VehOnSrc_D_Stat : 19|4@0+ (1,0) [0|15] "SED"  ABS_ESC,PCM_HEV,ECM_Diesel,PCM
 SG_ StrtrMtrCtlDStat_No_Cs : 31|8@0+ (1,0) [0|255] "unitless"  PCM_HEV,ECM_Diesel,PCM
 SG_ EngStrtActv_B_Stat : 39|1@0+ (1,0) [0|1] "SED"  PCM_HEV,ECM_Diesel,PCM
 SG_ EngStrt_B_Rq : 0|1@0+ (1,0) [0|1] "SED"  PCM_HEV,ECM_Diesel,PCM
 SG_ DrvInCtl_B_Stat : 1|1@0+ (1,0) [0|1] "SED"  ECM_Diesel,PCM,PCM_HEV
 SG_ AdvStrt_D_Stat : 23|4@0+ (1,0) [0|15] "SED"  PCM_HEV,ECM_Diesel,PCM
 SG_ CrnkInhbt_No_Cs : 15|8@0+ (1,0) [0|255] "Unitless"  ECM_Diesel,PCM,PCM_HEV
 SG_ CrnkInhbt_No_Cnt : 6|4@0+ (1,0) [0|15] "Unitless"  ECM_Diesel,PCM,PCM_HEV
 SG_ CrnkInhbt_B_Stat : 7|1@0+ (1,0) [0|1] "SED"  ECM_Diesel,PCM,PCM_HEV
 SG_ IgnPreOffActv_B_Stat : 2|1@0+ (1,0) [0|1] "SED"  PCM,PCM_HEV,TCM_DSL

}
return s;
}

void set_signal_type(Signal& s, ChecksumState* chk, const std::string& dbc_name, int line_num) {
s.calc_checksum = nullptr;
if (chk) {
if (s.name == "CHECKSUM") {
if (s.name == "CHECKSUM" || endswith(s.name, "_Cs")) {
Copy link
Collaborator

@jyoung8607 jyoung8607 Sep 2, 2022

Choose a reason for hiding this comment

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

There's been discussions about this sort of thing for other manufacturers where the canonical signal names were known. The most recent I'm aware of is in #633. TL;DR: the fast (and consistent with other ports) thing is to rename your signals, the right thing would be creating support for tagging the existing signals in a to-be-determined manner.

@incognitojam incognitojam deleted the ford-checksum branch January 13, 2023 21:33
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