Skip to content

Commit b88bc8b

Browse files
committed
Fix for NeoPixels having the wrong frequency. (Includes Motate ref update for same.)
1 parent c121c93 commit b88bc8b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

g2core/device/neopixel/neopixel.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ struct NeoPixel {
373373
const uint32_t _blue_offset;
374374
const bool _has_white;
375375

376-
Motate::PWMOutputPin<pixel_pin_pumber> _pixel_pin{Motate::kNormal, base_frequency};
376+
Motate::PWMOutputPin<pixel_pin_pumber> _pixel_pin;
377377

378378
// Note: 0 = 1/4 on-time
379379
// 1 = 1/2 on-time
@@ -397,7 +397,9 @@ struct NeoPixel {
397397
_green_offset{(((uint32_t)_pixel_order >> 2) & 0b11) << 3},
398398
_blue_offset{((uint32_t)_pixel_order & 0b11) << 3},
399399
_has_white{(_white_offset != _red_offset)},
400+
_pixel_pin{Motate::kNormal, base_frequency},
400401
_update_timeout_ms{update_ms} {
402+
401403
_pixel_pin = 0.0; // start at 0
402404
_pixel_pin.stop();
403405

0 commit comments

Comments
 (0)