Comments (4)
at least solve contradiction between configurable lines/columns in config.h (user) and fixed settings in LCDDisplay.h, most 4 line displays have 20 columns...
best would be to take over definitions from config.h
from commandstation-ex.
Whilst the 4-line LCD has 20 characters, and 128-column OLED displays are capable of 21 characters, 2-line LCDs are only 16 characters long. So to avoid losing the end of messages off some screens, we limit the length of the messages to 16 characters.
A second option would be to drop support for the LCD1602 display, allowing messages of up to 20 characters.
A third option might be to code short and long versions of messages so that they can be abbreviated when on a 16-character screen, e.g. by marking optional characters with a prefix character. Alternative messages could also be substituted by conditional compilation.
A fourth option is to increase the buffer size to 21 characters per line but retain all standard messages at 16 characters max. This would allow tinkerers to add longer messages if desired.
from commandstation-ex.
as I allready wrote: best would be to take over the setting from config.h as there the user has to/is expected to put the actual values of his display after all...
then it is up to the implementation of the "LCD" macro to prevent buffer overflows (cut chars/lines) if the passed text would exeed the defined chars/lines
from commandstation-ex.
As of v3.0.5, parameter MAX_MSG_SIZE can be used to allocate buffers for longer lines. This defaults to 16 since all existing messages are designed to fit on a 16 character LCD, so longer buffers would be wasted RAM, particularly on an Uno.
Example for a 132x64 SH1106-based I2C OLED display:
#define MAX_MSG_SIZE 22
Note that this resolves the immediate request by enabling longer messages. However, the wider issue remains, of how to benefit from longer messages without losing information on smaller screens.
from commandstation-ex.
Related Issues (20)
- [Feature Request]: Wireless DCC communication Battery driven Locs (gardenrailway) HOT 2
- [To Do]: ARDUINO UNO R4 WIFI HOT 1
- [Support Request]: Unable to use Analog pin A6 and A7 as sensors on Arduino Nano HOT 3
- Servo operated turnouts
- Watchdog on DCC-EX protocol connection
- v5 : sensors not working with Rocrail (whereas 4.1 does) HOT 1
- Error message 'Could not pull latest updates from GitHub'
- [Feature Request] Simulate simple I/O in IO_PCA9685pwm
- Incorporate Track Modes into OLED Display HOT 2
- JR command does not include default roster 0.
- [Feature Request]: Add EEPROM Functionality to ARDUINO_ARCH_ESP32 HOT 4
- boucle de retournement
- Network IO extender via Ethernet
- Ethernet not obtaining IP address HOT 3
- Operate KATO Turnouts using Ex-CommandStation HOT 1
- Support for Nextion touch HMI displays HOT 3
- Dcc-ex and Traincontroller HOT 2
- Exrail to I2C for turnout control? HOT 1
- Readme.md has dead link HOT 1
- Installation Error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commandstation-ex.