OLED charts: limit list length (internal_oled_data_limit)¶
What it does: Truncates the data list to the maximum length MAXLEN (keeps the latest data).

Inputs¶
MAXLEN: value of type Value.- list
LIST: parameter selection in the block menu.
Output¶
- None (statement block).
When to use it¶
- When you want to keep the sliding window of the last values.
- To limit RAM consumption during long program execution.
Tips and pitfalls¶
- The block truncates the data from the beginning of the list, leaving the most recent values.
- For
MAXLEN <= 0the list does not change.
Generated Python example¶
chart_data_0 = chart_data_limit(chart_data_0, 64)