Skip to content

Commit 477b13a

Browse files
committed
reduced MAX_NUM_SEGMENTS if there is no PSRAM
1 parent b8bd2a7 commit 477b13a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wled00/FX.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ extern byte realtimeMode; // used in getMappedPixelIndex()
9797
#define MAX_NUM_SEGMENTS 32
9898
#define MAX_SEGMENT_DATA (20*1024) // 20k by default (S2 is short on free RAM), limit does not apply if PSRAM is available
9999
#else
100-
#define MAX_NUM_SEGMENTS 64
100+
#ifdef BOARD_HAS_PSRAM
101+
#define MAX_NUM_SEGMENTS 64
102+
#else
103+
#define MAX_NUM_SEGMENTS 32
104+
#endif
101105
#define MAX_SEGMENT_DATA (64*1024) // 64k by default, limit does not apply if PSRAM is available
102106
#endif
103107

0 commit comments

Comments
 (0)