2020-09-22 20:57:11 +02:00
|
|
|
/**********************************************************************
|
|
|
|
|
Nano every2 (#129)
* Start adding back unowifi stuffz
* Uno Wifi compiling
* Fixes for compile arduino unowifi r2
* FlasString and Timers for Uno Wifi
ALL these changes should be portable back to master
* Remove extra timer that was already added
* Changed to EveryTimerB
* Add everytimerb.h
* Cleanup
* Linear address <a> cmd
* Allow lower case keywords
* Add the F define to be on safe side if it is not present in the library core code
* Clean simple Timer interface
Removes overkill files, puts all timer in a single small file. (DCCTimer)
* Timer port
* Timer working
And slow wave command removed
* Correcting non-portables merged from master
* Wave-state machine ( part 11)
* Microtuning waveform
Significant reduction in code paths and call overheads
* Current check cleanup
* Fix no-loco id
Has to handle -1 correctly
* fix wrong format letter
* redo flow through wifisetup again
* version++
* bugfixes wifi setup
* Retry harder for AP mode
* Remove unued if
* DIO2 replacement
Currently for writing signal pins during waveform.
* Drop analogReadFast (see DCCTimer)
AnalogRead speed set in DCCTimer for ease of porting.
Code tidy and diagnostics in MotorDriver
* UNTESTED fast power,brake,fault pins
* Distunguish between in/out of FASTPIN
* minor performance tweaks
* Config comments and example use
* Config/example loading
* IP/PORT on LCD
* Ethernet simulated mac
Plus fixed listening port
* Github SHA
* Committing a SHA
* Fix for nano compile
* Comments and a reliability fix.
* UnoRev2 protection
* PWM pin implementation
* fix wifi setup issue
* Reinstate IP_PORT
* Wifi channel and code cleaninga
* Reduce duplicated F() macros
Compiler isn't as clever as one might expect
* Committing a SHA
* Update config.example.h
Add comment to wifi channel section
* Committing a SHA
* Handle shields with common fault pins (Pololu)
* Committing a SHA
* remove warning
* Committing a SHA
* only do the sha generation on master
* yaml syntax
* Fast SSD1306 OLED driver
Incorporate code from SSD1306Ascii library to speed up OLED screen updates, reduce memory requirements and eliminate some library dependences.
* Fix auto-configure from cold boot.
Add call to Wire.begin().
* Update comment for OLED_DRIVER define.
* Update MotorDrivers.h
Add a motor board definition for using the IBT_2 board for a high current to the main track and keep the Arduino Motor Shield for operating the programming track.
* Committing a SHA
* Fix missing F in motor drivers
* JOIN relay pin
* Swap Join Relay high/low
* Hide WIFI_CONNECT_TIMEOUT
This is not what the config suggests it is... The timeout is in the ES and defaults to 15 seconds. Abandoning it early leads to confused setup.
* Enhance OLED/LCD speed
Write one character or position command per loop entry so as not to hold up the loop. Add support for SH1106 OLED as 132x64 size option.
* Enhance OLED/LCD speed
* Delete comment about OLED on UNO.
* Trim unwanted code
* Handle display types correctly
* Update comments
* Speed up OLED writes
Add new flushDisplay() to end any in-progress I2C transaction. Previously, an redundant command was sent that ended the in-progress transaction but also sent another complete, but unnecessary, transaction.
* Comments and copyright update
* Reduce RAM and flash requirement a few more bytes.
* Move statics into LCDDisplay class, and reduce RAM.
Some state variables were static in LCDDisplay.write(). Moved to class members. Also, types of data items like row, column & character position changed to int8_t to save a few bytes of RAM.
* Type lcdCols and lcdRows to unsigned.
Since lcdCols is normally 128, it needs to be uint8_t, not int8_t.
* remove timeout from user config
* faultpin is common only if it exists ; make code prettier
* Rationalisation of SSD1306 driver
Merge SSD1306AsciiWire.cpp into SSD1306Ascii.cpp and rename SSD1306AsciiWire.h as SSD1306Ascii.h.
Merge allFonts.h into System5x7.h and rename as SSD1306font.h.
Move all SSD1306 files into root folder to facilitate compilation in Arduino IDE.
* Fix some font attributes as const.
* Remove unused initialisation sequences for tiny oled screens
* Add m_ to variables
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Revert "Bump up I2C speed"
This reverts commit 1c1168f43314d3a6855738fbc406d5654e801831.
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Drop duplicate DIAG
* ignore mySetup.h files
* Restore uno to default_envs
Restore uno (previously commented out) to default_envs.
* Update objdump.bat
Allows other editors as Notepad is very slow on large files
* Prog Track overload during cv read
* Faster LCD Driver
Extract LCD driver from library;
Trim unused functionality;
Reduce I2C communications to minimum;
Speed up I2C clock to 400kHz.
* Update config.example.h
Add IBT_2_WITH_ARDUINO to example config
* Update config.example.h
* Screen enhancements (#126)
* Add I2CManager to coordinate I2C shared parameters.
* Add use of I2CManager, and experimental scrolling strategies.
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
* Scrolling updates
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
Reformat.
* Add I2CManager calls. Remove unnecessary delays.
* Add I2CManager calls, remove unnecessary I2C delays.
* SSD1306: Move methods from .h to .cpp and reformat.
* Fix compiler warning in LiquidCrystal_I2C
* Allow forcing of I2C clock speed.
New method forceClock allows the I2C speed to be overridden. For example, if the I2C bus is long then the speed can be forced lower. It can also be forced higher to gain performance if devices are capable.
* Make Config.h conditionally included.
Allow for non-existence of Config.h.
* Correct scrolling and allow longer messages
Correct the handling of scrolling in scrollmode 1 to avoid a blank page being displayed. Also, allow MAX_MSG_SIZE to be optionally configured to override maximum message length on screens.
* compiler warning on uno
Co-authored-by: dexslab <dex35803@gmail.com>
Co-authored-by: Asbelos <asbelos@btinternet.com>
Co-authored-by: Harald Barth <haba@kth.se>
Co-authored-by: Neil McKechnie <neilmck999@gmail.com>
Co-authored-by: Neil McKechnie <75813993+Neil-McK@users.noreply.github.com>
2021-03-07 21:58:35 +01:00
|
|
|
config.h
|
2020-09-22 20:57:11 +02:00
|
|
|
COPYRIGHT (c) 2020 Fred Decker
|
|
|
|
|
Nano every2 (#129)
* Start adding back unowifi stuffz
* Uno Wifi compiling
* Fixes for compile arduino unowifi r2
* FlasString and Timers for Uno Wifi
ALL these changes should be portable back to master
* Remove extra timer that was already added
* Changed to EveryTimerB
* Add everytimerb.h
* Cleanup
* Linear address <a> cmd
* Allow lower case keywords
* Add the F define to be on safe side if it is not present in the library core code
* Clean simple Timer interface
Removes overkill files, puts all timer in a single small file. (DCCTimer)
* Timer port
* Timer working
And slow wave command removed
* Correcting non-portables merged from master
* Wave-state machine ( part 11)
* Microtuning waveform
Significant reduction in code paths and call overheads
* Current check cleanup
* Fix no-loco id
Has to handle -1 correctly
* fix wrong format letter
* redo flow through wifisetup again
* version++
* bugfixes wifi setup
* Retry harder for AP mode
* Remove unued if
* DIO2 replacement
Currently for writing signal pins during waveform.
* Drop analogReadFast (see DCCTimer)
AnalogRead speed set in DCCTimer for ease of porting.
Code tidy and diagnostics in MotorDriver
* UNTESTED fast power,brake,fault pins
* Distunguish between in/out of FASTPIN
* minor performance tweaks
* Config comments and example use
* Config/example loading
* IP/PORT on LCD
* Ethernet simulated mac
Plus fixed listening port
* Github SHA
* Committing a SHA
* Fix for nano compile
* Comments and a reliability fix.
* UnoRev2 protection
* PWM pin implementation
* fix wifi setup issue
* Reinstate IP_PORT
* Wifi channel and code cleaninga
* Reduce duplicated F() macros
Compiler isn't as clever as one might expect
* Committing a SHA
* Update config.example.h
Add comment to wifi channel section
* Committing a SHA
* Handle shields with common fault pins (Pololu)
* Committing a SHA
* remove warning
* Committing a SHA
* only do the sha generation on master
* yaml syntax
* Fast SSD1306 OLED driver
Incorporate code from SSD1306Ascii library to speed up OLED screen updates, reduce memory requirements and eliminate some library dependences.
* Fix auto-configure from cold boot.
Add call to Wire.begin().
* Update comment for OLED_DRIVER define.
* Update MotorDrivers.h
Add a motor board definition for using the IBT_2 board for a high current to the main track and keep the Arduino Motor Shield for operating the programming track.
* Committing a SHA
* Fix missing F in motor drivers
* JOIN relay pin
* Swap Join Relay high/low
* Hide WIFI_CONNECT_TIMEOUT
This is not what the config suggests it is... The timeout is in the ES and defaults to 15 seconds. Abandoning it early leads to confused setup.
* Enhance OLED/LCD speed
Write one character or position command per loop entry so as not to hold up the loop. Add support for SH1106 OLED as 132x64 size option.
* Enhance OLED/LCD speed
* Delete comment about OLED on UNO.
* Trim unwanted code
* Handle display types correctly
* Update comments
* Speed up OLED writes
Add new flushDisplay() to end any in-progress I2C transaction. Previously, an redundant command was sent that ended the in-progress transaction but also sent another complete, but unnecessary, transaction.
* Comments and copyright update
* Reduce RAM and flash requirement a few more bytes.
* Move statics into LCDDisplay class, and reduce RAM.
Some state variables were static in LCDDisplay.write(). Moved to class members. Also, types of data items like row, column & character position changed to int8_t to save a few bytes of RAM.
* Type lcdCols and lcdRows to unsigned.
Since lcdCols is normally 128, it needs to be uint8_t, not int8_t.
* remove timeout from user config
* faultpin is common only if it exists ; make code prettier
* Rationalisation of SSD1306 driver
Merge SSD1306AsciiWire.cpp into SSD1306Ascii.cpp and rename SSD1306AsciiWire.h as SSD1306Ascii.h.
Merge allFonts.h into System5x7.h and rename as SSD1306font.h.
Move all SSD1306 files into root folder to facilitate compilation in Arduino IDE.
* Fix some font attributes as const.
* Remove unused initialisation sequences for tiny oled screens
* Add m_ to variables
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Revert "Bump up I2C speed"
This reverts commit 1c1168f43314d3a6855738fbc406d5654e801831.
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Drop duplicate DIAG
* ignore mySetup.h files
* Restore uno to default_envs
Restore uno (previously commented out) to default_envs.
* Update objdump.bat
Allows other editors as Notepad is very slow on large files
* Prog Track overload during cv read
* Faster LCD Driver
Extract LCD driver from library;
Trim unused functionality;
Reduce I2C communications to minimum;
Speed up I2C clock to 400kHz.
* Update config.example.h
Add IBT_2_WITH_ARDUINO to example config
* Update config.example.h
* Screen enhancements (#126)
* Add I2CManager to coordinate I2C shared parameters.
* Add use of I2CManager, and experimental scrolling strategies.
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
* Scrolling updates
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
Reformat.
* Add I2CManager calls. Remove unnecessary delays.
* Add I2CManager calls, remove unnecessary I2C delays.
* SSD1306: Move methods from .h to .cpp and reformat.
* Fix compiler warning in LiquidCrystal_I2C
* Allow forcing of I2C clock speed.
New method forceClock allows the I2C speed to be overridden. For example, if the I2C bus is long then the speed can be forced lower. It can also be forced higher to gain performance if devices are capable.
* Make Config.h conditionally included.
Allow for non-existence of Config.h.
* Correct scrolling and allow longer messages
Correct the handling of scrolling in scrollmode 1 to avoid a blank page being displayed. Also, allow MAX_MSG_SIZE to be optionally configured to override maximum message length on screens.
* compiler warning on uno
Co-authored-by: dexslab <dex35803@gmail.com>
Co-authored-by: Asbelos <asbelos@btinternet.com>
Co-authored-by: Harald Barth <haba@kth.se>
Co-authored-by: Neil McKechnie <neilmck999@gmail.com>
Co-authored-by: Neil McKechnie <75813993+Neil-McK@users.noreply.github.com>
2021-03-07 21:58:35 +01:00
|
|
|
The configuration file for DCC-EX Command Station
|
2020-09-22 20:57:11 +02:00
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// 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
|
|
|
|
// the correct resistor could damage the sense pin on your Arduino or destroy
|
|
|
|
// the device.
|
|
|
|
//
|
2020-09-26 22:56:35 +02:00
|
|
|
// DEFINE MOTOR_SHIELD_TYPE BELOW ACCORDING TO THE FOLLOWING TABLE:
|
2020-09-22 20:57:11 +02:00
|
|
|
//
|
2020-09-26 22:56:35 +02:00
|
|
|
// STANDARD_MOTOR_SHIELD : Arduino Motor shield Rev3 based on the L298 with 18V 2A per channel
|
|
|
|
// POLOLU_MOTOR_SHIELD : Pololu MC33926 Motor Driver (not recommended for prog track)
|
|
|
|
// FUNDUMOTO_SHIELD : Fundumoto Shield, no current sensing (not recommended, no short protection)
|
|
|
|
// FIREBOX_MK1 : The Firebox MK1
|
Nano every2 (#129)
* Start adding back unowifi stuffz
* Uno Wifi compiling
* Fixes for compile arduino unowifi r2
* FlasString and Timers for Uno Wifi
ALL these changes should be portable back to master
* Remove extra timer that was already added
* Changed to EveryTimerB
* Add everytimerb.h
* Cleanup
* Linear address <a> cmd
* Allow lower case keywords
* Add the F define to be on safe side if it is not present in the library core code
* Clean simple Timer interface
Removes overkill files, puts all timer in a single small file. (DCCTimer)
* Timer port
* Timer working
And slow wave command removed
* Correcting non-portables merged from master
* Wave-state machine ( part 11)
* Microtuning waveform
Significant reduction in code paths and call overheads
* Current check cleanup
* Fix no-loco id
Has to handle -1 correctly
* fix wrong format letter
* redo flow through wifisetup again
* version++
* bugfixes wifi setup
* Retry harder for AP mode
* Remove unued if
* DIO2 replacement
Currently for writing signal pins during waveform.
* Drop analogReadFast (see DCCTimer)
AnalogRead speed set in DCCTimer for ease of porting.
Code tidy and diagnostics in MotorDriver
* UNTESTED fast power,brake,fault pins
* Distunguish between in/out of FASTPIN
* minor performance tweaks
* Config comments and example use
* Config/example loading
* IP/PORT on LCD
* Ethernet simulated mac
Plus fixed listening port
* Github SHA
* Committing a SHA
* Fix for nano compile
* Comments and a reliability fix.
* UnoRev2 protection
* PWM pin implementation
* fix wifi setup issue
* Reinstate IP_PORT
* Wifi channel and code cleaninga
* Reduce duplicated F() macros
Compiler isn't as clever as one might expect
* Committing a SHA
* Update config.example.h
Add comment to wifi channel section
* Committing a SHA
* Handle shields with common fault pins (Pololu)
* Committing a SHA
* remove warning
* Committing a SHA
* only do the sha generation on master
* yaml syntax
* Fast SSD1306 OLED driver
Incorporate code from SSD1306Ascii library to speed up OLED screen updates, reduce memory requirements and eliminate some library dependences.
* Fix auto-configure from cold boot.
Add call to Wire.begin().
* Update comment for OLED_DRIVER define.
* Update MotorDrivers.h
Add a motor board definition for using the IBT_2 board for a high current to the main track and keep the Arduino Motor Shield for operating the programming track.
* Committing a SHA
* Fix missing F in motor drivers
* JOIN relay pin
* Swap Join Relay high/low
* Hide WIFI_CONNECT_TIMEOUT
This is not what the config suggests it is... The timeout is in the ES and defaults to 15 seconds. Abandoning it early leads to confused setup.
* Enhance OLED/LCD speed
Write one character or position command per loop entry so as not to hold up the loop. Add support for SH1106 OLED as 132x64 size option.
* Enhance OLED/LCD speed
* Delete comment about OLED on UNO.
* Trim unwanted code
* Handle display types correctly
* Update comments
* Speed up OLED writes
Add new flushDisplay() to end any in-progress I2C transaction. Previously, an redundant command was sent that ended the in-progress transaction but also sent another complete, but unnecessary, transaction.
* Comments and copyright update
* Reduce RAM and flash requirement a few more bytes.
* Move statics into LCDDisplay class, and reduce RAM.
Some state variables were static in LCDDisplay.write(). Moved to class members. Also, types of data items like row, column & character position changed to int8_t to save a few bytes of RAM.
* Type lcdCols and lcdRows to unsigned.
Since lcdCols is normally 128, it needs to be uint8_t, not int8_t.
* remove timeout from user config
* faultpin is common only if it exists ; make code prettier
* Rationalisation of SSD1306 driver
Merge SSD1306AsciiWire.cpp into SSD1306Ascii.cpp and rename SSD1306AsciiWire.h as SSD1306Ascii.h.
Merge allFonts.h into System5x7.h and rename as SSD1306font.h.
Move all SSD1306 files into root folder to facilitate compilation in Arduino IDE.
* Fix some font attributes as const.
* Remove unused initialisation sequences for tiny oled screens
* Add m_ to variables
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Revert "Bump up I2C speed"
This reverts commit 1c1168f43314d3a6855738fbc406d5654e801831.
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Drop duplicate DIAG
* ignore mySetup.h files
* Restore uno to default_envs
Restore uno (previously commented out) to default_envs.
* Update objdump.bat
Allows other editors as Notepad is very slow on large files
* Prog Track overload during cv read
* Faster LCD Driver
Extract LCD driver from library;
Trim unused functionality;
Reduce I2C communications to minimum;
Speed up I2C clock to 400kHz.
* Update config.example.h
Add IBT_2_WITH_ARDUINO to example config
* Update config.example.h
* Screen enhancements (#126)
* Add I2CManager to coordinate I2C shared parameters.
* Add use of I2CManager, and experimental scrolling strategies.
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
* Scrolling updates
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
Reformat.
* Add I2CManager calls. Remove unnecessary delays.
* Add I2CManager calls, remove unnecessary I2C delays.
* SSD1306: Move methods from .h to .cpp and reformat.
* Fix compiler warning in LiquidCrystal_I2C
* Allow forcing of I2C clock speed.
New method forceClock allows the I2C speed to be overridden. For example, if the I2C bus is long then the speed can be forced lower. It can also be forced higher to gain performance if devices are capable.
* Make Config.h conditionally included.
Allow for non-existence of Config.h.
* Correct scrolling and allow longer messages
Correct the handling of scrolling in scrollmode 1 to avoid a blank page being displayed. Also, allow MAX_MSG_SIZE to be optionally configured to override maximum message length on screens.
* compiler warning on uno
Co-authored-by: dexslab <dex35803@gmail.com>
Co-authored-by: Asbelos <asbelos@btinternet.com>
Co-authored-by: Harald Barth <haba@kth.se>
Co-authored-by: Neil McKechnie <neilmck999@gmail.com>
Co-authored-by: Neil McKechnie <75813993+Neil-McK@users.noreply.github.com>
2021-03-07 21:58:35 +01:00
|
|
|
// FIREBOX_MK1S : The Firebox MK1S
|
|
|
|
// IBT_2_WITH_ARDUINO : Arduino Motor Shield for PROG and IBT-2 for MAIN
|
2020-09-26 22:56:35 +02:00
|
|
|
// |
|
|
|
|
// +-----------------------v
|
2020-09-22 20:57:11 +02:00
|
|
|
//
|
2020-09-26 22:56:35 +02:00
|
|
|
#define MOTOR_SHIELD_TYPE STANDARD_MOTOR_SHIELD
|
2020-09-22 20:57:11 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2020-09-24 11:59:01 +02:00
|
|
|
// The IP port to talk to a WIFI or Ethernet shield.
|
|
|
|
//
|
|
|
|
#define IP_PORT 2560
|
2020-09-22 20:57:11 +02:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2020-09-24 11:59:01 +02:00
|
|
|
// NOTE: Only supported on Arduino Mega
|
|
|
|
// Set to false if you not even want it on the Arduino Mega
|
2020-09-22 20:57:11 +02:00
|
|
|
//
|
2020-09-24 11:59:01 +02:00
|
|
|
#define ENABLE_WIFI true
|
2020-09-22 20:57:11 +02:00
|
|
|
|
2020-09-24 11:59:01 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// DEFINE WiFi Parameters (only in effect if WIFI is on)
|
|
|
|
//
|
2020-11-17 15:16:45 +01:00
|
|
|
// If DONT_TOUCH_WIFI_CONF is set, all WIFI config will be done with
|
2020-11-14 13:17:47 +01:00
|
|
|
// the <+> commands and this sketch will not change anything over
|
2020-11-17 15:16:45 +01:00
|
|
|
// AT commands and the other WIFI_* defines below do not have any effect.
|
|
|
|
//#define DONT_TOUCH_WIFI_CONF
|
2020-11-14 13:17:47 +01:00
|
|
|
//
|
2020-11-18 23:42:37 +01:00
|
|
|
// WIFI_SSID is the network name IF you want to use your existing home network.
|
|
|
|
// Do NOT change this if you want to use the WiFi in Access Point (AP) mode.
|
|
|
|
//
|
Nano every2 (#129)
* Start adding back unowifi stuffz
* Uno Wifi compiling
* Fixes for compile arduino unowifi r2
* FlasString and Timers for Uno Wifi
ALL these changes should be portable back to master
* Remove extra timer that was already added
* Changed to EveryTimerB
* Add everytimerb.h
* Cleanup
* Linear address <a> cmd
* Allow lower case keywords
* Add the F define to be on safe side if it is not present in the library core code
* Clean simple Timer interface
Removes overkill files, puts all timer in a single small file. (DCCTimer)
* Timer port
* Timer working
And slow wave command removed
* Correcting non-portables merged from master
* Wave-state machine ( part 11)
* Microtuning waveform
Significant reduction in code paths and call overheads
* Current check cleanup
* Fix no-loco id
Has to handle -1 correctly
* fix wrong format letter
* redo flow through wifisetup again
* version++
* bugfixes wifi setup
* Retry harder for AP mode
* Remove unued if
* DIO2 replacement
Currently for writing signal pins during waveform.
* Drop analogReadFast (see DCCTimer)
AnalogRead speed set in DCCTimer for ease of porting.
Code tidy and diagnostics in MotorDriver
* UNTESTED fast power,brake,fault pins
* Distunguish between in/out of FASTPIN
* minor performance tweaks
* Config comments and example use
* Config/example loading
* IP/PORT on LCD
* Ethernet simulated mac
Plus fixed listening port
* Github SHA
* Committing a SHA
* Fix for nano compile
* Comments and a reliability fix.
* UnoRev2 protection
* PWM pin implementation
* fix wifi setup issue
* Reinstate IP_PORT
* Wifi channel and code cleaninga
* Reduce duplicated F() macros
Compiler isn't as clever as one might expect
* Committing a SHA
* Update config.example.h
Add comment to wifi channel section
* Committing a SHA
* Handle shields with common fault pins (Pololu)
* Committing a SHA
* remove warning
* Committing a SHA
* only do the sha generation on master
* yaml syntax
* Fast SSD1306 OLED driver
Incorporate code from SSD1306Ascii library to speed up OLED screen updates, reduce memory requirements and eliminate some library dependences.
* Fix auto-configure from cold boot.
Add call to Wire.begin().
* Update comment for OLED_DRIVER define.
* Update MotorDrivers.h
Add a motor board definition for using the IBT_2 board for a high current to the main track and keep the Arduino Motor Shield for operating the programming track.
* Committing a SHA
* Fix missing F in motor drivers
* JOIN relay pin
* Swap Join Relay high/low
* Hide WIFI_CONNECT_TIMEOUT
This is not what the config suggests it is... The timeout is in the ES and defaults to 15 seconds. Abandoning it early leads to confused setup.
* Enhance OLED/LCD speed
Write one character or position command per loop entry so as not to hold up the loop. Add support for SH1106 OLED as 132x64 size option.
* Enhance OLED/LCD speed
* Delete comment about OLED on UNO.
* Trim unwanted code
* Handle display types correctly
* Update comments
* Speed up OLED writes
Add new flushDisplay() to end any in-progress I2C transaction. Previously, an redundant command was sent that ended the in-progress transaction but also sent another complete, but unnecessary, transaction.
* Comments and copyright update
* Reduce RAM and flash requirement a few more bytes.
* Move statics into LCDDisplay class, and reduce RAM.
Some state variables were static in LCDDisplay.write(). Moved to class members. Also, types of data items like row, column & character position changed to int8_t to save a few bytes of RAM.
* Type lcdCols and lcdRows to unsigned.
Since lcdCols is normally 128, it needs to be uint8_t, not int8_t.
* remove timeout from user config
* faultpin is common only if it exists ; make code prettier
* Rationalisation of SSD1306 driver
Merge SSD1306AsciiWire.cpp into SSD1306Ascii.cpp and rename SSD1306AsciiWire.h as SSD1306Ascii.h.
Merge allFonts.h into System5x7.h and rename as SSD1306font.h.
Move all SSD1306 files into root folder to facilitate compilation in Arduino IDE.
* Fix some font attributes as const.
* Remove unused initialisation sequences for tiny oled screens
* Add m_ to variables
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Revert "Bump up I2C speed"
This reverts commit 1c1168f43314d3a6855738fbc406d5654e801831.
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Drop duplicate DIAG
* ignore mySetup.h files
* Restore uno to default_envs
Restore uno (previously commented out) to default_envs.
* Update objdump.bat
Allows other editors as Notepad is very slow on large files
* Prog Track overload during cv read
* Faster LCD Driver
Extract LCD driver from library;
Trim unused functionality;
Reduce I2C communications to minimum;
Speed up I2C clock to 400kHz.
* Update config.example.h
Add IBT_2_WITH_ARDUINO to example config
* Update config.example.h
* Screen enhancements (#126)
* Add I2CManager to coordinate I2C shared parameters.
* Add use of I2CManager, and experimental scrolling strategies.
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
* Scrolling updates
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
Reformat.
* Add I2CManager calls. Remove unnecessary delays.
* Add I2CManager calls, remove unnecessary I2C delays.
* SSD1306: Move methods from .h to .cpp and reformat.
* Fix compiler warning in LiquidCrystal_I2C
* Allow forcing of I2C clock speed.
New method forceClock allows the I2C speed to be overridden. For example, if the I2C bus is long then the speed can be forced lower. It can also be forced higher to gain performance if devices are capable.
* Make Config.h conditionally included.
Allow for non-existence of Config.h.
* Correct scrolling and allow longer messages
Correct the handling of scrolling in scrollmode 1 to avoid a blank page being displayed. Also, allow MAX_MSG_SIZE to be optionally configured to override maximum message length on screens.
* compiler warning on uno
Co-authored-by: dexslab <dex35803@gmail.com>
Co-authored-by: Asbelos <asbelos@btinternet.com>
Co-authored-by: Harald Barth <haba@kth.se>
Co-authored-by: Neil McKechnie <neilmck999@gmail.com>
Co-authored-by: Neil McKechnie <75813993+Neil-McK@users.noreply.github.com>
2021-03-07 21:58:35 +01:00
|
|
|
// If you do NOT set the WIFI_SSID and do NOT set the WIFI_PASSWORD,
|
|
|
|
// then the WiFi chip will first try to connect to the previously
|
|
|
|
// configured network and if that fails fall back to Access Point mode.
|
|
|
|
// The SSID of the AP will be automatically set to DCCEX_*.
|
|
|
|
// If you DO set the WIFI_SSID then the WiFi chip will try to connect
|
|
|
|
// to that (home) network in station (client) mode. If a WIFI_PASSWORD
|
|
|
|
// is set (recommended), that password will be used for AP mode.
|
|
|
|
// The AP mode password must be at least 8 characters long.
|
2020-11-18 23:42:37 +01:00
|
|
|
//
|
2021-04-20 15:31:17 +02:00
|
|
|
// Your SSID may not contain ``"'' (double quote, ASCII 0x22).
|
2020-09-24 11:59:01 +02:00
|
|
|
#define WIFI_SSID "Your network name"
|
2020-11-17 15:16:45 +01:00
|
|
|
//
|
|
|
|
// 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).
|
2020-09-24 11:59:01 +02:00
|
|
|
#define WIFI_PASSWORD "Your network passwd"
|
2020-11-17 15:16:45 +01:00
|
|
|
//
|
|
|
|
// WIFI_HOSTNAME: You probably don't need to change this
|
2020-09-24 11:59:01 +02:00
|
|
|
#define WIFI_HOSTNAME "dccex"
|
2020-11-21 23:23:27 +01:00
|
|
|
//
|
Nano every2 (#129)
* Start adding back unowifi stuffz
* Uno Wifi compiling
* Fixes for compile arduino unowifi r2
* FlasString and Timers for Uno Wifi
ALL these changes should be portable back to master
* Remove extra timer that was already added
* Changed to EveryTimerB
* Add everytimerb.h
* Cleanup
* Linear address <a> cmd
* Allow lower case keywords
* Add the F define to be on safe side if it is not present in the library core code
* Clean simple Timer interface
Removes overkill files, puts all timer in a single small file. (DCCTimer)
* Timer port
* Timer working
And slow wave command removed
* Correcting non-portables merged from master
* Wave-state machine ( part 11)
* Microtuning waveform
Significant reduction in code paths and call overheads
* Current check cleanup
* Fix no-loco id
Has to handle -1 correctly
* fix wrong format letter
* redo flow through wifisetup again
* version++
* bugfixes wifi setup
* Retry harder for AP mode
* Remove unued if
* DIO2 replacement
Currently for writing signal pins during waveform.
* Drop analogReadFast (see DCCTimer)
AnalogRead speed set in DCCTimer for ease of porting.
Code tidy and diagnostics in MotorDriver
* UNTESTED fast power,brake,fault pins
* Distunguish between in/out of FASTPIN
* minor performance tweaks
* Config comments and example use
* Config/example loading
* IP/PORT on LCD
* Ethernet simulated mac
Plus fixed listening port
* Github SHA
* Committing a SHA
* Fix for nano compile
* Comments and a reliability fix.
* UnoRev2 protection
* PWM pin implementation
* fix wifi setup issue
* Reinstate IP_PORT
* Wifi channel and code cleaninga
* Reduce duplicated F() macros
Compiler isn't as clever as one might expect
* Committing a SHA
* Update config.example.h
Add comment to wifi channel section
* Committing a SHA
* Handle shields with common fault pins (Pololu)
* Committing a SHA
* remove warning
* Committing a SHA
* only do the sha generation on master
* yaml syntax
* Fast SSD1306 OLED driver
Incorporate code from SSD1306Ascii library to speed up OLED screen updates, reduce memory requirements and eliminate some library dependences.
* Fix auto-configure from cold boot.
Add call to Wire.begin().
* Update comment for OLED_DRIVER define.
* Update MotorDrivers.h
Add a motor board definition for using the IBT_2 board for a high current to the main track and keep the Arduino Motor Shield for operating the programming track.
* Committing a SHA
* Fix missing F in motor drivers
* JOIN relay pin
* Swap Join Relay high/low
* Hide WIFI_CONNECT_TIMEOUT
This is not what the config suggests it is... The timeout is in the ES and defaults to 15 seconds. Abandoning it early leads to confused setup.
* Enhance OLED/LCD speed
Write one character or position command per loop entry so as not to hold up the loop. Add support for SH1106 OLED as 132x64 size option.
* Enhance OLED/LCD speed
* Delete comment about OLED on UNO.
* Trim unwanted code
* Handle display types correctly
* Update comments
* Speed up OLED writes
Add new flushDisplay() to end any in-progress I2C transaction. Previously, an redundant command was sent that ended the in-progress transaction but also sent another complete, but unnecessary, transaction.
* Comments and copyright update
* Reduce RAM and flash requirement a few more bytes.
* Move statics into LCDDisplay class, and reduce RAM.
Some state variables were static in LCDDisplay.write(). Moved to class members. Also, types of data items like row, column & character position changed to int8_t to save a few bytes of RAM.
* Type lcdCols and lcdRows to unsigned.
Since lcdCols is normally 128, it needs to be uint8_t, not int8_t.
* remove timeout from user config
* faultpin is common only if it exists ; make code prettier
* Rationalisation of SSD1306 driver
Merge SSD1306AsciiWire.cpp into SSD1306Ascii.cpp and rename SSD1306AsciiWire.h as SSD1306Ascii.h.
Merge allFonts.h into System5x7.h and rename as SSD1306font.h.
Move all SSD1306 files into root folder to facilitate compilation in Arduino IDE.
* Fix some font attributes as const.
* Remove unused initialisation sequences for tiny oled screens
* Add m_ to variables
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Revert "Bump up I2C speed"
This reverts commit 1c1168f43314d3a6855738fbc406d5654e801831.
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Drop duplicate DIAG
* ignore mySetup.h files
* Restore uno to default_envs
Restore uno (previously commented out) to default_envs.
* Update objdump.bat
Allows other editors as Notepad is very slow on large files
* Prog Track overload during cv read
* Faster LCD Driver
Extract LCD driver from library;
Trim unused functionality;
Reduce I2C communications to minimum;
Speed up I2C clock to 400kHz.
* Update config.example.h
Add IBT_2_WITH_ARDUINO to example config
* Update config.example.h
* Screen enhancements (#126)
* Add I2CManager to coordinate I2C shared parameters.
* Add use of I2CManager, and experimental scrolling strategies.
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
* Scrolling updates
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
Reformat.
* Add I2CManager calls. Remove unnecessary delays.
* Add I2CManager calls, remove unnecessary I2C delays.
* SSD1306: Move methods from .h to .cpp and reformat.
* Fix compiler warning in LiquidCrystal_I2C
* Allow forcing of I2C clock speed.
New method forceClock allows the I2C speed to be overridden. For example, if the I2C bus is long then the speed can be forced lower. It can also be forced higher to gain performance if devices are capable.
* Make Config.h conditionally included.
Allow for non-existence of Config.h.
* Correct scrolling and allow longer messages
Correct the handling of scrolling in scrollmode 1 to avoid a blank page being displayed. Also, allow MAX_MSG_SIZE to be optionally configured to override maximum message length on screens.
* compiler warning on uno
Co-authored-by: dexslab <dex35803@gmail.com>
Co-authored-by: Asbelos <asbelos@btinternet.com>
Co-authored-by: Harald Barth <haba@kth.se>
Co-authored-by: Neil McKechnie <neilmck999@gmail.com>
Co-authored-by: Neil McKechnie <75813993+Neil-McK@users.noreply.github.com>
2021-03-07 21:58:35 +01:00
|
|
|
// WIFI_CHANNEL: If the line "#define ENABLE_WIFI true" is uncommented,
|
|
|
|
// WiFi will be enabled (Mega only). The default channel is set to "1" whether
|
|
|
|
// this line exists or not. If you need to use an alternate channel (we recommend
|
|
|
|
// using only 1,6, or 11) you may change it here.
|
|
|
|
#define WIFI_CHANNEL 1
|
2020-09-22 20:57:11 +02:00
|
|
|
|
2020-11-29 10:48:39 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// ENABLE_ETHERNET: Set to true if you have an Arduino Ethernet card (wired). This
|
|
|
|
// is not for Wifi. You will then need the Arduino Ethernet library as well
|
|
|
|
//
|
|
|
|
//#define ENABLE_ETHERNET true
|
|
|
|
|
|
|
|
|
2020-09-22 20:57:11 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2020-09-24 11:59:01 +02:00
|
|
|
// DEFINE STATIC IP ADDRESS *OR* COMMENT OUT TO USE DHCP
|
2020-09-22 20:57:11 +02:00
|
|
|
//
|
2020-09-24 11:59:01 +02:00
|
|
|
//#define IP_ADDRESS { 192, 168, 1, 200 }
|
2020-09-22 20:57:11 +02:00
|
|
|
|
2021-05-19 09:49:18 +02:00
|
|
|
//
|
|
|
|
// ENABLE_MQTT: if set to true you have to have an Arduino Ethernet card (wired). This
|
|
|
|
// is not for Wifi. You will need the Arduino Ethernet library as well as the PubSub
|
|
|
|
// library from <add link here> or get via the libray manager either from the IDE
|
|
|
|
// or PIO
|
|
|
|
|
|
|
|
|
|
|
|
// #define ENABLE_MQTT true
|
|
|
|
// Set the used broker to one of the configurations from MQTTBrokers.h where some
|
|
|
|
// public freely avaiable brokers are configured
|
|
|
|
|
|
|
|
#define CSMQTTBROKER DCCEX_MOSQUITTO
|
|
|
|
|
|
|
|
// Example for configuring your own MQTT broker
|
|
|
|
|
|
|
|
|
2020-09-22 20:57:11 +02:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// DEFINE LCD SCREEN USAGE BY THE BASE STATION
|
|
|
|
//
|
|
|
|
// Note: This feature requires an I2C enabled LCD screen using a PCF8574 based chipset.
|
|
|
|
// or one using a Hitachi HD44780.
|
2020-10-12 20:32:47 +02:00
|
|
|
// OR an I2C Oled screen.
|
|
|
|
// To enable, uncomment one of the lines below
|
2020-09-22 20:57:11 +02:00
|
|
|
|
2020-10-12 20:32:47 +02:00
|
|
|
// define LCD_DRIVER for I2C LCD address 0x3f,16 cols, 2 rows
|
|
|
|
// #define LCD_DRIVER 0x3F,16,2
|
2020-09-22 20:57:11 +02:00
|
|
|
|
Nano every2 (#129)
* Start adding back unowifi stuffz
* Uno Wifi compiling
* Fixes for compile arduino unowifi r2
* FlasString and Timers for Uno Wifi
ALL these changes should be portable back to master
* Remove extra timer that was already added
* Changed to EveryTimerB
* Add everytimerb.h
* Cleanup
* Linear address <a> cmd
* Allow lower case keywords
* Add the F define to be on safe side if it is not present in the library core code
* Clean simple Timer interface
Removes overkill files, puts all timer in a single small file. (DCCTimer)
* Timer port
* Timer working
And slow wave command removed
* Correcting non-portables merged from master
* Wave-state machine ( part 11)
* Microtuning waveform
Significant reduction in code paths and call overheads
* Current check cleanup
* Fix no-loco id
Has to handle -1 correctly
* fix wrong format letter
* redo flow through wifisetup again
* version++
* bugfixes wifi setup
* Retry harder for AP mode
* Remove unued if
* DIO2 replacement
Currently for writing signal pins during waveform.
* Drop analogReadFast (see DCCTimer)
AnalogRead speed set in DCCTimer for ease of porting.
Code tidy and diagnostics in MotorDriver
* UNTESTED fast power,brake,fault pins
* Distunguish between in/out of FASTPIN
* minor performance tweaks
* Config comments and example use
* Config/example loading
* IP/PORT on LCD
* Ethernet simulated mac
Plus fixed listening port
* Github SHA
* Committing a SHA
* Fix for nano compile
* Comments and a reliability fix.
* UnoRev2 protection
* PWM pin implementation
* fix wifi setup issue
* Reinstate IP_PORT
* Wifi channel and code cleaninga
* Reduce duplicated F() macros
Compiler isn't as clever as one might expect
* Committing a SHA
* Update config.example.h
Add comment to wifi channel section
* Committing a SHA
* Handle shields with common fault pins (Pololu)
* Committing a SHA
* remove warning
* Committing a SHA
* only do the sha generation on master
* yaml syntax
* Fast SSD1306 OLED driver
Incorporate code from SSD1306Ascii library to speed up OLED screen updates, reduce memory requirements and eliminate some library dependences.
* Fix auto-configure from cold boot.
Add call to Wire.begin().
* Update comment for OLED_DRIVER define.
* Update MotorDrivers.h
Add a motor board definition for using the IBT_2 board for a high current to the main track and keep the Arduino Motor Shield for operating the programming track.
* Committing a SHA
* Fix missing F in motor drivers
* JOIN relay pin
* Swap Join Relay high/low
* Hide WIFI_CONNECT_TIMEOUT
This is not what the config suggests it is... The timeout is in the ES and defaults to 15 seconds. Abandoning it early leads to confused setup.
* Enhance OLED/LCD speed
Write one character or position command per loop entry so as not to hold up the loop. Add support for SH1106 OLED as 132x64 size option.
* Enhance OLED/LCD speed
* Delete comment about OLED on UNO.
* Trim unwanted code
* Handle display types correctly
* Update comments
* Speed up OLED writes
Add new flushDisplay() to end any in-progress I2C transaction. Previously, an redundant command was sent that ended the in-progress transaction but also sent another complete, but unnecessary, transaction.
* Comments and copyright update
* Reduce RAM and flash requirement a few more bytes.
* Move statics into LCDDisplay class, and reduce RAM.
Some state variables were static in LCDDisplay.write(). Moved to class members. Also, types of data items like row, column & character position changed to int8_t to save a few bytes of RAM.
* Type lcdCols and lcdRows to unsigned.
Since lcdCols is normally 128, it needs to be uint8_t, not int8_t.
* remove timeout from user config
* faultpin is common only if it exists ; make code prettier
* Rationalisation of SSD1306 driver
Merge SSD1306AsciiWire.cpp into SSD1306Ascii.cpp and rename SSD1306AsciiWire.h as SSD1306Ascii.h.
Merge allFonts.h into System5x7.h and rename as SSD1306font.h.
Move all SSD1306 files into root folder to facilitate compilation in Arduino IDE.
* Fix some font attributes as const.
* Remove unused initialisation sequences for tiny oled screens
* Add m_ to variables
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Revert "Bump up I2C speed"
This reverts commit 1c1168f43314d3a6855738fbc406d5654e801831.
* Bump up I2C speed
Speed was 100kHz (default). Max for OLEDis 400kHz.
* Drop duplicate DIAG
* ignore mySetup.h files
* Restore uno to default_envs
Restore uno (previously commented out) to default_envs.
* Update objdump.bat
Allows other editors as Notepad is very slow on large files
* Prog Track overload during cv read
* Faster LCD Driver
Extract LCD driver from library;
Trim unused functionality;
Reduce I2C communications to minimum;
Speed up I2C clock to 400kHz.
* Update config.example.h
Add IBT_2_WITH_ARDUINO to example config
* Update config.example.h
* Screen enhancements (#126)
* Add I2CManager to coordinate I2C shared parameters.
* Add use of I2CManager, and experimental scrolling strategies.
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
* Scrolling updates
New scrolling capability by defining SCROLLMODE in Config.h to 0 (original), 1 (by page) or 2 (by line). If not defined, defaults to 0.
Reformat.
* Add I2CManager calls. Remove unnecessary delays.
* Add I2CManager calls, remove unnecessary I2C delays.
* SSD1306: Move methods from .h to .cpp and reformat.
* Fix compiler warning in LiquidCrystal_I2C
* Allow forcing of I2C clock speed.
New method forceClock allows the I2C speed to be overridden. For example, if the I2C bus is long then the speed can be forced lower. It can also be forced higher to gain performance if devices are capable.
* Make Config.h conditionally included.
Allow for non-existence of Config.h.
* Correct scrolling and allow longer messages
Correct the handling of scrolling in scrollmode 1 to avoid a blank page being displayed. Also, allow MAX_MSG_SIZE to be optionally configured to override maximum message length on screens.
* compiler warning on uno
Co-authored-by: dexslab <dex35803@gmail.com>
Co-authored-by: Asbelos <asbelos@btinternet.com>
Co-authored-by: Harald Barth <haba@kth.se>
Co-authored-by: Neil McKechnie <neilmck999@gmail.com>
Co-authored-by: Neil McKechnie <75813993+Neil-McK@users.noreply.github.com>
2021-03-07 21:58:35 +01:00
|
|
|
//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.
|
2020-10-12 20:32:47 +02:00
|
|
|
// #define OLED_DRIVER 128,32
|
2020-09-22 20:57:11 +02:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
2021-03-10 00:39:25 +01:00
|
|
|
|