ezieragabriel / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Serial.write(0) #1006

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I can't use Serialx.write(0) because compiler said:
"... is ambiguous ...".

Serialx.write((byte)0) is ok.

Probably compiler don't know if is a pointer or a int.

IDE 1.0.1
Windows XP Pro pack 3
Arduino MEGA

Ettore Massimo Albani

Original issue reported on code.google.com by info@cyberhs.it on 13 Aug 2012 at 12:33

GoogleCodeExporter commented 9 years ago
I can confirm the issue.
Same here, with Arduino IDE 1.0.1 on Arch Linux.

Original comment by leomi...@gmail.com on 13 Aug 2012 at 6:17

GoogleCodeExporter commented 9 years ago
The solution is the same as issue 527.

Original comment by paul.sto...@gmail.com on 13 Aug 2012 at 7:55

GoogleCodeExporter commented 9 years ago
https://github.com/arduino/Arduino/commit/222d51e3831d77f60ae6ce1f3d037b0febb0c7
17

Original comment by dmel...@gmail.com on 29 Aug 2012 at 8:33

GoogleCodeExporter commented 9 years ago
The "fix" is only a fix for HardwareSerial.
Why only solve this for HardwareSerial?  What about all the other libraries 
that use the Print class that have the same issue?.
Why not solve it in Print so that all the other libraries pick up the fix?
Think about the others: SoftSerial, LiquidCrystal, and many 3rd party lcd and 
glcd as well as other communication libraries that could all benefit from
putting the fix in Print rather than having to update every single library 
individually.

Original comment by bperry...@gmail.com on 9 Nov 2012 at 5:49

GoogleCodeExporter commented 9 years ago
The compiler produces larger, slower code if the change is made in Print.  Is 
that worthwhile?

Original comment by paul.sto...@gmail.com on 9 Nov 2012 at 7:54