"Arduino" "C++" "AEM" "infinity"

I have seen this code at the bottom of arduino examples. I am unsure of how to go about editing this portion of code. Notice commented out it says little Endian. How would one go about changing this to Big Endian?

void SendCANFrameToSerial(unsigned long canFrameId, const byte* frameData)
{
  // the 4 byte identifier at the beginning of each CAN frame
  // this is required for RealDash to 'catch-up' on ongoing stream of CAN frames
  const byte serialBlockTag[4] = { 0x44, 0x33, 0x22, 0x11 };
  Serial1.write(serialBlockTag, 4);

  // the CAN frame id number (as 32bit little endian value)
  Serial1.write((const byte*)&canFrameId, 4);

  // CAN frame payload
  Serial1.write(frameData, 8);
}

Currently what i’m using:

void SendCANFramesToSerial(unsigned long canFrameId, const byte* frameData)
{
  // the 4 byte identifier at the beginning of each CAN frame
  // this is required for RealDash to 'catch-up' on ongoing stream of CAN frames
  const unsigned long serialBlockTag = 0x11223344;
  Serial.write((const byte*)&serialBlockTag, 4);

  // the CAN frame id number
  Serial.write((const byte*)&canFrameId, 4);

  // CAN frame payload
  Serial.write(frameData, 8);
}

If the device that code is compiled to is Little Endian, both will work equally well. The main point is that RealDash expects the TAG value to be in little endian, and does not recognize the stream if it is not.

Thanks you for clarifying that. So far I have the 11inch android working great with AEM Infinity and arduino uno. I just need to get all the boolean values working and then it’s done. It’s working good enough to install into the car.
Once it’s done I will post. Because the both the xml and arduino examples have changed quite a bit.