mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-01 17:56:12 +00:00
fix: with_sender buffer too small and FS_LINE_H mismatch
- with_sender[160] could hold only ~160 chars but node_name(32) + expanded(200) needs up to 234; snprintf would silently truncate the UI display entry. Increased to 240. - FS_LINE_H was 9 but Adafruit 5x7 font line height is 8, wasting 1px per line and showing 5 lines instead of 6. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1b9dc42250
commit
44b2519df4
@@ -70,7 +70,7 @@ void MyMesh::tryBotReplyChannel(uint8_t channel_idx, const char* text) {
|
|||||||
_bot_last_reply_ms = millis();
|
_bot_last_reply_ms = millis();
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
if (_ui) {
|
if (_ui) {
|
||||||
char with_sender[160];
|
char with_sender[240]; // node_name(32) + ": "(2) + expanded(200) + margin
|
||||||
snprintf(with_sender, sizeof(with_sender), "%s: %s", _prefs.node_name, expanded);
|
snprintf(with_sender, sizeof(with_sender), "%s: %s", _prefs.node_name, expanded);
|
||||||
_ui->addChannelMsg(channel_idx, with_sender);
|
_ui->addChannelMsg(channel_idx, with_sender);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
static const int FS_CHARS = 21;
|
static const int FS_CHARS = 21;
|
||||||
static const int FS_LINE_H = 9;
|
static const int FS_LINE_H = 8;
|
||||||
static const int FS_START_Y = 12;
|
static const int FS_START_Y = 12;
|
||||||
static const int FS_VISIBLE = (64 - FS_START_Y) / FS_LINE_H;
|
static const int FS_VISIBLE = (64 - FS_START_Y) / FS_LINE_H;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user