From a26d988acc2a69589e2f9a226bade1587160b5bc Mon Sep 17 00:00:00 2001 From: Dex Date: Fri, 11 Feb 2022 09:52:56 -0500 Subject: [PATCH 01/13] add config.json to master repo for installer (#204) --- .gitignore | 2 +- config.json | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 292 insertions(+), 1 deletion(-) create mode 100644 config.json diff --git a/.gitignore b/.gitignore index 61eedc4..2bf0b5e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ Release/* .pio/ .vscode/ config.h -.vscode/extensions.json +.vscode/* mySetup.h mySetup.cpp myHal.cpp diff --git a/config.json b/config.json new file mode 100644 index 0000000..145cd72 --- /dev/null +++ b/config.json @@ -0,0 +1,291 @@ +[ + { + "Name": "BaseStationClassic", + "Git": "DCC-EX/BaseStation-Classic", + "Libraries": [ + { + "Name": "Ethernet", + "Repo": "arduino-libraries/Ethernet", + "Location": "libraries/Ethernet", + "LibraryDownloadAvailable": true + } + ], + "SupportedBoards": [ + { + "Name": "Uno", + "FQBN": "arduino:avr:uno", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "Mega", + "FQBN": "arduino:avr:mega", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + } + ], + "DisplayName": "Base Station Classic", + "InputFileLocation": "DCCpp", + "AllowAdvanced": false, + "ConfigFile": "DCCpp/Config.h" + }, + { + "Name": "CommandStation-EX", + "Git": "DCC-EX/CommandStation-EX", + "Libraries": [ + + { + "Name": "Ethernet", + "Repo": "arduino-libraries/Ethernet", + "Location": "libraries/Ethernet", + "LibraryDownloadAvailable": true + }, + { + "Name": "DIO2", + "Repo": "", + "Location": "libraries/DIO2", + "LibraryDownloadAvailable": true + } + ], + "SupportedBoards": [ + { + "Name": "Uno", + "FQBN": "arduino:avr:uno", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "Mega", + "FQBN": "arduino:avr:mega", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "Mega Wifi", + "FQBN": "arduino:avr:mega", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "Nano", + "FQBN": "arduino:avr:mega", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "Nano Every", + "FQBN": "arduino:avr:mega", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "Teensy 3.x", + "FQBN": "arduino:avr:mega", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "Teensy 4.x", + "FQBN": "arduino:avr:mega", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + } + ], + "ExtraLibraries": [ + + ] + }, + { + "Name": "SAMD21", + "FQBN": "SparkFun:samd", + "Platforms": [ + { + "Architecture": "avr", + "Package": "arduino" + }, + { + "Architecture": "samd", + "Package": "arduino" + }, + { + "Architecture": "samd", + "Package": "SparkFun" + } + ], + "SupportedMotoShields": [ + { + "Name": "Arduino Motor Shield", + "ShieldType": 0 + }, + { + "Name": "Pololu MC33926 Motor Shield", + "ShieldType": 1 + }, + { + "Name": "FireBox MK1", + "ShieldType": 3 + }, + { + "Name": "FireBox MK1S", + "ShieldType": 4 + } + ], + "ExtraLibraries": [ + + ] + } + ], + "DisplayName": "CommandStation EX", + "InputFileLocation": "", + "AllowAdvanced": true, + "ConfigFile": "config.h" + } +] From bd9a04572de75744dc2f15ac090ec959d7a09a29 Mon Sep 17 00:00:00 2001 From: Dex Date: Fri, 11 Feb 2022 14:53:16 +0000 Subject: [PATCH 02/13] Committing a SHA --- GITHUB_SHA.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index 4d4311b..6af3d57 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "58ef7d2" +#define GITHUB_SHA "a26d988" From d0b01e3f03a5a44131df1cd5343d48a757a5e7d8 Mon Sep 17 00:00:00 2001 From: Fred Date: Wed, 16 Feb 2022 12:02:11 -0500 Subject: [PATCH 03/13] Frightrisk ver4 (#205) * Add release notes for verion 4.0 * Add archive release notes * fix for SHA to modify previous commit instead of using new SHA * new format for supported boards to allow easy addition of new boards * Update release_notes.md (#206) Formatting lines Server Roster clarification and release 4,0 bug fix vs 3.1 edit. added support members * Some duplication removal and rewording (#207) WiThrottle and JMRI-related items Co-authored-by: Fred * rename config.json to installer.json, fixes for boards(may still be broken) Co-authored-by: dexslab Co-authored-by: Kcsmith0708 Co-authored-by: mstevetodd --- .github/workflows/sha.yml | 3 +- .vscode/extensions.json | 3 + Release_Notes/release_notes_v4.0.0.md | 285 ++++++++++++++++++++++++++ config.json => installer.json | 139 ++++++------- release_notes.md | 93 ++++++++- version.h | 11 +- 6 files changed, 440 insertions(+), 94 deletions(-) create mode 100644 Release_Notes/release_notes_v4.0.0.md rename config.json => installer.json (70%) diff --git a/.github/workflows/sha.yml b/.github/workflows/sha.yml index 8aca1a5..5a24dea 100644 --- a/.github/workflows/sha.yml +++ b/.github/workflows/sha.yml @@ -24,10 +24,11 @@ jobs: sha=$(git rev-parse --short "$GITHUB_SHA") echo "#define GITHUB_SHA \"$sha\"" > GITHUB_SHA.h - - uses: EndBug/add-and-commit@v4 # You can change this to use a specific version + - uses: EndBug/add-and-commit@v8 # You can change this to use a specific version with: add: 'GITHUB_SHA.h' message: 'Committing a SHA' + commit: --amend env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged diff --git a/.vscode/extensions.json b/.vscode/extensions.json index e80666b..080e70d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,5 +3,8 @@ // for the documentation about the extensions.json format "recommendations": [ "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" ] } diff --git a/Release_Notes/release_notes_v4.0.0.md b/Release_Notes/release_notes_v4.0.0.md new file mode 100644 index 0000000..759a1f8 --- /dev/null +++ b/Release_Notes/release_notes_v4.0.0.md @@ -0,0 +1,285 @@ +Version 4.0 Release Notes +************************* + +The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production Release. Release v4.0.0 is a Major release that adds significant new product design & Automation features and bug fixes. The team continues improving the architecture of DCC++EX to make it more flexible and optimizing the code so as to get more performance from the Arduino (and other) microprocessors. This release includes all of the Point Releases from v3.2.0 to v3.2.13. + +**Downloads (zip and tar.gz) below. These are named without version number in the folder name to make the Arduino IDE happy.** + +[CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) +[CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v0.0.0-Prod/CommandStation-EX.tar.gz) + +**Known Issues** + +- **Wi-Fi** - Requires sending commands from a serial monitor if you want to switch between AP mode and STA station mode after initial setup +- **Pololu Motor Shield** - is supported with this release, but the user may have to adjust timings to enable programming mode due to limitation in its current sensing circuitry + +**All New Major DCC++EX 4.0.0 features** + +- **New HAL Hardware Abstract Layer API** that automatically detects and greatly simplifies interfacing to many predefined accessory boards for servos, signals & sensors and added I/O (digital and analog inputs and outputs, servos etc). +- HAL Support for; + - MCP23008, MCP23017 and PCF9584 I2C GPIO Extender modules. + - PCA9685 PWM (servo & signal) control modules. + - Analogue inputs on Arduino pins and on ADS111x I2C modules. + - MP3 sound playback via DFPlayer module. + - HC-SR04 Ultrasonic range sensor module. + - VL53L0X Laser range sensor module (Time-Of-Flight). + and a new `` command to list the HAL devices attached to the command station + +**New Command Station Broadcast throttle logic** + +- Synchronizes multiple WiThrottles and PC based JMRI Throttles for direction, speed and F-key updates + +**New ‘Discovered Servers’ on WiFi Throttles** + +- WiThrottles now detect and display both DCC++EX Command Station name and JMRI WiThrottle Server Profile name in the WiFi Throttle Apps. + +- Sample Engine Driver App Discovered Servers + “DCC++EX” {Direct connect to the Command Station} + “My JMRI Railroad” {JMRI connected via WiThrottle Server} + +- Our New multicast Dynamic Network Server (mDNS) enhancement allows us to display the available WiFi server connections to a DCC++EX Command Station. Choosing one allows your WiThrottle App to connect to and load Server Rosters and function keys to your throttle from Either the DCC++EX Command Station Server Roster, Or from JMRI Engine Roster list. + + +**New DCC++EX 4.0.0 with EX-RAIL Extended Railroad Automation Instruction Language** + +- Awesome, cleverly powerful yet simple user friendly scripting language for user built Automation & Routing scripts. You can control Engines, Sensors, Turnouts, Signals, Outputs and Accessories that are uploaded into the DCC++EX Command Station. + +- EX-RAIL scripts are automatically displayed as Automation {Handoff} and Route {Set} buttons on supported WiFi Throttle Apps. + +**New EX-RAIL ‘Roster’ Feature** + +- List and store user defined engine roster & function keys inside the command station and automatically load them in WiFi Throttle Apps. +- When choosing “DCC++EX” from discovered servers an Engine Driver or WiThrottle is directly connected to the Command Station. The EX-RAIL ’ROSTER’ command allows all the engine numbers, names and function keys you’ve listed in your myAutomation.h file to automatically upload the Command Station's ‘Server Roster’ into your Engine Driver and WiThrottle Apps. + +**New JMRI 4.99.2 and above specific DCC++EX 4.0 features** + +- Enhanced JMRI DCC++ Tools Base Station pane for building and maintaining Sensor, Turnout and Output devices which can be manually entered into JMRI, or can automatically be populated from the DCC++EX Command Stations mySetup.h file into JMRI. + +- JMRI may now have multiple serial connected DCC++EX Command Stations, and display and track separate "Send DCC++ Command" and "DCC++ Trafic" Monitors for each Command Station at the same time. This allows multiple simultaneous Command Stations running on one Instance of JMRI software. +For example: Use an Uno DCC++EX DecodePro Programming Station {DCC++Prg} on a desktop programming track and a second Mega DCC++EX EX-RAIL Command Station for Operations {DCC++Ops} on the layout with an additional `` programming spur or siding track for acquiring an engine and ‘Drive Away’ onto the mainline (see the DriveAway feature for more information). + + +**DCC++EX 4.0.0 additional product enhancements** + +- Additional Motor Shields and Motor Board {boosters) supported +- Additional Accessory boards supported for GPIO expansion, Sensors, Servos & Signals +- Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events and ‘D HAL SHOW’ devices and ‘D SERVO’ positions and the ‘D RESET’ the command station while maintaining the serial connection with JMRI +- New EX-RAIL ’/’ slash command allows JMRI to directly communicate with EX-RAIL scripts +- Turnout class revised to expand turnout capabilities and allow turnout names/descriptors to display in WiThrottle Apps. +- Build turnouts through either or both mySetup.h and myAutomation.h files and have them automatically passed to and populate JMRI Turnout Tables +- Turnout names display in Engine Driver & WiThrottles +- Output class now allows ID > 255. +- Configuration options to globally flip polarity of DCC Accessory states when driven from command and `` command. +- Increased use of display for showing loco decoder programming information. +- Can disable EEPROM memory code to allow room for DCC++EX 4.0 to fit on a Uno Command Station +- Can define border between long and short addresses +- Turnout and accessory states (thrown/closed = 0/1 or 1/0) can be set to match RCN-213 +- Native non-blocking I2C drivers for AVR and Nano architectures (fallback to blocking Wire library for other platforms). +- EEPROM layout change - deletes EEPROM contents on first start following upgrade. + + +**Bug Fixes** + +- One-off error in CIPSEND drop +- Compiles on Nano Every +- Diagnostic display of ack pulses >32ku +- Current read from wrong ADC during interrupt +- AT(+) Command Pass Through +- CiDAP WiFi Drop out and the WiThrottle F-key looping error corrected +- Common Fault Pin Error +- Uno Memory Utilization optimized + +#### Summary of key features and/or bug fixes by Point Release + +**Summary of the key new features added to CommandStation-EX V3.0.16** + +- Ignore CV1 bit 7 read if rejected by a non NMRA compliant decoder when identifying loco id + +**Summary of the key new features added to CommandStation-EX V3.0.15** + +- Send function commands just once instead of repeating them 4 times + +**Summary of the key new features added to CommandStation-EX V3.0.14** + +- Add feature to tolerate decoders that incorrectly have gaps in their ACK pulse +- Provide proper track power management when joining and unjoining tracks with <1 JOIN> + +**Summary of the key new features added to CommandStation-EX V3.0.13** + +- Fix for CAB Functions greater than 127 + +**Summary of the key new features added to CommandStation-EX V3.0.12** + +- Fixed clear screen issue for nanoEvery and nanoWifi + +**Summary of the key new features added to CommandStation-EX V3.0.11** + +- Reorganized files for support of 128 speed steps + +**Summary of the key new features added to CommandStation-EX V3.0.10** + +- Added Support for the Teensy 3.2, 3.5, 3.6, 4.0 and 4.1 MCUs +- No functional change just changes to avoid complier warnings for Teensy/nanoEvery + +**Summary of the key new features added to CommandStation-EX V3.0.9** + +- Rearranges serial newlines for the benefit of JMRI +- Major update for efficiencies in displays (LCD, OLED) +- Add I2C Support functions + +**Summary of the key new features added to CommandStation-EX V3.0.8** + +- Wraps <* *> around DIAGS for the benefit of JMRI + +**Summary of the key new features added to CommandStation-EX V3.0.7** + +- Implemented support for older 28 apeed step decoders - Option to turn on 28 step speed decoders in addition to 128. If set, all locos will use 28 steps. +- Improved overload messages with raw values (relative to offset) + +**Summary of the key new features added to CommandStation-EX V3.0.6** + +- Prevent compiler warning about deprecated B constants +- Fix Bug that did not let us transmit 5 byte sized packets - 5 Byte commands like PoM (programming on main) were not being sent correctly +- Support for Huge function numbers (DCC BinaryStateControl) - Support Functions beyond F28 +- ESTOP all - New command to emergency stop all locos on the main track +- <- [cab]> estop and forget cab/all cabs - Stop and remove loco from the CS. Stops the repeating throttle messages +- `` command to reboot Arduino +- Automatic sensor offset detect +- Improved startup msgs from Motor Drivers (accuracy and auto sense factors) +- Drop post-write verify - No need to double check CV writes. Writes are now even faster. +- Allow current sense pin set to UNUSED_PIN - No need to ground an unused analog current pin. Produce startup warning and callback -2 for prog track cmds. + +**Summary of the key new features added to CommandStation-EX V3.0.5** + +- Fix Fn Key startup with loco ID and fix state change for F16-28 +- Removed ethernet mac config and made it automatic +- Show wifi ip and port on lcd +- Auto load config.example.h with warning +- Dropped example .ino files +- Corrected .ino comments +- Add Pololu fault pin handling +- Waveform speed/simplicity improvements +- Improved pin speed in waveform +- Portability to nanoEvery and UnoWifiRev2 CPUs +- Analog read speed improvements +- Drop need for DIO2 library +- Improved current check code +- Linear command +- Removed need for ArduinoTimers files +- Removed option to choose different timer +- Added EX-RAIL hooks for automation in future version +- Fixed Turnout list +- Allow command keywords in mixed case +- Dropped unused memstream +- PWM pin accuracy if requirements met + +**Summary of the key new features added to CommandStation-EX V3.0.4** + +- "Drive-Away" Feature - added so that throttles like Engine Driver can allow a loco to be programmed on a usable, electrically isolated programming track and then drive off onto the main track +- WiFi Startup Fixes + +**Summary of the key new features added to CommandStation-EX V3.0.3** + +- Command to write loco address and clear consist +- Command will allow for consist address +- Startup commands implemented + +**Summary of the key new features added to CommandStation-EX V3.0.2:** + +- Create new output for current in mA for `` command - New current response outputs current in mA, overlimit current, and maximum board capable current +- Simultaneously update JMRI to handle new current meter + +**Summary of the key new features added to CommandStation-EX V3.0.1:** + +- Add back fix for jitter +- Add Turnouts, Outputs and Sensors to `` command output + +**CommandStation-EX V3.0.0:** + +**Release v3.0.0 was a major rewrite if earlier versions of DCC++. The code base was re-architeced and core changes were made to the Waveform generator to reduce overhead and make better use of Arduino.** **Summary of the key new features added in Release v3.0.0 include:** + +- **New USB Browser Based Throttle** - WebThrottle-EX is a full front-end to controller to control the CS to run trains. +- **WiFi Support** - AP and station modes supported. Auto-detection of an ESP8266 WiFi module with AT firmware on a Mega's serial port. Connection to JMRI and WiThrottle clients. +- **Withrottle Integrations** - Act as a host for up to four WiThrottle clients concurrently. +- **Add LCD/OLED support** - OLED supported on Mega only +- **Improved CV programming routines** - checks for length of CV pulse, and breaks out of the wait state once it has received an ACK, now reading one CV per second. +- **Improved current sensing** - rewrote current sensing routines for safer operation. Current thresholds based on milliamps, not magic numbers +- **Individual track power control** - Ability to toggle power on either or both tracks, and to "JOIN" the tracks and make them output the same waveform for multiple power districts. +- **Single or Dual-Pin PWM output** - Allows control of H-bridges with PH/EN or dual PWM inputs +- **New, simpler function command** - `` command allows setting functions based on their number, not based on a code as in `` +- **Function reminders** - Function reminders are sent in addition to speed reminders +- **Functions to F28** - All NMRA functions are now supported +- **Filters and user functions** - Ability to filter commands in the parser and execute custom code based on them. (ex: Redirect Turnout commands via NRF24) +- **Diagnostic `` commands** - See documentation for a full list of new diagnostic commands +- **Rewrote DCC++ Parser** - more efficient operation, accepts multi-char input and uses less RAM +- **Rewritten waveform generator** - capable of using any pin for DCC waveform out, eliminating the need for jumpers +- **Rewritten packet generator** - Simplify and make smaller, remove idea of "registers" from original code +- **Add free RAM messages** - Free RAM messages are now printed whenever there is a decerase in available RAM +- **Fix EEPROM bugs** +- **Number of locos discovery command** - `<#>` command +- **Support for more locomotives** - 20 locomotives on an UNO and 50 an a Mega. +- **Automatic slot management** - slot variable in throttle/function commands are ignored and slot management is taken care of automatically. `<->` and `<- CAB>` commands added to release locos from memory and stop packets to the track. + +**Key Contributors** + +**Project Lead** + +- Fred Decker - Holly Springs, North Carolina, USA (FlightRisk) + +**CommandStation-EX Developers** + +- Chris Harlow - Bournemouth, UK (UKBloke) +- Harald Barth - Stockholm, Sweden (Haba) +- Neil McKechnie - Worcestershire, UK (NeilMck) +- Fred Decker - Holly Springs, North Carolina, USA (FlightRisk) +- Dave Cutting - Logan, Utah, USA (Dave Cutting/ David Cutting) +- M Steve Todd - +- Scott Catalano - Pennsylvania +- Gregor Baues - Île-de-France, France (grbba) + +**Engine Driver and JMRI Interface** + +- M Steve Todd + +**exInstaller Software** + +- Anthony W - Dayton, Ohio, USA (Dex, Dex++) + +**Website and Documentation** + +- Mani Kumar - Bangalor, India (Mani / Mani Kumar) +- Fred Decker - Holly Springs, North Carolina, USA (FlightRisk) +- Dave Cutting - Logan, Utah, USA (Dave Cutting/ David Cutting) +- Roger Beschizza - Dorset, UK (Roger Beschizza) +- Keith Ledbetter - Chicago, Illinois, USA (Keith Ledbetter) +- Kevin Smith - Rochester Hills, Michigan USA (KC Smith) + +**WebThrotle-EX** + +- Fred Decker - Holly Springs, NC (FlightRisk/FrightRisk) +- Mani Kumar - Bangalor, India (Mani /Mani Kumar) +- Matt H - Somewhere in Europe + +**Beta Testing / Release Management / Support** + +- Larry Dribin - Release Management +- Kevin Smith - Rochester Hills, Michigan USA (KC Smith) +- Keith Ledbetter +- Brad Van der Elst +- Andrew Pye +- Mike Bowers +- Randy McKenzie +- Roberto Bravin +- Sam Brigden +- Alan Lautenslager +- Martin Bafver +- Mário André Silva +- Anthony Kochevar +- Gajanatha Kobbekaduwe +- Sumner Patterson +- Paul - Virginia, USA + +**Downloads (zip and tar.gz) below. These are named without version number in the folder name to make the Arduino IDE happy.** + +[CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) +[CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.tar.gz) diff --git a/config.json b/installer.json similarity index 70% rename from config.json rename to installer.json index 145cd72..db818c3 100644 --- a/config.json +++ b/installer.json @@ -2,14 +2,14 @@ { "Name": "BaseStationClassic", "Git": "DCC-EX/BaseStation-Classic", - "Libraries": [ - { - "Name": "Ethernet", - "Repo": "arduino-libraries/Ethernet", - "Location": "libraries/Ethernet", - "LibraryDownloadAvailable": true - } - ], + "Libraries": [ + { + "Name": "Ethernet", + "Repo": "arduino-libraries/Ethernet", + "Location": "libraries/Ethernet", + "LibraryDownloadAvailable": true + } + ], "SupportedBoards": [ { "Name": "Uno", @@ -23,16 +23,14 @@ "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "Mega", @@ -46,16 +44,14 @@ "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] } ], "DisplayName": "Base Station Classic", @@ -67,19 +63,18 @@ "Name": "CommandStation-EX", "Git": "DCC-EX/CommandStation-EX", "Libraries": [ - - { - "Name": "Ethernet", - "Repo": "arduino-libraries/Ethernet", - "Location": "libraries/Ethernet", - "LibraryDownloadAvailable": true - }, - { - "Name": "DIO2", - "Repo": "", - "Location": "libraries/DIO2", - "LibraryDownloadAvailable": true - } + { + "Name": "Ethernet", + "Repo": "arduino-libraries/Ethernet", + "Location": "libraries/Ethernet", + "LibraryDownloadAvailable": true + }, + { + "Name": "DIO2", + "Repo": "", + "Location": "libraries/DIO2", + "LibraryDownloadAvailable": true + } ], "SupportedBoards": [ { @@ -94,16 +89,14 @@ "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "Mega", @@ -117,16 +110,14 @@ "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "Mega Wifi", @@ -140,20 +131,18 @@ "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "Nano", - "FQBN": "arduino:avr:mega", + "FQBN": "arduino:avr:nano", "Platforms": [ { "Architecture": "avr", @@ -163,85 +152,77 @@ "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "Nano Every", - "FQBN": "arduino:avr:mega", + "FQBN": "arduino:megaavr:nanoevery", "Platforms": [ { - "Architecture": "avr", + "Architecture": "megaavr", "Package": "arduino" } ], "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "Teensy 3.x", - "FQBN": "arduino:avr:mega", + "FQBN": "teensy:avr:teensy31", "Platforms": [ { - "Architecture": "avr", + "Architecture": "teensy", "Package": "arduino" } ], "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "Teensy 4.x", - "FQBN": "arduino:avr:mega", + "FQBN": "teensy:avr:teensy41", "Platforms": [ { - "Architecture": "avr", + "Architecture": "teensy", "Package": "arduino" } ], "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] }, { "Name": "SAMD21", @@ -263,24 +244,22 @@ "SupportedMotoShields": [ { "Name": "Arduino Motor Shield", - "ShieldType": 0 + "Declaration": "STANDARD_MOTOR_SHIELD" }, { "Name": "Pololu MC33926 Motor Shield", - "ShieldType": 1 + "Declaration": "POLOLU_MOTOR_SHIELD" }, { "Name": "FireBox MK1", - "ShieldType": 3 + "Declaration": "FIREBOX_MK1" }, { "Name": "FireBox MK1S", - "ShieldType": 4 + "Declaration": "FIREBOX_MK1S" } ], - "ExtraLibraries": [ - - ] + "ExtraLibraries": [] } ], "DisplayName": "CommandStation EX", diff --git a/release_notes.md b/release_notes.md index b9cc3ab..f206a72 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,16 +1,86 @@ -The DCC-EX Team is pleased to release CommandStation-EX-v3.1.0 as a Production Release. Release v3.1.0 is a minor release that adds additional features and fixes a number of bugs. With the number of new features, this could have easily been a major release. The team is continually improving the architecture of DCC++EX to make it more flexible and optimizing the code so as to get more performance from the Arduino (and other) microprocessors. This release includes all of the Point Releases from v3.0.1 to v3.0.16. +The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production Release. Release v4.0.0 is a Major release that adds significant new product design & Automation features and bug fixes. The team continues improving the architecture of DCC++EX to make it more flexible and optimizing the code so as to get more performance from the Arduino (and other) microprocessors. This release includes all of the Point Releases from v3.2.0 to v3.2.0 rc13. **Downloads (zip and tar.gz) below. These are named without version number in the folder name to make the Arduino IDE happy.** -[CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v3.1.0-Prod/CommandStation-EX.zip) -[CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v3.1.0-Prod/CommandStation-EX.tar.gz) +[CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) + +[CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v0.0.0-Prod/CommandStation-EX.tar.gz) **Known Issues** -- **Wi-Fi** - works, but requires sending commands from a serial monitor if you want to switch between AP mode and STA station mode after initial setup +- **Wi-Fi** - Requires sending commands from a serial monitor if you want to switch between AP mode and STA station mode after initial setup - **Pololu Motor Shield** - is supported with this release, but the user may have to adjust timings to enable programming mode due to limitation in its current sensing circuitry -#### Summary of key features and/or bug fixes by Point Release +**All New Major DCC++EX 4.0.0 features** + +- **New HAL Hardware Abstract Layer API** that automatically detects and greatly simplifies interfacing to many predefined accessory boards for servos, signals & sensors and added I/O (digital and analog inputs and outputs, servos etc). +- HAL Support for; + - MCP23008, MCP23017 and PCF9584 I2C GPIO Extender modules. + - PCA9685 PWM (servo & signal) control modules. + - Analogue inputs on Arduino pins and on ADS111x I2C modules. + - MP3 sound playback via DFPlayer module. + - HC-SR04 Ultrasonic range sensor module. + - VL53L0X Laser range sensor module (Time-Of-Flight). + - A new `` command to list the HAL devices attached to the command station + +**New Command Station Broadcast throttle logic** + +- Synchronizes multiple WiThrottles and PC based JMRI Throttles for direction, speed and F-key updates + +**New ‘Discovered Servers’ on WiFi Throttles** + +- Our New multicast Dynamic Network Server (mDNS) enhancement allows us to display the available WiFi server connections to a DCC++EX Command Station. Selecting it allows your WiThrottle App to connect to and load Server Rosters and function keys to your throttle from the new DCC++EX Command Station Server Roster. + +**New DCC++EX 4.0.0 with EX-RAIL Extended Railroad Automation Instruction Language** + +- Use to control your entire layout or as a separate accessory/animation controller +- Awesome, cleverly powerful yet simple user friendly scripting language for user built Automation & Routing scripts. +- You can control Engines, Sensors, Turnouts, Signals, Outputs and Accessories that entered into your new myAutomation.h file then uploaded into the DCC++EX Command Station. +- EX-RAIL scripts are automatically displayed as Automation {Handoff} and Route {Set} buttons on supported WiFi Throttle Apps. + +**New EX-RAIL ‘Roster’ Feature** + +- List and store user defined engine roster & function keys inside the command station and automatically load them in WiFi Throttle Apps. +- When choosing “DCC++EX” from discovered servers an Engine Driver or WiThrottle is directly connected to the Command Station. +- The EX-RAIL ’ROSTER’ command allows all the engine numbers, names and function keys you’ve listed in your myAutomation.h file to automatically upload the Command Station's ‘Server Roster’ into your Engine Driver and WiThrottle Apps. + +**New JMRI 4.99.2 and above specific DCC++EX 4.0 features** + +- Enhanced JMRI DCC++ Configure Base Station pane for building and maintaining Sensor, Turnout and Output devices, or these can automatically be populated from the DCC++EX Command Stations mySetup.h file into JMRI. + +- JMRI now supports multiple serial connected DCC++EX Command Stations, to display and track separate "Send DCC++ Command" and "DCC++ Trafic" Monitors for each Command Station at the same time. + For example: Use an Uno DCC++EX DecoderPro Programming Station {DCC++Prg} on a desktop programming track and a second Mega DCC++EX EX-RAIL Command Station for Operations {DCC++Ops} on the layout with an additional `` programming spur or siding track for acquiring an engine and ‘Drive Away’ onto the mainline (see the DriveAway feature for more information). + +**DCC++EX 4.0.0 additional product enhancements** + +- Additional Motor Shields and Motor Board {boosters) supported +- Additional Accessory boards supported for GPIO expansion, Sensors, Servos & Signals +- Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events and ‘D HAL SHOW’ devices and ‘D SERVO’ positions and ‘D RESET’ the command station while maintaining the serial connection with JMRI +- New EX-RAIL ’/’ slash command allows JMRI to directly communicate with many EX-RAIL scripts +- Turnout class revised to expand turnout capabilities and allow turnout names/descriptors to display in WiThrottle Apps. +- Build turnouts through either or both mySetup.h and myAutomation.h files and have them automatically passed to and populate JMRI Turnout Tables +- Turnout user names display in Engine Driver & WiThrottles +- Output class now allows ID > 255. +- Configuration options to globally flip polarity of DCC Accessory states when driven from command and `` command. +- Increased use of display for showing loco decoder programming information. +- Can disable EEPROM memory code to allow room for DCC++EX 4.0 to fit on a Uno Command Station +- Can define border between long and short addresses +- Native non-blocking I2C drivers for AVR and Nano architectures (fallback to blocking Wire library for other platforms). +- EEPROM layout change - deletes EEPROM contents on first start following upgrade. + + +**4.0.0 Bug Fixes** + +- Compiles on Nano Every +- Diagnostic display of ack pulses >32ku +- Current read from wrong ADC during interrupt +- AT(+) Command Pass Through +- CiDAP WiFi Drop out and the WiThrottle F-key looping error corrected +- One-off error in CIPSEND drop +- Common Fault Pin Error +- Uno Memory Utilization optimized + +#### Summary of Release 3.1.0 key features and/or bug fixes by Point Release **Summary of the key new features added to CommandStation-EX V3.0.16** @@ -154,7 +224,7 @@ The DCC-EX Team is pleased to release CommandStation-EX-v3.1.0 as a Production R - Neil McKechnie - Worcestershire, UK (NeilMck) - Fred Decker - Holly Springs, North Carolina, USA (FlightRisk) - Dave Cutting - Logan, Utah, USA (Dave Cutting/ David Cutting) -- M Steve Todd - +- M Steve Todd - Oregon, USA (MSteveTodd) - Scott Catalano - Pennsylvania - Gregor Baues - Île-de-France, France (grbba) @@ -174,6 +244,7 @@ The DCC-EX Team is pleased to release CommandStation-EX-v3.1.0 as a Production R - Roger Beschizza - Dorset, UK (Roger Beschizza) - Keith Ledbetter - Chicago, Illinois, USA (Keith Ledbetter) - Kevin Smith - Rochester Hills, Michigan USA (KC Smith) +- Colin Grabham - Central NSW, Australia (Kebbin) **WebThrotle-EX** @@ -185,13 +256,14 @@ The DCC-EX Team is pleased to release CommandStation-EX-v3.1.0 as a Production R - Larry Dribin - Release Management - Kevin Smith - Rochester Hills, Michigan USA (KC Smith) +- Herb Morton - Kingwood Texas, USA (Ash++) - Keith Ledbetter -- BradVan der Elst +- Brad Van der Elst - Andrew Pye - Mike Bowers - Randy McKenzie - Roberto Bravin -- Sim Brigden +- Sam Brigden - Alan Lautenslager - Martin Bafver - Mário André Silva @@ -202,5 +274,6 @@ The DCC-EX Team is pleased to release CommandStation-EX-v3.1.0 as a Production R **Downloads (zip and tar.gz) below. These are named without version number in the folder name to make the Arduino IDE happy.** -[CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v3.1.0-Prod/CommandStation-EX.zip) -[CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v3.1.0-Prod/CommandStation-EX.tar.gz) +[CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) + +[CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.tar.gz) diff --git a/version.h b/version.h index c34d926..6a4c485 100644 --- a/version.h +++ b/version.h @@ -3,8 +3,12 @@ #include "StringFormatter.h" -#define VERSION "3.2.0 rc13" -// 3.2.0 Major functional and non-functional changes. +#define VERSION "4.0.0" +// 4.0.0 Major functional and non-functional changes. +// Engine Driver "DriveAway" feature enhancement +//.......JMRI feature enhancement. Provides for multiple additional DCC++EX wifi +//.........connections as accessory controllers or CS for a programming track when +//.........motor shield is added // New HAL added for I/O (digital and analogue inputs and outputs, servos etc). // Support for MCP23008, MCP23017 and PCF9584 I2C GPIO Extender modules. // Support for PCA9685 PWM (servo) control modules. @@ -12,6 +16,7 @@ // Support for MP3 sound playback via DFPlayer module. // Support for HC-SR04 Ultrasonic range sensor module. // Support for VL53L0X Laser range sensor module (Time-Of-Flight). +//.........Added diagnostic command to show configured devices // Native non-blocking I2C drivers for AVR and Nano architectures (fallback // to blocking Wire library for other platforms). // EEPROM layout change - deletes EEPROM contents on first start following upgrade. @@ -27,7 +32,7 @@ // Bugfix: one-off error in CIPSEND drop // Compiles on Nano Every // Bugfix: disgnostic display of ack pulses >32kus -// Bugfix: Current read from wrong ADC during interrupt +//.......Bugfix: Current read from wrong ADC during interrupt // ... // 3.1.7 Bugfix: Unknown locos should have speed forward // 3.1.6 Make output ID two bytes and guess format/size of registered outputs found in EEPROM From 557b71c036098f5db2dc83b4bb3e69140aa651ba Mon Sep 17 00:00:00 2001 From: Fred Date: Wed, 16 Feb 2022 12:18:43 -0500 Subject: [PATCH 04/13] Frightrisk update v4 (#209) * Add Haba's bugfix for analog current reading with interrupts * Update verson and release notes for 4.0 * remove unwanted changes to newer files --- release_notes.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release_notes.md b/release_notes.md index f206a72..39c4b34 100644 --- a/release_notes.md +++ b/release_notes.md @@ -4,6 +4,8 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R [CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) + + [CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v0.0.0-Prod/CommandStation-EX.tar.gz) **Known Issues** @@ -68,7 +70,6 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R - Native non-blocking I2C drivers for AVR and Nano architectures (fallback to blocking Wire library for other platforms). - EEPROM layout change - deletes EEPROM contents on first start following upgrade. - **4.0.0 Bug Fixes** - Compiles on Nano Every @@ -276,4 +277,5 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R [CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) + [CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.tar.gz) From 4bfcaa605a3351e460f3c0b1399fcf9ab23cf890 Mon Sep 17 00:00:00 2001 From: Kebbin <85348898+Condo-Colin@users.noreply.github.com> Date: Fri, 18 Feb 2022 00:00:11 +1100 Subject: [PATCH 05/13] update release_notes.md (#212) --- release_notes.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/release_notes.md b/release_notes.md index 39c4b34..caef916 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,4 +1,4 @@ -The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production Release. Release v4.0.0 is a Major release that adds significant new product design & Automation features and bug fixes. The team continues improving the architecture of DCC++EX to make it more flexible and optimizing the code so as to get more performance from the Arduino (and other) microprocessors. This release includes all of the Point Releases from v3.2.0 to v3.2.0 rc13. +The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production Release. Release v4.0.0 is a Major release that adds significant new product design, plus Automation features and bug fixes. The team continues improving the architecture of DCC++EX to make it more flexible and optimizing the code so as to get more performance from the Arduino (and other) microprocessors. This release includes all of the Point Releases from v3.2.0 to v3.2.0 rc13. **Downloads (zip and tar.gz) below. These are named without version number in the folder name to make the Arduino IDE happy.** @@ -10,12 +10,12 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R **Known Issues** -- **Wi-Fi** - Requires sending commands from a serial monitor if you want to switch between AP mode and STA station mode after initial setup -- **Pololu Motor Shield** - is supported with this release, but the user may have to adjust timings to enable programming mode due to limitation in its current sensing circuitry +- **Wi-Fi** - Requires sending `` commands from a serial monitor if you want to switch between AP mode and STA station mode after initial setup +- **Pololu Motor Shield** - is supported with this release, but the user may have to adjust timings to enable programming mode due to limitations in its current sensing circuitry **All New Major DCC++EX 4.0.0 features** -- **New HAL Hardware Abstract Layer API** that automatically detects and greatly simplifies interfacing to many predefined accessory boards for servos, signals & sensors and added I/O (digital and analog inputs and outputs, servos etc). +- **New HAL Hardware Abstraction Layer API** that automatically detects and greatly simplifies interfacing to many predefined accessory boards for servos, signals & sensors and added I/O (digital and analog inputs and outputs, servos etc). - HAL Support for; - MCP23008, MCP23017 and PCF9584 I2C GPIO Extender modules. - PCA9685 PWM (servo & signal) control modules. @@ -37,33 +37,33 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R - Use to control your entire layout or as a separate accessory/animation controller - Awesome, cleverly powerful yet simple user friendly scripting language for user built Automation & Routing scripts. -- You can control Engines, Sensors, Turnouts, Signals, Outputs and Accessories that entered into your new myAutomation.h file then uploaded into the DCC++EX Command Station. +- You can control Engines, Sensors, Turnouts, Signals, Outputs and Accessories that are entered into your new myAutomation.h file, then uploaded into the DCC++EX Command Station. - EX-RAIL scripts are automatically displayed as Automation {Handoff} and Route {Set} buttons on supported WiFi Throttle Apps. **New EX-RAIL ‘Roster’ Feature** -- List and store user defined engine roster & function keys inside the command station and automatically load them in WiFi Throttle Apps. +- List and store user defined engine roster & function keys inside the command station, and automatically load them in WiFi Throttle Apps. - When choosing “DCC++EX” from discovered servers an Engine Driver or WiThrottle is directly connected to the Command Station. - The EX-RAIL ’ROSTER’ command allows all the engine numbers, names and function keys you’ve listed in your myAutomation.h file to automatically upload the Command Station's ‘Server Roster’ into your Engine Driver and WiThrottle Apps. **New JMRI 4.99.2 and above specific DCC++EX 4.0 features** -- Enhanced JMRI DCC++ Configure Base Station pane for building and maintaining Sensor, Turnout and Output devices, or these can automatically be populated from the DCC++EX Command Stations mySetup.h file into JMRI. +- Enhanced JMRI DCC++ Configure Base Station pane for building and maintaining Sensor, Turnout and Output devices, or these can automatically be populated from the DCC++EX Command Station's mySetup.h file into JMRI. -- JMRI now supports multiple serial connected DCC++EX Command Stations, to display and track separate "Send DCC++ Command" and "DCC++ Trafic" Monitors for each Command Station at the same time. +- JMRI now supports multiple serial connected DCC++EX Command Stations, to display and track separate "Send DCC++ Command" and "DCC++ Traffic" Monitors for each Command Station at the same time. For example: Use an Uno DCC++EX DecoderPro Programming Station {DCC++Prg} on a desktop programming track and a second Mega DCC++EX EX-RAIL Command Station for Operations {DCC++Ops} on the layout with an additional `` programming spur or siding track for acquiring an engine and ‘Drive Away’ onto the mainline (see the DriveAway feature for more information). **DCC++EX 4.0.0 additional product enhancements** - Additional Motor Shields and Motor Board {boosters) supported - Additional Accessory boards supported for GPIO expansion, Sensors, Servos & Signals -- Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events and ‘D HAL SHOW’ devices and ‘D SERVO’ positions and ‘D RESET’ the command station while maintaining the serial connection with JMRI +- Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events, ‘D HAL SHOW’ devices and ‘D SERVO’ positions, and ‘D RESET’ the command station while maintaining the serial connection with JMRI - New EX-RAIL ’/’ slash command allows JMRI to directly communicate with many EX-RAIL scripts - Turnout class revised to expand turnout capabilities and allow turnout names/descriptors to display in WiThrottle Apps. -- Build turnouts through either or both mySetup.h and myAutomation.h files and have them automatically passed to and populate JMRI Turnout Tables +- Build turnouts through either or both mySetup.h and myAutomation.h files, and have them automatically passed to, and populate, JMRI Turnout Tables - Turnout user names display in Engine Driver & WiThrottles - Output class now allows ID > 255. -- Configuration options to globally flip polarity of DCC Accessory states when driven from command and `` command. +- Configuration options to globally flip polarity of DCC Accessory states when driven from `` command and `` command. - Increased use of display for showing loco decoder programming information. - Can disable EEPROM memory code to allow room for DCC++EX 4.0 to fit on a Uno Command Station - Can define border between long and short addresses @@ -73,7 +73,7 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R **4.0.0 Bug Fixes** - Compiles on Nano Every -- Diagnostic display of ack pulses >32ku +- Diagnostic display of ack pulses >32ms - Current read from wrong ADC during interrupt - AT(+) Command Pass Through - CiDAP WiFi Drop out and the WiThrottle F-key looping error corrected From cf905ce2f36e780f7e5a9072fccb2a6485f25b05 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Thu, 17 Feb 2022 17:21:24 +0000 Subject: [PATCH 06/13] Clarify config.h entry for an OLED with a SH1106 (#210) See: 79763a3 ("SH1106 OLED Display Offset Fix (#169)", 2021-06-10) 97f3450 ("Simplify OLED driver initialisation.", 2021-11-24) --- config.example.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.example.h b/config.example.h index 7dad23d..731c56c 100644 --- a/config.example.h +++ b/config.example.h @@ -125,7 +125,7 @@ The configuration file for DCC-EX Command Station //OR define OLED_DRIVER width,height in pixels (address auto detected) // 128x32 or 128x64 I2C SSD1306-based devices are supported. -// Also 132x64 I2C SH1106 devices +// Use 132,64 for a SH1106-based I2C device with a 128x64 display. // #define OLED_DRIVER 128,32 // Define scroll mode as 0, 1 or 2 From c47dd101a5587fb0bb1dd5602adc0002aebc2f21 Mon Sep 17 00:00:00 2001 From: Fred Date: Thu, 17 Feb 2022 12:29:59 -0500 Subject: [PATCH 07/13] Update release_notes_v4.0.0.md --- Release_Notes/release_notes_v4.0.0.md | 66 +++++++++++++-------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/Release_Notes/release_notes_v4.0.0.md b/Release_Notes/release_notes_v4.0.0.md index 759a1f8..4cc16d3 100644 --- a/Release_Notes/release_notes_v4.0.0.md +++ b/Release_Notes/release_notes_v4.0.0.md @@ -1,21 +1,23 @@ Version 4.0 Release Notes ************************* -The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production Release. Release v4.0.0 is a Major release that adds significant new product design & Automation features and bug fixes. The team continues improving the architecture of DCC++EX to make it more flexible and optimizing the code so as to get more performance from the Arduino (and other) microprocessors. This release includes all of the Point Releases from v3.2.0 to v3.2.13. +The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production Release. Release v4.0.0 is a Major release that adds significant new product design, plus Automation features and bug fixes. The team continues improving the architecture of DCC++EX to make it more flexible and optimizing the code so as to get more performance from the Arduino (and other) microprocessors. This release includes all of the Point Releases from v3.2.0 to v3.2.0 rc13. **Downloads (zip and tar.gz) below. These are named without version number in the folder name to make the Arduino IDE happy.** [CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) + + [CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v0.0.0-Prod/CommandStation-EX.tar.gz) **Known Issues** -- **Wi-Fi** - Requires sending commands from a serial monitor if you want to switch between AP mode and STA station mode after initial setup -- **Pololu Motor Shield** - is supported with this release, but the user may have to adjust timings to enable programming mode due to limitation in its current sensing circuitry +- **Wi-Fi** - Requires sending `` commands from a serial monitor if you want to switch between AP mode and STA station mode after initial setup +- **Pololu Motor Shield** - is supported with this release, but the user may have to adjust timings to enable programming mode due to limitations in its current sensing circuitry **All New Major DCC++EX 4.0.0 features** -- **New HAL Hardware Abstract Layer API** that automatically detects and greatly simplifies interfacing to many predefined accessory boards for servos, signals & sensors and added I/O (digital and analog inputs and outputs, servos etc). +- **New HAL Hardware Abstraction Layer API** that automatically detects and greatly simplifies interfacing to many predefined accessory boards for servos, signals & sensors and added I/O (digital and analog inputs and outputs, servos etc). - HAL Support for; - MCP23008, MCP23017 and PCF9584 I2C GPIO Extender modules. - PCA9685 PWM (servo & signal) control modules. @@ -23,7 +25,7 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R - MP3 sound playback via DFPlayer module. - HC-SR04 Ultrasonic range sensor module. - VL53L0X Laser range sensor module (Time-Of-Flight). - and a new `` command to list the HAL devices attached to the command station + - A new `` command to list the HAL devices attached to the command station **New Command Station Broadcast throttle logic** @@ -31,65 +33,57 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R **New ‘Discovered Servers’ on WiFi Throttles** -- WiThrottles now detect and display both DCC++EX Command Station name and JMRI WiThrottle Server Profile name in the WiFi Throttle Apps. +- Our New multicast Dynamic Network Server (mDNS) enhancement allows us to display the available WiFi server connections to a DCC++EX Command Station. Selecting it allows your WiThrottle App to connect to and load Server Rosters and function keys to your throttle from the new DCC++EX Command Station Server Roster. -- Sample Engine Driver App Discovered Servers - “DCC++EX” {Direct connect to the Command Station} - “My JMRI Railroad” {JMRI connected via WiThrottle Server} - -- Our New multicast Dynamic Network Server (mDNS) enhancement allows us to display the available WiFi server connections to a DCC++EX Command Station. Choosing one allows your WiThrottle App to connect to and load Server Rosters and function keys to your throttle from Either the DCC++EX Command Station Server Roster, Or from JMRI Engine Roster list. - - -**New DCC++EX 4.0.0 with EX-RAIL Extended Railroad Automation Instruction Language** - -- Awesome, cleverly powerful yet simple user friendly scripting language for user built Automation & Routing scripts. You can control Engines, Sensors, Turnouts, Signals, Outputs and Accessories that are uploaded into the DCC++EX Command Station. +**New DCC++EX 4.0.0 with EX-RAIL Extended Railroad Automation Instruction Language** +- Use to control your entire layout or as a separate accessory/animation controller +- Awesome, cleverly powerful yet simple user friendly scripting language for user built Automation & Routing scripts. +- You can control Engines, Sensors, Turnouts, Signals, Outputs and Accessories that are entered into your new myAutomation.h file, then uploaded into the DCC++EX Command Station. - EX-RAIL scripts are automatically displayed as Automation {Handoff} and Route {Set} buttons on supported WiFi Throttle Apps. **New EX-RAIL ‘Roster’ Feature** -- List and store user defined engine roster & function keys inside the command station and automatically load them in WiFi Throttle Apps. -- When choosing “DCC++EX” from discovered servers an Engine Driver or WiThrottle is directly connected to the Command Station. The EX-RAIL ’ROSTER’ command allows all the engine numbers, names and function keys you’ve listed in your myAutomation.h file to automatically upload the Command Station's ‘Server Roster’ into your Engine Driver and WiThrottle Apps. +- List and store user defined engine roster & function keys inside the command station, and automatically load them in WiFi Throttle Apps. +- When choosing “DCC++EX” from discovered servers an Engine Driver or WiThrottle is directly connected to the Command Station. +- The EX-RAIL ’ROSTER’ command allows all the engine numbers, names and function keys you’ve listed in your myAutomation.h file to automatically upload the Command Station's ‘Server Roster’ into your Engine Driver and WiThrottle Apps. **New JMRI 4.99.2 and above specific DCC++EX 4.0 features** -- Enhanced JMRI DCC++ Tools Base Station pane for building and maintaining Sensor, Turnout and Output devices which can be manually entered into JMRI, or can automatically be populated from the DCC++EX Command Stations mySetup.h file into JMRI. - -- JMRI may now have multiple serial connected DCC++EX Command Stations, and display and track separate "Send DCC++ Command" and "DCC++ Trafic" Monitors for each Command Station at the same time. This allows multiple simultaneous Command Stations running on one Instance of JMRI software. -For example: Use an Uno DCC++EX DecodePro Programming Station {DCC++Prg} on a desktop programming track and a second Mega DCC++EX EX-RAIL Command Station for Operations {DCC++Ops} on the layout with an additional `` programming spur or siding track for acquiring an engine and ‘Drive Away’ onto the mainline (see the DriveAway feature for more information). +- Enhanced JMRI DCC++ Configure Base Station pane for building and maintaining Sensor, Turnout and Output devices, or these can automatically be populated from the DCC++EX Command Station's mySetup.h file into JMRI. +- JMRI now supports multiple serial connected DCC++EX Command Stations, to display and track separate "Send DCC++ Command" and "DCC++ Traffic" Monitors for each Command Station at the same time. + For example: Use an Uno DCC++EX DecoderPro Programming Station {DCC++Prg} on a desktop programming track and a second Mega DCC++EX EX-RAIL Command Station for Operations {DCC++Ops} on the layout with an additional `` programming spur or siding track for acquiring an engine and ‘Drive Away’ onto the mainline (see the DriveAway feature for more information). **DCC++EX 4.0.0 additional product enhancements** - Additional Motor Shields and Motor Board {boosters) supported - Additional Accessory boards supported for GPIO expansion, Sensors, Servos & Signals -- Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events and ‘D HAL SHOW’ devices and ‘D SERVO’ positions and the ‘D RESET’ the command station while maintaining the serial connection with JMRI -- New EX-RAIL ’/’ slash command allows JMRI to directly communicate with EX-RAIL scripts +- Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events, ‘D HAL SHOW’ devices and ‘D SERVO’ positions, and ‘D RESET’ the command station while maintaining the serial connection with JMRI +- New EX-RAIL ’/’ slash command allows JMRI to directly communicate with many EX-RAIL scripts - Turnout class revised to expand turnout capabilities and allow turnout names/descriptors to display in WiThrottle Apps. -- Build turnouts through either or both mySetup.h and myAutomation.h files and have them automatically passed to and populate JMRI Turnout Tables -- Turnout names display in Engine Driver & WiThrottles +- Build turnouts through either or both mySetup.h and myAutomation.h files, and have them automatically passed to, and populate, JMRI Turnout Tables +- Turnout user names display in Engine Driver & WiThrottles - Output class now allows ID > 255. -- Configuration options to globally flip polarity of DCC Accessory states when driven from command and `` command. +- Configuration options to globally flip polarity of DCC Accessory states when driven from `` command and `` command. - Increased use of display for showing loco decoder programming information. - Can disable EEPROM memory code to allow room for DCC++EX 4.0 to fit on a Uno Command Station - Can define border between long and short addresses -- Turnout and accessory states (thrown/closed = 0/1 or 1/0) can be set to match RCN-213 - Native non-blocking I2C drivers for AVR and Nano architectures (fallback to blocking Wire library for other platforms). - EEPROM layout change - deletes EEPROM contents on first start following upgrade. +**4.0.0 Bug Fixes** -**Bug Fixes** - -- One-off error in CIPSEND drop - Compiles on Nano Every -- Diagnostic display of ack pulses >32ku +- Diagnostic display of ack pulses >32ms - Current read from wrong ADC during interrupt - AT(+) Command Pass Through - CiDAP WiFi Drop out and the WiThrottle F-key looping error corrected +- One-off error in CIPSEND drop - Common Fault Pin Error - Uno Memory Utilization optimized -#### Summary of key features and/or bug fixes by Point Release +#### Summary of Release 3.1.0 key features and/or bug fixes by Point Release **Summary of the key new features added to CommandStation-EX V3.0.16** @@ -233,7 +227,7 @@ For example: Use an Uno DCC++EX DecodePro Programming Station {DCC++Prg} on a de - Neil McKechnie - Worcestershire, UK (NeilMck) - Fred Decker - Holly Springs, North Carolina, USA (FlightRisk) - Dave Cutting - Logan, Utah, USA (Dave Cutting/ David Cutting) -- M Steve Todd - +- M Steve Todd - Oregon, USA (MSteveTodd) - Scott Catalano - Pennsylvania - Gregor Baues - Île-de-France, France (grbba) @@ -253,6 +247,7 @@ For example: Use an Uno DCC++EX DecodePro Programming Station {DCC++Prg} on a de - Roger Beschizza - Dorset, UK (Roger Beschizza) - Keith Ledbetter - Chicago, Illinois, USA (Keith Ledbetter) - Kevin Smith - Rochester Hills, Michigan USA (KC Smith) +- Colin Grabham - Central NSW, Australia (Kebbin) **WebThrotle-EX** @@ -264,6 +259,7 @@ For example: Use an Uno DCC++EX DecodePro Programming Station {DCC++Prg} on a de - Larry Dribin - Release Management - Kevin Smith - Rochester Hills, Michigan USA (KC Smith) +- Herb Morton - Kingwood Texas, USA (Ash++) - Keith Ledbetter - Brad Van der Elst - Andrew Pye @@ -282,4 +278,6 @@ For example: Use an Uno DCC++EX DecodePro Programming Station {DCC++Prg} on a de **Downloads (zip and tar.gz) below. These are named without version number in the folder name to make the Arduino IDE happy.** [CommandStation-EX.zip](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.zip) + + [CommandStation-EX.tar.gz](https://github.com/DCC-EX/CommandStation-EX/releases/download/v4.0.0-Prod/CommandStation-EX.tar.gz) From e57cd1e2aae0d4bbf2ac26fe752165d7c20b3ca7 Mon Sep 17 00:00:00 2001 From: Fred Date: Thu, 17 Feb 2022 15:00:59 -0500 Subject: [PATCH 08/13] Update release_notes.md --- release_notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release_notes.md b/release_notes.md index caef916..e5b06ed 100644 --- a/release_notes.md +++ b/release_notes.md @@ -58,6 +58,7 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R - Additional Motor Shields and Motor Board {boosters) supported - Additional Accessory boards supported for GPIO expansion, Sensors, Servos & Signals - Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events, ‘D HAL SHOW’ devices and ‘D SERVO’ positions, and ‘D RESET’ the command station while maintaining the serial connection with JMRI +- Automatic retry on failed ACK detection to give decoders another chance - New EX-RAIL ’/’ slash command allows JMRI to directly communicate with many EX-RAIL scripts - Turnout class revised to expand turnout capabilities and allow turnout names/descriptors to display in WiThrottle Apps. - Build turnouts through either or both mySetup.h and myAutomation.h files, and have them automatically passed to, and populate, JMRI Turnout Tables From 3038f29dac9bc65158b39568abe518dcae7a3cc6 Mon Sep 17 00:00:00 2001 From: Fred Date: Thu, 17 Feb 2022 15:02:49 -0500 Subject: [PATCH 09/13] Update release_notes_v4.0.0.md --- Release_Notes/release_notes_v4.0.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Release_Notes/release_notes_v4.0.0.md b/Release_Notes/release_notes_v4.0.0.md index 4cc16d3..5a54516 100644 --- a/Release_Notes/release_notes_v4.0.0.md +++ b/Release_Notes/release_notes_v4.0.0.md @@ -60,6 +60,7 @@ The DCC-EX Team is pleased to release CommandStation-EX-v4.0.0 as a Production R - Additional Motor Shields and Motor Board {boosters) supported - Additional Accessory boards supported for GPIO expansion, Sensors, Servos & Signals - Additional diagnostic commands like ‘D ACK RETRY’ and ‘D EXRAIL ON’ events, ‘D HAL SHOW’ devices and ‘D SERVO’ positions, and ‘D RESET’ the command station while maintaining the serial connection with JMRI +- Automatic retry on failed ACK detection to give decoders another chance - New EX-RAIL ’/’ slash command allows JMRI to directly communicate with many EX-RAIL scripts - Turnout class revised to expand turnout capabilities and allow turnout names/descriptors to display in WiThrottle Apps. - Build turnouts through either or both mySetup.h and myAutomation.h files, and have them automatically passed to, and populate, JMRI Turnout Tables From fa4f5f08efb890c14cadd4a4fb3a8066b5c99c5d Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Sun, 6 Mar 2022 15:05:35 +0000 Subject: [PATCH 10/13] Comment Typos (#214) * Example config comment typos * Code comment typos --- EXRAIL2.cpp | 10 +++++----- config.example.h | 8 ++++---- myAutomation.example.h | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index af6f0a1..737cef6 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -67,11 +67,11 @@ const int16_t HASH_KEYWORD_ROUTES=-3702; // One instance of RMFT clas is used for each "thread" in the automation. // Each thread manages a loco on a journey through the layout, and/or may manage a scenery automation. -// The thrrads exist in a ring, each time through loop() the next thread in the ring is serviced. +// The threads exist in a ring, each time through loop() the next thread in the ring is serviced. // Statics const int16_t LOCO_ID_WAITING=-99; // waiting for loco id from prog track -int16_t RMFT2::progtrackLocoId; // used for callback when detecting a loco on prograck +int16_t RMFT2::progtrackLocoId; // used for callback when detecting a loco on prog track bool RMFT2::diag=false; // RMFT2 * RMFT2::loopTask=NULL; // loopTask contains the address of ONE of the tasks in a ring. RMFT2 * RMFT2::pausingTask=NULL; // Task causing a PAUSE. @@ -870,13 +870,13 @@ void RMFT2::loop2() { break; case OPCODE_AUTOSTART: // Handled only during begin process - case OPCODE_PAD: // Just a padding for previous opcode needing >1 operad byte. + case OPCODE_PAD: // Just a padding for previous opcode needing >1 operand byte. case OPCODE_TURNOUT: // Turnout definition ignored at runtime case OPCODE_SERVOTURNOUT: // Turnout definition ignored at runtime case OPCODE_PINTURNOUT: // Turnout definition ignored at runtime - case OPCODE_ONCLOSE: // Turnout event catcers ignored here + case OPCODE_ONCLOSE: // Turnout event catchers ignored here case OPCODE_ONTHROW: - case OPCODE_ONACTIVATE: // Activate event catcers ignored here + case OPCODE_ONACTIVATE: // Activate event catchers ignored here case OPCODE_ONDEACTIVATE: break; diff --git a/config.example.h b/config.example.h index 731c56c..53d0d55 100644 --- a/config.example.h +++ b/config.example.h @@ -29,7 +29,7 @@ The configuration file for DCC-EX Command Station ///////////////////////////////////////////////////////////////////////////////////// // NOTE: Before connecting these boards and selecting one in this software // check the quick install guides!!! Some of these boards require a voltage -// generating resitor on the current sense pin of the device. Failure to select +// generating resistor on the current sense pin of the device. Failure to select // the correct resistor could damage the sense pin on your Arduino or destroy // the device. // @@ -85,7 +85,7 @@ The configuration file for DCC-EX Command Station // WIFI_PASSWORD is the network password for your home network or if // you want to change the password from default AP mode password // to the AP password you want. -// Your password may not conain ``"'' (double quote, ASCII 0x22). +// Your password may not contain ``"'' (double quote, ASCII 0x22). #define WIFI_PASSWORD "Your network passwd" // // WIFI_HOSTNAME: You probably don't need to change this @@ -137,7 +137,7 @@ The configuration file for DCC-EX Command Station // If you do not need the EEPROM at all, you can disable all the code that saves // data in the EEPROM. You might want to do that if you are in a Arduino UNO // and want to use the EX-RAIL automation. Otherwise you do not have enough RAM -// to do that. Of course, then none of the EEPROM related commands works. +// to do that. Of course, then none of the EEPROM related commands work. // // #define DISABLE_EEPROM @@ -174,7 +174,7 @@ The configuration file for DCC-EX Command Station // If you have issues with that the direction of the accessory commands is // reversed (for example when converting from another CS to DCC-EX) then -// you can use this to revese the sense of all accessory commmands sent +// you can use this to reverse the sense of all accessory commmands sent // over DCC++. This #define likewise inverts the behaviour of the command // for triggering DCC Accessory Decoders, so that generates a // DCC packet with D=1 (close turnout) and generates D=0 diff --git a/myAutomation.example.h b/myAutomation.example.h index f1bad26..4bb6301 100644 --- a/myAutomation.example.h +++ b/myAutomation.example.h @@ -1,7 +1,7 @@ /* This is an automation example file. * The presence of a file called "myAutomation.h" brings EX-RAIL code into * the command station. - * The auotomation may have multiple concurrent tasks. + * The automation may have multiple concurrent tasks. * A task may * - Act as a ROUTE setup macro for a user to drive over * - drive a loco through an AUTOMATION @@ -10,10 +10,10 @@ * At startup, a single task is created to execute the first * instruction after E$XRAIL. * This task may simply follow a route, or may START - * further tasks (thats is.. send a loco out along a route). + * further tasks (that is.. send a loco out along a route). * * Where the loco id is not known at compile time, a new task - * can be creatd with the command: + * can be created with the command: * * * A ROUTE, AUTOMATION or SEQUENCE are internally identical in ExRail terms From 90092b4ad55a9d7d8404a55aeb887e05874fdfb5 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Sun, 6 Mar 2022 15:07:44 +0000 Subject: [PATCH 11/13] Remove EXRAIL/ENDEXRAIL from myAutomation.example.h (#215) Use "startup sequence" to describe the initial instructions. --- myAutomation.example.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/myAutomation.example.h b/myAutomation.example.h index 4bb6301..1382a52 100644 --- a/myAutomation.example.h +++ b/myAutomation.example.h @@ -7,8 +7,7 @@ * - drive a loco through an AUTOMATION * - automate some cosmetic part of the layout without any loco. * - * At startup, a single task is created to execute the first - * instruction after E$XRAIL. + * At startup, a single task is created to execute the startup sequence. * This task may simply follow a route, or may START * further tasks (that is.. send a loco out along a route). * @@ -24,11 +23,10 @@ * */ -EXRAIL // myAutomation must start with the EXRAIL instruction - // This is the default starting route, AKA SEQUENCE(0) - SENDLOCO(3,1) // send loco 3 off along route 1 - SENDLOCO(10,2) // send loco 10 off along route 2 - DONE // This just ends the startup thread, leaving 2 others running. +// This is the startup sequence, AKA SEQUENCE(0) +SENDLOCO(3,1) // send loco 3 off along route 1 +SENDLOCO(10,2) // send loco 10 off along route 2 +DONE // This just ends the startup thread, leaving 2 others running. /* SEQUENCE(1) is a simple shuttle between 2 sensors * S20 and S21 are sensors on arduino pins 20 and 21 @@ -78,7 +76,3 @@ EXRAIL // myAutomation must start with the EXRAIL instruction AT(33) STOP DELAY(20000) // wait 20 seconds FOLLOW(2) // follow sequence 2... ie repeat the process - - ENDEXRAIL // marks the end of the EXRAIL program. - - From c15ea6e08348465df67b480acb53aec65004c50b Mon Sep 17 00:00:00 2001 From: Fred Date: Mon, 7 Mar 2022 08:05:02 -0500 Subject: [PATCH 12/13] Update config.example.h Add description of display scroll modes --- config.example.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.example.h b/config.example.h index 53d0d55..3dac207 100644 --- a/config.example.h +++ b/config.example.h @@ -129,6 +129,9 @@ The configuration file for DCC-EX Command Station // #define OLED_DRIVER 128,32 // Define scroll mode as 0, 1 or 2 +// * #define SCROLLMODE 0 is scroll continuous (fill screen if poss), +// * #define SCROLLMODE 1 is by page (alternate between pages), +// * #define SCROLLMODE 2 is by row (move up 1 row at a time). #define SCROLLMODE 1 ///////////////////////////////////////////////////////////////////////////////////// From ac3ffd2a36274198061b6ed11f1f72a9eba3669d Mon Sep 17 00:00:00 2001 From: Asbelos Date: Mon, 7 Mar 2022 16:30:47 +0000 Subject: [PATCH 13/13] Exrail BROADCAST and POWERON version 4.0.1 (#216) * EXRAIL BROADCAST("msg") UNTESTED * Add POWERON to EXRAIL * POWERON only powers main, join will do both * Update Version 4.0.1 * Broadcast jopin after driveaway * rollback of previous edit line 535 WiThrottle.cpp * restructure GetLocoCallback() for better readability and put broadcastPower() at right place Co-authored-by: Ash-4 <81280775+Ash-4@users.noreply.github.com> Co-authored-by: Harald Barth --- CommandDistributor.cpp | 5 +++++ CommandDistributor.h | 1 + DCCEX.h | 2 +- EXRAIL2.cpp | 6 ++++++ EXRAIL2.h | 2 +- EXRAIL2MacroReset.h | 4 ++++ EXRAILMacros.h | 4 ++++ WiThrottle.cpp | 43 ++++++++++++++++++++++++------------------ version.h | 4 +++- 9 files changed, 50 insertions(+), 21 deletions(-) diff --git a/CommandDistributor.cpp b/CommandDistributor.cpp index 4e5ecb9..9bde259 100644 --- a/CommandDistributor.cpp +++ b/CommandDistributor.cpp @@ -135,3 +135,8 @@ void CommandDistributor::broadcastPower() { LCD(2,F("Power %S%S"),state=='1'?F("On"):F("Off"),reason); broadcast(true); } + +void CommandDistributor::broadcastText(const FSH * msg) { + StringFormatter::send(broadcastBufferWriter,F("%S"),msg); + broadcast(false); +} diff --git a/CommandDistributor.h b/CommandDistributor.h index 51458fa..a9af3bb 100644 --- a/CommandDistributor.h +++ b/CommandDistributor.h @@ -32,6 +32,7 @@ public : static void broadcastSensor(int16_t id, bool value); static void broadcastTurnout(int16_t id, bool isClosed); static void broadcastPower(); + static void broadcastText(const FSH * msg); static void forget(byte clientId); private: static void broadcast(bool includeWithrottleClients); diff --git a/DCCEX.h b/DCCEX.h index 00d89de..d60edfa 100644 --- a/DCCEX.h +++ b/DCCEX.h @@ -43,7 +43,7 @@ #include "Turnouts.h" #include "Sensors.h" #include "Outputs.h" -#include "EXRAIL.h" #include "CommandDistributor.h" +#include "EXRAIL.h" #endif diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index 737cef6..127a1ab 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -794,6 +794,12 @@ void RMFT2::loop2() { DCC::setProgTrackSyncMain(true); CommandDistributor::broadcastPower(); break; + + case OPCODE_POWERON: + DCCWaveform::mainTrack.setPowerMode(POWERMODE::ON); + DCC::setProgTrackSyncMain(false); + CommandDistributor::broadcastPower(); + break; case OPCODE_UNJOIN: DCC::setProgTrackSyncMain(false); diff --git a/EXRAIL2.h b/EXRAIL2.h index b44ada6..3114511 100644 --- a/EXRAIL2.h +++ b/EXRAIL2.h @@ -44,7 +44,7 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE, OPCODE_PAD,OPCODE_FOLLOW,OPCODE_CALL,OPCODE_RETURN, OPCODE_JOIN,OPCODE_UNJOIN,OPCODE_READ_LOCO1,OPCODE_READ_LOCO2,OPCODE_POM, OPCODE_START,OPCODE_SETLOCO,OPCODE_SENDLOCO, - OPCODE_PAUSE, OPCODE_RESUME,OPCODE_POWEROFF, + OPCODE_PAUSE, OPCODE_RESUME,OPCODE_POWEROFF,OPCODE_POWERON, OPCODE_ONCLOSE, OPCODE_ONTHROW, OPCODE_SERVOTURNOUT, OPCODE_PINTURNOUT, OPCODE_PRINT,OPCODE_DCCACTIVATE, OPCODE_ONACTIVATE,OPCODE_ONDEACTIVATE,OPCODE_IFGTE,OPCODE_IFLT, diff --git a/EXRAIL2MacroReset.h b/EXRAIL2MacroReset.h index 852eb70..6a28b7f 100644 --- a/EXRAIL2MacroReset.h +++ b/EXRAIL2MacroReset.h @@ -32,6 +32,7 @@ #undef ATTIMEOUT #undef AUTOMATION #undef AUTOSTART +#undef BROADCAST #undef CALL #undef CLOSE #undef DEACTIVATE @@ -79,6 +80,7 @@ #undef PRINT #undef POM #undef POWEROFF +#undef POWERON #undef READ_LOCO #undef RED #undef RESERVE @@ -121,6 +123,7 @@ #define ATTIMEOUT(sensor_id,timeout_ms) #define AUTOMATION(id, description) #define AUTOSTART +#define BROADCAST(msg) #define CALL(route) #define CLOSE(id) #define DEACTIVATE(addr,subaddr) @@ -168,6 +171,7 @@ #define PRINT(msg) #define POM(cv,value) #define POWEROFF +#define POWERON #define READ_LOCO #define RED(signal_id) #define RESERVE(blockid) diff --git a/EXRAILMacros.h b/EXRAILMacros.h index 7efb445..aa8c971 100644 --- a/EXRAILMacros.h +++ b/EXRAILMacros.h @@ -69,6 +69,8 @@ void RMFT2::emitWithrottleDescriptions(Print * stream) { // Pass 3... Create Text sending functions #include "EXRAIL2MacroReset.h" const int StringMacroTracker1=__COUNTER__; +#undef BROADCAST +#define BROADCAST(msg) case (__COUNTER__ - StringMacroTracker1) : CommandDistributor::broadcastText(F(msg));break; #undef PRINT #define PRINT(msg) case (__COUNTER__ - StringMacroTracker1) : printMessage2(F(msg));break; #undef LCN @@ -170,6 +172,7 @@ const FLASH int16_t RMFT2::SignalDefinitions[] = { #define ATTIMEOUT(sensor_id,timeout) OPCODE_ATTIMEOUT1,0,0,OPCODE_ATTIMEOUT2,V(sensor_id),OPCODE_PAD,V(timeout/100L), #define AUTOMATION(id, description) OPCODE_AUTOMATION, V(id), #define AUTOSTART OPCODE_AUTOSTART,0,0, +#define BROADCAST(msg) PRINT(msg) #define CALL(route) OPCODE_CALL,V(route), #define CLOSE(id) OPCODE_CLOSE,V(id), #define DEACTIVATE(addr,subaddr) OPCODE_DCCACTIVATE,V(addr<<3 | subaddr<<1), @@ -216,6 +219,7 @@ const FLASH int16_t RMFT2::SignalDefinitions[] = { #define PIN_TURNOUT(id,pin,description...) OPCODE_PINTURNOUT,V(id),OPCODE_PAD,V(pin), #define POM(cv,value) OPCODE_POM,V(cv),OPCODE_PAD,V(value), #define POWEROFF OPCODE_POWEROFF,0,0, +#define POWERON OPCODE_POWERON,0,0, #define PRINT(msg) OPCODE_PRINT,V(__COUNTER__ - StringMacroTracker2), #define READ_LOCO OPCODE_READ_LOCO1,0,0,OPCODE_READ_LOCO2,0,0, #define RED(signal_id) OPCODE_RED,V(signal_id), diff --git a/WiThrottle.cpp b/WiThrottle.cpp index 312cf93..d91745c 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -514,25 +514,32 @@ char WiThrottle::stashThrottleChar; void WiThrottle::getLocoCallback(int16_t locoid) { stashStream->mark(stashClient); - if (locoid<=0) + if (locoid<=0) { StringFormatter::send(stashStream,F("HMNo loco found on prog track\n")); - else { - // short or long - char addrchar; - if (locoid & LONG_ADDR_MARKER) { // long addr - locoid = locoid ^ LONG_ADDR_MARKER; - addrchar = 'L'; - } else - addrchar = 'S'; - if (addrchar == 'L' && locoid <= HIGHEST_SHORT_ADDR ) - StringFormatter::send(stashStream,F("HMLong addr %d <= %d not supported\n"), locoid,HIGHEST_SHORT_ADDR); - else { - char addcmd[20]={'M',stashThrottleChar,'+', addrchar}; - itoa(locoid,addcmd+4,10); - stashInstance->multithrottle(stashStream, (byte *)addcmd); - DCCWaveform::progTrack.setPowerMode(POWERMODE::ON); - DCC::setProgTrackSyncMain(true); // <1 JOIN> so we can drive loco away - } + stashStream->commit(); // done here, commit and return + return; } + + // short or long + char addrchar; + if (locoid & LONG_ADDR_MARKER) { // maker bit indicates long addr + locoid = locoid ^ LONG_ADDR_MARKER; // remove marker bit to get real long addr + if (locoid <= HIGHEST_SHORT_ADDR ) { // out of range for long addr + StringFormatter::send(stashStream,F("HMLong addr %d <= %d unsupported\n"), locoid, HIGHEST_SHORT_ADDR); + stashStream->commit(); // done here, commit and return + return; + } + addrchar = 'L'; + } else { + addrchar = 'S'; + } + + char addcmd[20]={'M',stashThrottleChar,'+', addrchar}; + itoa(locoid,addcmd+4,10); + stashInstance->multithrottle(stashStream, (byte *)addcmd); + DCCWaveform::progTrack.setPowerMode(POWERMODE::ON); + DCC::setProgTrackSyncMain(true); // <1 JOIN> so we can drive loco away stashStream->commit(); + CommandDistributor::broadcastPower(); + } diff --git a/version.h b/version.h index 6a4c485..2889212 100644 --- a/version.h +++ b/version.h @@ -3,7 +3,9 @@ #include "StringFormatter.h" -#define VERSION "4.0.0" +#define VERSION "4.0.1" +// 4.0.1 EXRAIL BROADCAST("msg") +// EXRAIL POWERON // 4.0.0 Major functional and non-functional changes. // Engine Driver "DriveAway" feature enhancement //.......JMRI feature enhancement. Provides for multiple additional DCC++EX wifi