From b88bc8bfd0cb2440eaeb9d45195f44164b951de6 Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Wed, 31 Aug 2016 12:45:37 -0500 Subject: [PATCH] Fix for NeoPixels having the wrong frequency. (Includes Motate ref update for same.) --- Motate | 2 +- g2core/device/neopixel/neopixel.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Motate b/Motate index 3d6c7a431..c9d419ac2 160000 --- a/Motate +++ b/Motate @@ -1 +1 @@ -Subproject commit 3d6c7a431ac4edbf05ef3a803c175961d63d2911 +Subproject commit c9d419ac22acd7192885dc56254003a634efd439 diff --git a/g2core/device/neopixel/neopixel.h b/g2core/device/neopixel/neopixel.h index 636a33498..e6c409ab8 100755 --- a/g2core/device/neopixel/neopixel.h +++ b/g2core/device/neopixel/neopixel.h @@ -373,7 +373,7 @@ struct NeoPixel { const uint32_t _blue_offset; const bool _has_white; - Motate::PWMOutputPin _pixel_pin{Motate::kNormal, base_frequency}; + Motate::PWMOutputPin _pixel_pin; // Note: 0 = 1/4 on-time // 1 = 1/2 on-time @@ -397,7 +397,9 @@ struct NeoPixel { _green_offset{(((uint32_t)_pixel_order >> 2) & 0b11) << 3}, _blue_offset{((uint32_t)_pixel_order & 0b11) << 3}, _has_white{(_white_offset != _red_offset)}, + _pixel_pin{Motate::kNormal, base_frequency}, _update_timeout_ms{update_ms} { + _pixel_pin = 0.0; // start at 0 _pixel_pin.stop();