Skip to content

Commit 1cfd486

Browse files
committed
HAL Device templates
1 parent 65ca0ae commit 1cfd486

4 files changed

Lines changed: 372 additions & 8 deletions

File tree

docs/products/ex-commandstation/exrail/cookbooks/advanced/display-track-status.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
To display track status, add a line in myAutomation.h
66
```cpp
7-
#include "myTrackStatus.example.h"
7+
#include "myTrackStatus.example.h"
88
```
99

1010
If using Mega, a line will be needed in config.h to allocate memory for additional lines on the first display.
1111
```cpp
12-
#define MAX_CHARACTER_ROWS 17
12+
#define MAX_CHARACTER_ROWS 17
1313
```
1414
1515
9 plus number of tracks; 17 for 8 tracks.
@@ -19,7 +19,9 @@ In addition to displaying track status, myTrackStatus.example.h will update the
1919
2020
myTrackStatus.example.h can be used by adding the `#include` line in myAutomation.h, or you can copy/rename the file in your backup folder and customize it so that the information is displayed on a different screen.
2121
22-
```
22+
## myAutomation.h
23+
24+
```cpp
2325
// myAutomation.h - as used in the above example
2426
2527
#include "myTrackStatus.example.h"
@@ -34,6 +36,7 @@ POWEROFF // power command follows change in track mode
3436
DONE
3537
```
3638

39+
## myTrackStatus.h
3740

3841
Contents of the example file -- suggested for review/reference on how various EXRAIL commands have been used.
3942
```cpp
@@ -75,3 +78,39 @@ AUTOSTART
7578
STEALTH(StringFormatter::lcd(1, F("MS: %S"), DCC::getMotorShieldName());)
7679
DONE
7780
```
81+
82+
## Lines displayed
83+
84+
Options to adjust lines reported.
85+
On the primary display, SCREEN 0, blank lines are not displayed.
86+
87+
There are multiple ways to avoid an extra line on the display; perhaps you just want the display to only contain 8 lines and not scroll.
88+
89+
a. One way to eliminate the Total line is to blank the line.
90+
Figure out which line is used. If the `<JL` command results in 3 lines, starting on line 8, then write a blank line on line 10.
91+
.. in your customized myTrackStatus.h file.
92+
93+
```cpp
94+
PARSE("<JL 0 8>") // screen 0 start on line 8
95+
SCREEN(0,10, "") // blank to remove total
96+
```
97+
98+
b. use/change the parameter in config.h
99+
100+
```cpp
101+
#define MAX_CHARACTER_ROWS 10
102+
```
103+
104+
.. which results in lines 0-9 being available for use; line 10 is not displayed.
105+
106+
c. If it is the scrolling, and you want fewer lines displayed, select any of the static lines to blank
107+
108+
```cpp
109+
AUTOSTART
110+
SET_TRACK(A,MAIN)
111+
SET_TRACK(B,PROG)
112+
DELAYMINS(2) // do not change defaults for 2 minutes
113+
SCREEN(0, 0, "")
114+
SCREEN(0, 1, "")
115+
DONE
116+
```

docs/reference/.nav.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ nav:
55
- Serial Command Basics: serial-command-basics.md
66
- Advanced config.h Options: advanced-config-h.md
77
- TrackManager: trackmanager
8+
- HAL Device Configuration: hal-device-templates.md
89
- Command Station Internal Architecture: command-station-arch.md
910
- Throttle Writers Guide: throttle-writers-guide.md
1011
- Legacy Command Reference: legacy-command-reference.md
Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,50 @@
11
# EX-CSB1 FAQ
22

3-
- Error indicating the need for installing Windows drivers
4-
link to driver
3+
## CH340 USB Drivers
54

6-
- Info regarding the need to add capacitor to enable uploading
5+
Windows USB driver is required.
6+
CH340 driver info [https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers](https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all)
77

8-
- asdf
8+
Note that only one program can use the USB connection simultaneously. Close the device monitor or other programs when uploading.
99

10-
- jkl
10+
## Track voltage
11+
12+
DCC is a square wave signal. The voltage of the track power supply will be present on each rail 50% of the time. Use the DC scale to measure voltage -- each rail vs GND should be 50% of track power supply.
13+
14+
Few digital multimeters will provide a consistent/useful reading on the AC scale.
15+
16+
## OLED
17+
18+
Select 132x64 or 128x64
19+
If one results in blank screen or image is shifted, try the other.
20+
21+
## Power supply
22+
23+
If your power supply is less than 5A, add a line in config.h to set overcurrent reporting lower - 90% of track power supply.
24+
[motor-shield-max-current](../advanced-config-h.md#motor-shield-max-current)
25+
26+
## Fault reporting
27+
28+
Continuous faults will be reported with power on, if track power supply is not connected.
29+
30+
An initial fault report at power-on is not an issue.
31+
32+
## Overcurrent reporting
33+
34+
Some - 600mA or less - overcurrent reporting on the programming track is not unusual. This is due to lack of precision of the ESP32-WROOM ADC, and the 250mA trip current for the programming track when not reading/writing CVs.
35+
36+
There is a command `<C PROGBOOST>` to override the 250mA limit. Do not use it unless you are comfortable that your loco/decoder do not have issues (which 250mA is designed to protect).
37+
Note that `<C PROGBOOST>` remains in effect until the command station is restarted.
38+
39+
## WiFi
40+
41+
WiFi configuration is different, starting with version 5.7.0.
42+
config.h is used for WiFi configuration in earlier versions.
43+
Link to [5.7.0 WiFi Configuration](../../products/ex-commandstation/config-wifi-esp32.md)
44+
45+
Note that if the new WiFi configuration commands are sent via a WiFi connection, your existing connection will drop. Current connection info should be reported on the OLED.
46+
47+
## Discord
48+
49+
Join the discussion on the discord server.
50+
[https://dcc-ex.com/mkdocs-test/support/discord/](../../support/discord.md)

0 commit comments

Comments
 (0)