New pin mappings for wiring optimization

This commit is contained in:
Oskar Winkels 2025-03-29 15:32:43 +01:00
parent 8e62180537
commit eb994ad693
Signed by: o.winkels
GPG Key ID: E7484A06E99DAEF1

View File

@ -1,7 +1,7 @@
#ifndef MAPPINGS_H #ifndef MAPPINGS_H
#define MAPPINGS_H #define MAPPINGS_H
// CHOOSE ONE, comment the other // CHOOSE ONE, comment the other or comment both and use -D SN_FRONT
#define SN_FRONT #define SN_FRONT
#define SN_REAR #define SN_REAR
@ -79,37 +79,36 @@ typedef struct {
static can_pkt_t CAN_SIGNAL_MAP[4] { static can_pkt_t CAN_SIGNAL_MAP[4] {
{ {
.can_id = 0x0D1, .dlc = 3, .num_signals = 7, .period = 100, .signals = { .can_id = 0x0D1, .dlc = 3, .num_signals = 7, .period = 100, .signals = {
{ .type = DIN, .channel = L9, .start = 0, .length = 1, .factor = 1., .name = "LS L" }, { .type = DIN, .channel = R5, .start = 0, .length = 1, .factor = 1., .name = "LS L" },
{ .type = DIN, .channel = LC, .start = 1, .length = 1, .factor = 1., .name = "LS R" }, { .type = DIN, .channel = L9, .start = 1, .length = 1, .factor = 1., .name = "LS R" },
{ .type = DIN, .channel = R5, .start = 2, .length = 1, .factor = 1., .name = "SDC M pre BOTS" }, { .type = DIN, .channel = LA, .start = 2, .length = 1, .factor = 1., .name = "SDC M pre BOTS" },
{ .type = DIN, .channel = R6, .start = 3, .length = 1, .factor = 1., .name = "SDC M post INS" }, { .type = DIN, .channel = LC, .start = 3, .length = 1, .factor = 1., .name = "SDC M post INS" },
{ .type = DIN, .channel = R7, .start = 4, .length = 1, .factor = 1., .name = "SDC M post BSPD" }, { .type = DIN, .channel = R7, .start = 4, .length = 1, .factor = 1., .name = "SDC M post BSPD" },
{ .type = AIN, .channel = RD, .start = 8, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS FL" }, { .type = AIN, .channel = R0, .start = 8, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS FL" },
{ .type = AIN, .channel = RF, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS FR" }, { .type = AIN, .channel = L8, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS FR" },
} }
}, },
{ {
.can_id = 0x0D3, .dlc = 7, .num_signals = 6, .period = 10, .signals = { .can_id = 0x0D3, .dlc = 7, .num_signals = 6, .period = 10, .signals = {
{ .type = AIN, .channel = R9, .start = 0, .length = 8, .factor = (256./ADQ), .name = "APPS 1" }, { .type = AIN, .channel = L1, .start = 0, .length = 8, .factor = (256./ADQ), .name = "APPS 1" },
{ .type = AIN, .channel = L2, .start = 8, .length = 8, .factor = (256./ADQ), .name = "APPS 2" }, { .type = AIN, .channel = L2, .start = 8, .length = 8, .factor = (256./ADQ), .name = "APPS 2" },
{ .type = AIN, .channel = RB, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BP F" }, { .type = AIN, .channel = RA, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BP F" },
{ .type = AIN, .channel = L1, .start = 24, .length = 12, .factor = 1., .name = "SAS" }, { .type = AIN, .channel = R9, .start = 24, .length = 12, .factor = 1., .name = "SAS" },
{ .type = FIN, .channel = LB, .start = 40, .length = 8, .factor = 1., .name = "WSS FL" }, { .type = FIN, .channel = R8, .start = 40, .length = 8, .factor = 1., .name = "WSS FL" },
{ .type = FIN, .channel = R8, .start = 48, .length = 8, .factor = 1., .name = "WSS FR" }, { .type = FIN, .channel = LB, .start = 48, .length = 8, .factor = 1., .name = "WSS FR" },
} }
}, },
{ {
.can_id = 0x0D5, .dlc = 3, .num_signals = 2, .period = 10, .signals = { .can_id = 0x0D5, .dlc = 3, .num_signals = 2, .period = 10, .signals = {
{ .type = AIN, .channel = RA, .start = 0, .length = 12, .factor = 1., .name = "DS FL" }, { .type = AIN, .channel = RC, .start = 0, .length = 12, .factor = 1., .name = "DS FL" },
{ .type = AIN, .channel = RC, .start = 12, .length = 12, .factor = 1., .name = "DS FR" }, { .type = AIN, .channel = L4, .start = 12, .length = 12, .factor = 1., .name = "DS FR" },
} }
}, },
{ {
.can_id = 0x0D7, .dlc = 3, .num_signals = 2, .period = 1, .signals = { .can_id = 0x0D7, .dlc = 3, .num_signals = 2, .period = 1, .signals = {
{ .type = AIN, .channel = RE, .start = 0, .length = 12, .factor = 1., .name = "SLS FL" }, { .type = AIN, .channel = RE, .start = 0, .length = 12, .factor = 1., .name = "SLS FL" },
{ .type = AIN, .channel = R0, .start = 12, .length = 12, .factor = 1., .name = "SLS FR" }, { .type = AIN, .channel = L6, .start = 12, .length = 12, .factor = 1., .name = "SLS FR" },
} }
} }
}; };
@ -121,37 +120,37 @@ static can_pkt_t CAN_SIGNAL_MAP[4] {
static can_pkt_t CAN_SIGNAL_MAP[4] { static can_pkt_t CAN_SIGNAL_MAP[4] {
{ {
.can_id = 0x0D2, .dlc = 7, .num_signals = 9, .period = 100, .signals = { .can_id = 0x0D2, .dlc = 7, .num_signals = 9, .period = 100, .signals = {
{ .type = DIN, .channel = R7, .start = 0, .length = 1, .factor = 1., .name = "ExtTSOn" }, { .type = DIN, .channel = L9, .start = 0, .length = 1, .factor = 1., .name = "ExtTSOn" },
{ .type = DIN, .channel = L9, .start = 1, .length = 1, .factor = 1., .name = "SDC M pre TSMS" }, { .type = DIN, .channel = LA, .start = 1, .length = 1, .factor = 1., .name = "SDC M pre TSMS" },
{ .type = DIN, .channel = LA, .start = 2, .length = 1, .factor = 1., .name = "SDC M post TSMS" }, { .type = DIN, .channel = LC, .start = 2, .length = 1, .factor = 1., .name = "SDC M post TSMS" },
{ .type = AIN, .channel = RD, .start = 8, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS RL" }, { .type = AIN, .channel = R0, .start = 8, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS RL" },
{ .type = AIN, .channel = RF, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS RR" }, { .type = AIN, .channel = L8, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BDTS RR" },
{ .type = AIN, .channel = R9, .start = 24, .length = 8, .factor = (256./ADQ), .name = "WT BAT" }, { .type = AIN, .channel = R9, .start = 24, .length = 8, .factor = (256./ADQ), .name = "WT BAT" },
{ .type = AIN, .channel = L1, .start = 32, .length = 8, .factor = (256./ADQ), .name = "WT DT" }, { .type = AIN, .channel = RB, .start = 32, .length = 8, .factor = (256./ADQ), .name = "WT DT" },
{ .type = AIN, .channel = L2, .start = 40, .length = 8, .factor = (256./ADQ), .name = "WP BAT" }, { .type = AIN, .channel = RD, .start = 40, .length = 8, .factor = (256./ADQ), .name = "WP BAT" },
{ .type = AIN, .channel = L4, .start = 48, .length = 8, .factor = (256./ADQ), .name = "WP DT" }, { .type = AIN, .channel = RF, .start = 48, .length = 8, .factor = (256./ADQ), .name = "WP DT" },
} }
}, },
{ {
.can_id = 0x0D4, .dlc = 8, .num_signals = 7, .period = 10, .signals = { .can_id = 0x0D4, .dlc = 8, .num_signals = 7, .period = 10, .signals = {
{ .type = AIN, .channel = L3, .start = 0, .length = 8, .factor = ((25.6/.1)/ADQ), .name = "EBS APS 1" }, { .type = AIN, .channel = L1, .start = 0, .length = 8, .factor = ((25.6/.1)/ADQ), .name = "EBS APS 1" },
{ .type = AIN, .channel = L6, .start = 8, .length = 8, .factor = ((25.6/.1)/ADQ), .name = "EBS APS 2" }, { .type = AIN, .channel = L2, .start = 8, .length = 8, .factor = ((25.6/.1)/ADQ), .name = "EBS APS 2" },
{ .type = AIN, .channel = RB, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BP F" }, { .type = AIN, .channel = RA, .start = 16, .length = 8, .factor = ((512./2)/ADQ), .name = "BP F" },
{ .type = FIN, .channel = LB, .start = 24, .length = 8, .factor = 1., .name = "WSS RL" }, { .type = FIN, .channel = R8, .start = 24, .length = 8, .factor = 1., .name = "WSS RL" },
{ .type = FIN, .channel = R8, .start = 32, .length = 8, .factor = 1., .name = "WSS RR" }, { .type = FIN, .channel = LB, .start = 32, .length = 8, .factor = 1., .name = "WSS RR" },
{ .type = AIN, .channel = RA, .start = 40, .length = 12, .factor = 1., .name = "DS RL" }, { .type = AIN, .channel = RC, .start = 40, .length = 12, .factor = 1., .name = "DS RL" },
{ .type = AIN, .channel = RC, .start = 52, .length = 12, .factor = 1., .name = "DS RR" }, { .type = AIN, .channel = L4, .start = 52, .length = 12, .factor = 1., .name = "DS RR" },
} }
}, },
{ {
.can_id = 0x0D6, .dlc = 0, .num_signals = 0, .period = 10, .signals = {} .can_id = 0x0D6, .dlc = 0, .num_signals = -1, .period = 10, .signals = {}
}, },
{ {
.can_id = 0x0D8, .dlc = 3, .num_signals = 2, .period = 1, .signals = { .can_id = 0x0D8, .dlc = 3, .num_signals = 2, .period = 1, .signals = {
{ .type = AIN, .channel = RE, .start = 0, .length = 12, .factor = 1., .name = "SLS RL" }, { .type = AIN, .channel = RE, .start = 0, .length = 12, .factor = 1., .name = "SLS RL" },
{ .type = AIN, .channel = R0, .start = 12, .length = 12, .factor = 1., .name = "SLS RR" }, { .type = AIN, .channel = L6, .start = 12, .length = 12, .factor = 1., .name = "SLS RR" },
} }
} }
}; };