From cd056361b3780d5ae331daaa1c834df50b92a0f6 Mon Sep 17 00:00:00 2001 From: david d zuhn Date: Sat, 6 Feb 2016 19:52:58 -0600 Subject: [PATCH 1/4] fix various comment typos --- DCCpp_Uno/DCCpp_Uno.ino | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/DCCpp_Uno/DCCpp_Uno.ino b/DCCpp_Uno/DCCpp_Uno.ino index 9378374..75ce100 100644 --- a/DCCpp_Uno/DCCpp_Uno.ino +++ b/DCCpp_Uno/DCCpp_Uno.ino @@ -95,18 +95,18 @@ registers numbered 1 through MAX_MAIN_REGISTERS (as defined in DCCpp_Uno.h). It is generally considered good practice to continuously send throttle control packets to every cab so that if an engine should momentarily lose electrical connectivity with the tracks, it will very quickly receive another throttle control signal as soon as connectivity is -restored (such as when a trin passes over rough portion of track or the frog of a turnout). +restored (such as when a train passes over a rough portion of track or the frog of a turnout). DCC++ Base Station therefore sequentially loops through each main operations track packet regsiter that has been loaded with a throttle control setting for a given cab. For each register, it transmits the appropriate DCC packet bits to the track, then moves onto the next register without any pausing to ensure continuous bi-polar power is being provided to the tracks. Updates to the throttle setting stored in any given packet register are done in a double-buffered -fashion and the sequencer is pointed to that register immediately after being changes so that updated DCC bits +fashion and the sequencer is pointed to that register immediately after being changed so that updated DCC bits can be transmitted to the appropriate cab without delay or any interruption in the bi-polar power signal. The cabs identified in each stored throttle setting should be unique across registers. If two registers contain throttle setting for the same cab, the throttle in the engine will oscillate between the two, -which is probably not a desireable outcome. +which is probably not a desirable outcome. For both the main operations track and the programming track there is also a special packet register with id=0 that is used to store all other DCC packets that do not require continious transmittal to the tracks. @@ -234,7 +234,7 @@ void setup(){ if(!digitalRead(A5)) showConfiguration(); - Serial.print(" Date: Sat, 6 Feb 2016 22:13:03 -0600 Subject: [PATCH 2/4] more typo fixes --- DCCpp_Uno/DCCpp_Uno.h | 2 +- DCCpp_Uno/Outputs.cpp | 6 +++--- DCCpp_Uno/Sensor.cpp | 4 ++-- DCCpp_Uno/SerialCommand.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DCCpp_Uno/DCCpp_Uno.h b/DCCpp_Uno/DCCpp_Uno.h index d0f5f8b..00f329e 100644 --- a/DCCpp_Uno/DCCpp_Uno.h +++ b/DCCpp_Uno/DCCpp_Uno.h @@ -89,7 +89,7 @@ Part of DCC++ BASE STATION for the Arduino #endif ///////////////////////////////////////////////////////////////////////////////////// -// SELECT COMMUNICATION INTERACE +// SELECT COMMUNICATION INTERFACE ///////////////////////////////////////////////////////////////////////////////////// #if COMM_INTERFACE == 0 diff --git a/DCCpp_Uno/Outputs.cpp b/DCCpp_Uno/Outputs.cpp index fe2ddef..00f9d00 100644 --- a/DCCpp_Uno/Outputs.cpp +++ b/DCCpp_Uno/Outputs.cpp @@ -9,7 +9,7 @@ Part of DCC++ BASE STATION for the Arduino /********************************************************************** DCC++ BASE STATION supports optional OUTPUT control of any unused Arduino Pins for custom purposes. -Pins can be activited or de-activated. The default is to set ACTIVE pins HIGH and INACTIVE pins LOW. +Pins can be activated or de-activated. The default is to set ACTIVE pins HIGH and INACTIVE pins LOW. However, this default behavior can be inverted for any pin in which case ACTIVE=LOW and INACTIVE=HIGH. Definitions and state (ACTIVE/INACTIVE) for pins are retained in EEPROM and restored on power-up. @@ -47,8 +47,8 @@ where 1 = state of pin set on power-up, or when first created, to either ACTIVE of INACTIVE depending on IFLAG, bit 2 - IFLAG, bit 2: 0 = state of pin set to INACTIVE uponm power-up or when first created - 1 = state of pin set to ACTIVE uponm power-up or when first created + IFLAG, bit 2: 0 = state of pin set to INACTIVE upon power-up or when first created + 1 = state of pin set to ACTIVE upon power-up or when first created Once all outputs have been properly defined, use the command to store their definitions to EEPROM. If you later make edits/additions/deletions to the output definitions, you must invoke the command if you want those diff --git a/DCCpp_Uno/Sensor.cpp b/DCCpp_Uno/Sensor.cpp index 11fca36..e51e1dd 100644 --- a/DCCpp_Uno/Sensor.cpp +++ b/DCCpp_Uno/Sensor.cpp @@ -8,7 +8,7 @@ Part of DCC++ BASE STATION for the Arduino **********************************************************************/ /********************************************************************** -DCC++ BASE STATION supports Sensor inputs that can be connected to any Aruidno Pin +DCC++ BASE STATION supports Sensor inputs that can be connected to any Arduino Pin not in use by this program. Sensors can be of any type (infrared, magentic, mechanical...). The only requirement is that when "activated" the Sensor must force the specified Arduino Pin LOW (i.e. to ground), and when not activated, this Pin should remain HIGH (e.g. 5V), @@ -25,7 +25,7 @@ To have this sketch monitor one or more Arduino pins for sensor triggers, first sensor definitions using the following variation of the "S" command: : creates a new sensor ID, with specified PIN and PULLUP - if sensor ID already exists, it is updated with specificed PIN and PULLUP + if sensor ID already exists, it is updated with specified PIN and PULLUP returns: if successful and if unsuccessful (e.g. out of memory) : deletes definition of sensor ID diff --git a/DCCpp_Uno/SerialCommand.cpp b/DCCpp_Uno/SerialCommand.cpp index 4d3f9b2..1a6fd13 100644 --- a/DCCpp_Uno/SerialCommand.cpp +++ b/DCCpp_Uno/SerialCommand.cpp @@ -53,7 +53,7 @@ void SerialCommand::process(){ sprintf(commandString,""); else if(c=='>') // end of new command parse(commandString); - else if(strlen(commandString)') } // while From ff746ea26b46c5c8c8051f11245b191f0c8a3b7f Mon Sep 17 00:00:00 2001 From: david d zuhn Date: Sat, 6 Feb 2016 22:26:16 -0600 Subject: [PATCH 3/4] fix one documentation error, plus typos --- DCCpp_Uno/SerialCommand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DCCpp_Uno/SerialCommand.cpp b/DCCpp_Uno/SerialCommand.cpp index 1a6fd13..6ac28a6 100644 --- a/DCCpp_Uno/SerialCommand.cpp +++ b/DCCpp_Uno/SerialCommand.cpp @@ -68,7 +68,7 @@ void SerialCommand::process(){ sprintf(commandString,""); else if(c=='>') // end of new command parse(commandString); - else if(strlen(commandString)') } // while } @@ -477,7 +477,7 @@ void SerialCommand::parse(char *com){ break; -/***** WRITE A DCC PACKET TO ONE OF THE REGSITERS DRIVING THE MAIN OPERATIONS TRACK ****/ +/***** WRITE A DCC PACKET TO ONE OF THE REGISTERS DRIVING THE MAIN OPERATIONS TRACK ****/ case 'M': // /* @@ -496,7 +496,7 @@ void SerialCommand::parse(char *com){ mRegs->writeTextPacket(com+1); break; -/***** WRITE A DCC PACKET TO ONE OF THE REGSITERS DRIVING THE MAIN OPERATIONS TRACK ****/ +/***** WRITE A DCC PACKET TO ONE OF THE REGISTERS DRIVING THE PROGRAMMING TRACK ****/ case 'P': //

/* From 97bbe07c155c95607c5c6198dec94633f7dccefa Mon Sep 17 00:00:00 2001 From: david d zuhn Date: Sun, 7 Feb 2016 11:07:34 -0600 Subject: [PATCH 4/4] fix return setting doc for E command --- DCCpp_Uno/SerialCommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DCCpp_Uno/SerialCommand.cpp b/DCCpp_Uno/SerialCommand.cpp index 6ac28a6..6cc7b07 100644 --- a/DCCpp_Uno/SerialCommand.cpp +++ b/DCCpp_Uno/SerialCommand.cpp @@ -401,7 +401,7 @@ void SerialCommand::parse(char *com){ /* * stores settings for turnouts and sensors EEPROM * - * returns: + * returns: */ EEStore::store();