-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display: Move IP address and port to the same line #151
Comments
in EthernetInterface.cpp //LCD(4,F("IP:%d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]); LCD(3, F("%d.%d.%d.%d:%d"), ip[0], ip[1], ip[2], ip[3], IP_PORT); Or is this the correct way: "#define MAX_MSG_SIZE 20" to config.h to extend the width from 16. #if defined(MAX_MSG_SIZE) && MAX_MSG_SIZE > 18 |
Bear in mind that the worst case the up address may be 15 characters and
the port 5 characters, that's 21 characters total. In general it would
probably be xxx.xxx.x.xxx:xxxx with defaults, but this is still 18
characters, too long for a 1602 LCD. May need to be conditional on screen
size.
…On Wed, 19 May 2021, 00:41 Fred, ***@***.***> wrote:
in EthernetInterface.cpp
//LCD(4,F("IP:%d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
//LCD(5,F("Port:%d"), IP_PORT);
LCD(3, F("%d.%d.%d.%d:%d"), ip[0], ip[1], ip[2], ip[3], IP_PORT);
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASCNI2LTDG5FQ2A33I5AWNTTOL3J5ANCNFSM45DPSMMA>
.
|
The compile time test of MAX_MSG_SIZE does check for size of display as MAX_MSG_SIZE = 20 is defined in config.h as the size of the display -- true max IP and Port could be 21. So test could be added to ensure display length < MAX_MSG_SIZE, but would need to be run-time. As typical display is 18 as shown in picture of my display, I suggest no need for run time test. User can correct by removing MAX_MSG_SIZE from config.h, which will default to 16 and a two line display. |
There's always a caveat ;) What do you think Neil? |
The text was updated successfully, but these errors were encountered: