Bug in ethernet

found some bugs in ethernet.

first arduino code:

// Send Data to AOG
#if (EtherNet)
  int temp;
  
  //actual steer angle
  temp = (int)(100 * steerAngleActual);
  toSend[2] = (byte)(temp >> 8);
  toSend[3] = (byte)(temp);
  
  //heading  
  #if BNO_Installed
     temp = IMU.euler.head;       //heading in degrees * 16 from BNO
  #else
     temp = 9999;                 //No IMU installed
  #endif
  
  toSend[4] = (byte)(temp >> 8);
  toSend[5] = (byte)(temp);
  
  //Vehicle roll --- * 16 in degrees
  #if Inclinometer_Installed !=0
    temp =(int)XeRoll;          //roll in degrees * 16
  #else
    temp =9999;                 //no Dogs installed
  #endif
 
  toSend[6] = (byte)(temp >> 8);
  toSend[7] = (byte)(temp);
      
  //switch byte
  toSend[8] = switchByte;

  //pwm value
  toSend[9] = pwmDisplay;

  //off to AOG
  ether.sendUdp(toSend, sizeof(toSend), portMy, ipDestination, portDestination);

then the parsing in agopen:

             switch (port)
                   {
                //autosteer
                  case 5577:
                 {
                    
                    //update progress bar for autosteer
                    if (pbarSteer++ > 99) pbarSteer = 0;

                    if (ahrs.isHeadingFromAutoSteer)
                    {
                        ahrs.correctionHeadingX16 = (Int16)((data[4] << 8) + data[5]);                            
                    }

                    if (ahrs.isRollFromAutoSteer)
                    {
                        ahrs.rollX16 = (Int16)((data[6] << 8) + data[7]);                           
                    }

                    mc.steerSwitchValue = data[8];
                    mc.workSwitchValue = mc.steerSwitchValue & 1;
                    mc.steerSwitchValue = mc.steerSwitchValue & 2;

                    //build string for display
                    double actualSteerAngle = (Int16)((data[2] << 8) + data[3]);

                    double setSteerAngle = guidanceLineSteerAngle;                       
                    byte pwm = data[9];

                    actualSteerAngleDisp = actualSteerAngle;
                    

                    //load the usb recv string with udp recd data for chart and gui info
                    mc.serialRecvAutoSteerStr = (actualSteerAngle * 0.01).ToString("N2") + "," + (setSteerAngle*0.01 ).ToString("N2") + "," + (ahrs.correctionHeadingX16 * 0.0625).ToString("N1")
                           + "," + (ahrs.rollX16 * 0.0625).ToString("N1") + "," + mc.steerSwitchValue.ToString()
                           + "," + (pwm).ToString();
                    break;
                }

but not 100% shure how to display the steer chart…

Where are th bugs? Please mark the lines.

heading was not send with ethernet - now it is…

All heading and roll bugs for UDP fixed and on github. Should be good now.