From 3012272ed32760330d0dfd2d7d510bfd0ca24c80 Mon Sep 17 00:00:00 2001 From: Troy <5659019+troyhacks@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:37:36 -0500 Subject: [PATCH] Art-Net sane defaults if using an old config without the new values --- wled00/cfg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 74ef889b..069b303a 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -194,9 +194,9 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { uint16_t freqkHz = elm[F("freq")] | 0; // will be in kHz for DotStar and Hz for PWM (not yet implemented fully) ledType |= refresh << 7; // hack bit 7 to indicate strip requires off refresh uint8_t AWmode = elm[F("rgbwm")] | RGBW_MODE_MANUAL_ONLY; - uint8_t artnet_outputs = elm["artnet_outputs"] | 0; - uint16_t artnet_leds_per_output = elm["artnet_leds_per_output"] | 0; - uint8_t artnet_fps_limit = elm["artnet_fps_limit"] | 0; + uint8_t artnet_outputs = elm["artnet_outputs"] | 1; // sanity check + uint16_t artnet_leds_per_output = elm["artnet_leds_per_output"] | length; // sanity check + uint8_t artnet_fps_limit = elm["artnet_fps_limit"] | 24; // sanity check if (fromFS) { BusConfig bc = BusConfig(ledType, pins, start, length, colorOrder, reversed, skipFirst, AWmode, freqkHz, artnet_outputs, artnet_leds_per_output, artnet_fps_limit); mem += BusManager::memUsage(bc);