longer segment names
* introducing WLED_MAX_SEGNAME_LEN from upstream * default: max name length = 48 * hopefully found all places where the segment name length was hardcoded (32, 33, 34) * some comments still refer to "32" but wtf
This commit is contained in:
@@ -842,7 +842,7 @@ void Segment::drawArc(unsigned x0, unsigned y0, int radius, uint32_t color, uint
|
||||
//WLEDMM for artifx
|
||||
bool Segment::jsonToPixels(char * name, uint8_t fileNr) {
|
||||
if (!isActive()) return true; // segment not active, nothing to do
|
||||
char fileName[42] = { '\0' }; // we need up to 40 bytes (seg.name is 32 bytes max)
|
||||
char fileName[WLED_MAX_SEGNAME_LEN+12] = { '\0' }; // we need up to 40 bytes (seg.name is 32 bytes max)
|
||||
//WLEDMM: als support segment name ledmaps
|
||||
bool isFile = false;
|
||||
// strcpy_P(fileName, PSTR("/mario"));
|
||||
@@ -886,11 +886,6 @@ bool Segment::jsonToPixels(char * name, uint8_t fileNr) {
|
||||
#include "src/font/codepages.h"
|
||||
#endif
|
||||
|
||||
//upstream compatibility
|
||||
#if !defined(WLED_MAX_SEGNAME_LEN)
|
||||
#define WLED_MAX_SEGNAME_LEN 32 // ToDO: inrease default to 48
|
||||
#endif
|
||||
|
||||
// unicode-aware wrapper for drawCharacter(), to be called from mode_2Dscrollingtext()
|
||||
void Segment::drawText(const unsigned char* text, size_t maxLen, int maxLetters, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t col2, bool drawShadow) {
|
||||
if (!isActive()) return; // not active
|
||||
|
||||
Reference in New Issue
Block a user