What i require is putting data into an existing can broadcast for $1A1. I have found the routines for byte 0 & byte 1, but i need to have data sent out on byte 2 for the park neutral switch status & Validity.
At the raw can level, sending 00 00 41 seems to be what i need to send when in gear & 00 00 01 when in park/neutral. Ignore the first 2 byte blocks I'm just using 0's as example, the ecu does in fact update those 2 first blocks.
Byte 0 C-code Breakdown Byte 1 C-code Breakdown 1A1 Function C-Code What I'm hoping we can do is just edit the existing 1A1 function to include the 2nd byte count by utilizing an existing switch in ram to set the above PN state.
VbTRGI_TransGearEngagState
Remember I have no coding experience, but I'm assuming it would be something like this eventually.
1A1 Function C-Code
Byte 2 - C-codeuVar1 = BYTE_BuildENGN_y_1A1_Byte0();
*extraout_A1 = uVar1;
uVar1 = BYTE_BuildENGN_y_1A1_Byte1();
*(undefined1 *)(extraout_A1_00 + 1) = uVar1;
uVar1 = BYTE_BuildENGN_y_1A1_Byte2();
*(undefined1 *)(extraout_A1_00 + 2) = Uvar1;
*(undefined1 *)(extraout_A1_00 + 3) = 0;
*(undefined1 *)(extraout_A1_00 + 4) = 0;
*(undefined1 *)(extraout_A1_00 + 5) = 0;
*(undefined1 *)(extraout_A1_00 + 6) = 0;
*(undefined1 *)(extraout_A1_00 + 7) = 0;
return;
Or Just:uint BYTE_BuildENGN_y_1A1_Byte2(void)
{
uint uVar1;
if (_VbTRGI_TransGearEngagState != 1) {
uVar1 = uVar1 | x40;
}
else {
uVar1 = 0;
}
return uVar1;
This method just transmits fixed data?uVar1 = BYTE_BuildENGN_y_1A1_Byte0();
*extraout_A1 = uVar1;
uVar1 = BYTE_BuildENGN_y_1A1_Byte1();
*(undefined1 *)(extraout_A1_00 + 1) = uVar1;
*(undefined1 *)(extraout_A1_00 + 2) = 41;
*(undefined1 *)(extraout_A1_00 + 3) = 0;
*(undefined1 *)(extraout_A1_00 + 4) = 0;
*(undefined1 *)(extraout_A1_00 + 5) = 0;
*(undefined1 *)(extraout_A1_00 + 6) = 0;
*(undefined1 *)(extraout_A1_00 + 7) = 0;
return;
