Go Down

Topic: I think I found a bug in the HardwareSerial.cpp Library. (Read 483 times) previous topic - next topic

Frédéric_Plante

Apr 18, 2014, 05:54 am Last Edit: Apr 18, 2014, 05:56 am by Frédéric_Plante Reason: 1
My version of IDE 1.5.6-r2

It's at line 75:

Code: [Select]
 if (Serial3_available && serialEvent2 && Serial3_available()) serialEvent3();

Should be

Code: [Select]
 if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3();

Thank you :)
As we fight our way northward into the great unknown, only that one thing remains certain...

Frédéric_Plante

Thank you Coding Badly, I did not really know where to post this.
As we fight our way northward into the great unknown, only that one thing remains certain...

pYro_65

Looks like they where onto it. Some big changes to the source for 1.5.6.

The current source has been fixed.
https://github.com/arduino/Arduino/blob/ide-1.5.x/hardware/arduino/avr/cores/arduino/HardwareSerial.cpp#L75
Code: [Select]
void serialEventRun(void)
{
#if defined(HAVE_HWSERIAL0)
  if (Serial0_available && serialEvent && Serial0_available()) serialEvent();
#endif
#if defined(HAVE_HWSERIAL1)
  if (Serial1_available && serialEvent1 && Serial1_available()) serialEvent1();
#endif
#if defined(HAVE_HWSERIAL2)
  if (Serial2_available && serialEvent2 && Serial2_available()) serialEvent2();
#endif
#if defined(HAVE_HWSERIAL3)
  if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3();
#endif
}

Frédéric_Plante

It's funny cause I never got to use Serial3, but I was out to find out how they call the serialEvent  event, so I stumble on it.
As we fight our way northward into the great unknown, only that one thing remains certain...

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy