Pages: [1]   Go Down
Author Topic: I think I found a bug in the HardwareSerial.cpp Library.  (Read 289 times)
0 Members and 1 Guest are viewing this topic.
Québec
Offline Offline
God Member
*****
Karma: 17
Posts: 673
Hey bien!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My version of IDE 1.5.6-r2

It's at line 75:

Code:
 if (Serial3_available && serialEvent2 && Serial3_available()) serialEvent3();

Should be

Code:
 if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3();

Thank you smiley
« Last Edit: April 17, 2014, 10:56:15 pm by Frédéric_Plante » Logged

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

Québec
Offline Offline
God Member
*****
Karma: 17
Posts: 673
Hey bien!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Coding Badly, I did not really know where to post this.
Logged

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

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 69
Posts: 2167
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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
}
Logged


Québec
Offline Offline
God Member
*****
Karma: 17
Posts: 673
Hey bien!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

Pages: [1]   Go Up
Jump to: