Bug in SoftwareSerial when using inverse logic #1362

wants to merge 127 commits into

Fix for reported bug #1361

@ffissore ffissore added New Core and removed New labels Feb 27, 2014

Looking at the code in the ide-1.5.x branch, this pullrequest still seems relevant. The commit looks correct to me.

Only comment I have is that the commit message is terse and doesn't really describe what the problem was or how the fix works. Perhaps that can be fixed (combined with a rebase to drop all the merge commits)?


Hello, a better explanation of the bug can be found here http://forum.arduino.cc/index.php?topic=159726

I have noticed I have added many new merge commits to the pull request, this due to my little knowledge of how pull request works... But I will look into the rebase thing to see if I find out how...


When you merge (or git pull, which does a merge), git creates a merge commit for you, merging your changes with the upstream changes (from the Arduino repo). If you do a git pull --rebase, or git fetch and then git rebase origin/master, it should instead "replay" your commits on top of the latest master, which makes only your commits appear here. Afterwords, you must use git push --force to overwrite the commits here.


I think I have done some major fail when merging, can I delete this pull request and make a new one?


You can, but if you just clean up thinks locally and use git push --force to overwrite the master branch in your repository, this pullrequest will automatically be updated as well. If you want to make a pullrequest for another branch, you'll have to close this one and open a new one, you can't edit the branch for an existing pullreq AFAIK (and you can't delete a pullreq, only close it).

miek and others added some commits Dec 28, 2012
@miek miek Fix Debounce example to work as described
This alters the debounce example code to toggle the LED rather than just use
the button state to set the LED state.

Fixes #293
@Lauszus Lauszus Added support for all variants of Sanguino 2937bce
@zeveland zeveland added driver install utility (dpinst 32- and 64-bit) and Arduino icon…
… needed for Windows installer
@Fede85 Fede85 small changes to the Debounce example ae7f92f
@Fede85 Fede85 Moved refresh client from html meta tag to http header
Fixes #953
@Fede85 Fede85 WifiWebServer example: Moved the autorefresh feature inside the http …
@Fede85 Fede85 WebServer example: Added comments ed9be1e
@PaulStoffregen PaulStoffregen Support select-paste on Linux (Paul Stoffregen) ee1eeec
@PaulStoffregen PaulStoffregen Add "Copy To Clipboard" button for compile errors (Paul Stoffregen) 03201e6
@Fede85 Fede85 Corrected the return type of the digitalPotWrite in the SPI/DigitalPo…
…tControl example

Fixes #1063
@Fede85 Fede85 changed the pin where to connect the button from 2 to 4 to be complia…
…nt with the comment in the header and the tutorial.

Fixes #1396
@zeveland zeveland updated driver description string to "Arduino USB Driver". includes n…
…ew .cat
@cmaglie cmaglie Nicer button for 'Copy error to clipboard' 35e1601
@cmaglie cmaglie Stream "_timeout" field and related methods are now protected instead…
… of private.

This allows better optimization on classes that extends Stream without losing
timeout capabilities.
@cmaglie cmaglie Added c_str() method to String class. 898e163
@cmaglie cmaglie Added const modifier to String.c_str() d720d5e
@Fede85 Fede85 added colored keywords readString and readStringUntil af725a2
@cmaglie cmaglie Revert ""Add library" moved into "Import library" menu"
This reverts commit 1866050e0783e85b814c6afb57fa36318f3496bb.
@cmaglie cmaglie keep included folder name as top level folder name, delete MAC folder…
… and hidden files
@ffissore ffissore import library also import folder (already expanded libraries)
@ffissore ffissore improved import library: complains if invalid zip or folders are sele…
@cmaglie cmaglie "Add library" moved into "Import library" menu e777bdc
@ffissore ffissore also rebuild examples menu after library import 5d0a0f0
@ffissore ffissore better error message when library names clash
filter out non .ZIP files
@cmaglie cmaglie Disabled 'fat' (multiplatform) library check.
@ffissore ffissore removed check on .h file existence 02d9a60
@cmaglie cmaglie Backported OnlyDirs.class 76ccc74
@cmaglie cmaglie Fixed disappearing 'Import library' menu 73694fa
@cmaglie cmaglie Updated revision log 1031755
@cmaglie cmaglie Added robot hardware 6e793fe
@Fede85 Fede85 Added support to INT6 on Leonardo.
Fixes #988
@cmaglie cmaglie Updated drivers for robot 049455b
@cmaglie cmaglie Added Arduino Robot libraries 3c25a35
@cmaglie cmaglie Reverted 'copy error' button for 1.0.5, waiting for a better UI design 9baa8cd
@cmaglie cmaglie Updated revision log 8877c57
dcuartielles fixed order in how the commands were executed ea63bc1
@cmaglie cmaglie Robot has its own core b154670
dcuartielles fixed glitch with the screen when starting the process 126c2af
dcuartielles fixed the classic fix vs stroke issue after migrating to the TFT library 80fda92
@Fede85 Fede85 added the TFT display library 3aa4ae9
dcuartielles added a better configurarion string for the line following example 2b9f455
dcuartielles Added notification about the need of the IR-Remote library 90a2bd2
dcuartielles added a better configurarion string for the line following example 3b08cdc
@cmaglie cmaglie Fixed upload for robot boards 6a4f458
@cmaglie cmaglie Fixed upload for robot boards f261317
@shfitz shfitz Fixed spelling error in Horizon example c333554
@cmaglie cmaglie Reintroduced copy error button.
Revert "Reverted 'copy error' button for 1.0.5, waiting for a better UI design"

This reverts commit cf4584eb29c45c96ced13d11ff6a09005d225d17.
@Fede85 Fede85 Fixes #1432 e23a191
@Fede85 Fede85 keywords syntax highlighting corrected in SoftwareSerial library
Fixed #1426
@Lauszus Lauszus Use analogPinToChannel if it's defined 587daf8
@Lauszus Lauszus Removed call to analogPinToChannel for Leonardo 41d92fc
@Lauszus Lauszus Check if ATmega32u4 is defined
Needed in order to work with Arduino Leonardo
@bjelojac bjelojac Fix for #814, Memory Leak
File isn't closed before being released, it leaks. This test has been verified and tested many times.
@Lauszus Lauszus Removed double instance of the same code dd3efb7
@snargledorf snargledorf Added remove methods to WString db995ef
@tevino tevino add String.toFloat 6f7f6ef
@mikalhart mikalhart Minor typo correction
@mcoms mcoms Update incorrect docs in tonePitchFollower example
The comments state that the speaker should be on pin 8, but the code references pin 9. Updated the comments to reflect the correct pin.
Justin Paulin Fixed a typo in the WebServer example. 1524985
@X-Y X-Y Fixed robot libraries and examples for unified Arduino core 9435ac7
@pbrook pbrook USB serial baud arg type
Make USB Serial_::begin() function take an unsigned long argument for
consistency with HardwareSerial.

Signed-off-by: Paul Brook <paul@nowt.org>
@pbrook pbrook USB CDC two argument begin()
Add two argument form of Serial_::begin

Signed-off-by: Paul Brook <paul@nowt.org>
@PaintYourDragon PaintYourDragon Latest Adafruit_GFX fixes + moved GFX lib to utility folder
Updated constructor and dependent code, other minor fixes. Robot LCD
examples all compile, but not yet tested against actual hardware.
Jacques Supcik Fix indentation (cosmetic) 2dfe77a
Federico Fissore It was still using jdk FileNameExtensionFilter dd7ec12
Federico Fissore Added missing class FileNameExtensionFilter 953827f
@cmaglie cmaglie Removed destructor from File.cpp and SD.h as it leads to unexpected c…
…lose/destructed objects #814
@cmaglie cmaglie Update readme.txt 9d9ccda
Cayci Display line numbers for the file being edited 4f6af5a
Cayci add preference to enable/disable line numbers
add preference to enable/disable line numbers and make font change work
Cayci Render line numbers using TextAreaPainter
Fix the line number font rendering problem on the Mac.

Now, the TextAreaLineNumbers class extends the TextAreaPainter and just
overloads the paintLine method to make it render the line number instead
of rendering the whole line. Other than that, the superclass' drawing
code is used.

So: the same drawing code that renders the source code text in the
editor is now also being used to render the line numbers.
@cmaglie cmaglie Added Arduino Ethernet variant.
Fixes #925
@cmaglie cmaglie Added LED_BUILTIN constant to Leonardo board 2b0770e
@cmaglie cmaglie Changed LED_BUILTIN to a macro to better support boards that do not h…
…ave a built-in LED.

Fixes #758
@PaulStoffregen PaulStoffregen Help 3rd party installers find the hardware path fdec60a
@X-Y X-Y Fix robot problems regarding new version of Arduino 53e529f
@shfitz shfitz Updates to a number of Examples
removed pachube examples, added xively examples. changes to the Servo
@cmaglie cmaglie Added SERIAL metadata into variant files. 1c9b7d6
@shfitz shfitz Updated listfiles SD example
Updated description of the file
@shfitz shfitz Updated Blink without delay example
Changed variable to unsigned long.
@shfitz shfitz Modified LCD custom character example
moved lcd.begin() to the beginnng of the setup() and fixed an issue
that prevented the example from compiling. When calling lcd.write()
with an argument of 0, the 0 must be cast a s a byte.
@shfitz shfitz Updated KeyboardMessage example 52304d8
@cmaglie cmaglie Fix SERIAL_* metadata in Arduino Ethernet variant a973513
@ntruchsess ntruchsess add operator==, remoteIP and remotePort to EthernetClient 446fcec
@ntruchsess ntruchsess add localPort to EthernetClient, simplify operator== 366a85a
@ntruchsess ntruchsess add some lines of comment to ChatServer.ino, remove redundant assignm…
…ent of Client-instance
@ntruchsess ntruchsess revert Chatserver example, create new AdvancedChatServer based on it a825624
@ntruchsess ntruchsess apply AdvancedChatServer.ino changes to renamed ChatServer.ino f769cb2
@ntruchsess ntruchsess remove all Changes besides operator== 01d6b53
@ntruchsess ntruchsess update AdvancedChatServer.ino, add operator!= ee2c603
@cmaglie cmaglie Changed pins definition in variants from constants to #defines. eb9cafe
@cmaglie cmaglie Updated drivers signature for Windows 58bc646
@cmaglie cmaglie Updated revisions log 695d712
@cmaglie cmaglie Signed drivers for Windows 8.1 b58785d
@HeMan HeMan Compile with -x assembler-with-cpp instead of -assembler-with-cpp.
- Newer avr-gcc doesn't use -assembler-with-cpp, but
  uses -x assembler-with-cpp. This works with older compilers as well.
@shfitz shfitz Minor changes to Communication Examples
Added a note to the included Processing sketches about replacing
println(Serial.list()) with Serial.printArray() if using Processing 2.1
or later
@KonradIT KonradIT Update readme.txt 8d7262d
@KonradIT KonradIT Update and rename readme.txt to README.mkdn fad6226
@KonradIT KonradIT Rename README.mkdn to README.md 85daa2c
@shfitz shfitz Updated Listfiles SD example
Changed SS pin to 4 for consistency with other examples
@Fede85 Fede85 WiFi Shield examples: added the firmware version check 409554e
@PaulStoffregen PaulStoffregen If 2 libs have same .h file, use the lib with same dir name cfe24c7
@X-Y X-Y Fixed issue #1478, #1599, #1709, motors being opposite, updated turni…
…ng algorithm
@cmaglie cmaglie Revert "Changed pins definition in variants from constants to #defines."
This reverts commit 7fcba37acfd11313640b3f5d5c813d63d2f59999.
@cmaglie cmaglie Added some friendly messages for Arduino Robot include errors on old …

After merging #1859, old sketches that uses Robot_Control library must include
Wire.h and SPI.h to work properly.
@cmaglie cmaglie Added license for Arduino.h, binary.h and main.cpp (master branch)
See #1847 and #1117
@cmaglie cmaglie Added license for Client, IPAddressm and Server (master branch)
See #1847 and #1117
@felixphew felixphew Update README.md
Decapitalised secondary headings and linked the *Credits* section
@cmaglie cmaglie Local (user installed) libraries have priority over system libraries
See #1853
@cmaglie cmaglie Removed unused code, fixed indentation. 8d2a6a5
@h2g2guy h2g2guy Corrected repeated 'less' in checkName's message e64cfa4
@cmaglie cmaglie Added copyright license for WiFi shield library
See #1117
Federico Fissore Windows: arduino_debug.exe. Backport of ad2ff737bb871ebf9a1374924a580…
@oni303 oni303 added support for '-' and '.' but both not as the first as first char…
@oni303 oni303 cut the filename at the last '.' not at the first in tab-names of the…
… editor
@egueli egueli Esplora: added reading form Tinkerkit inputs 87d6509
Federico Fissore Windows: launch4j gets downloaded at build time 3fd2320
@shfitz shfitz Update to Esplora example
Added Mouse.press to Esplora Joystick Mouse example
@cmaglie cmaglie Added compatibity for 1.5 libraries layout on IDE 1.0.x
See #1765
@Ramoonus Ramoonus Update README.md
also make ToDo a link
@majenkotech majenkotech Fixed string constructor overloading bug 5cf12b0
@majenkotech majenkotech Import WString from 1.5.6 8f4c11a
@cmaglie cmaglie Fixed example StringStartsWithEndsWith.ino 1c896a4
@jaimeiniesta jaimeiniesta fix comments on spaceship example
The comments explaining the if..else part were mistaken.
@shfitz shfitz Modified Keyboard Reprogram example
Updated to reflect changes with how the IDE creates new blank sketches.
@shfitz shfitz Updated Blink
removed the variable “led” and added some additional descriptive text

I think I totaly wrecked my respository, so can you delete this, and look at this pull request instead?


@jenscski jenscski closed this May 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment