Skip to content

Commit

Permalink
Merge pull request #17 from atuline/master
Browse files Browse the repository at this point in the history
Merge atuline/WLED-master into THATDONFC/WLED-master
  • Loading branch information
THATDONFC committed May 12, 2020
2 parents 5041a38 + cb3204b commit 6959496
Show file tree
Hide file tree
Showing 20 changed files with 234 additions and 524 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ install:
- platformio update
script:
# - platformio ci --project-conf=./platformio.ini
- platformio run
- platformio run
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
## WLED changelog

### Development versions after 0.10.0 release

#### Build 2005100

- Update to Espalexa v2.4.6 (+1.6kB free heap memory)
- Added `m5atom` PlatformIO environment

#### Build 2005090

- Default to ESP8266 Arduino core v2.7.1 in PlatformIO
- Fixed Preset Slot 16 always indicating as empty (#891)
- Disabled Alexa emulation by default (causes bootloop for some users)
- Added BWLT11 and SHOJO_PCB defines to NpbWrapper
- Merged pull request #898 adding Solid Glitter effect

### WLED version 0.10.0

#### Build 2005030
Expand Down
43 changes: 39 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extra_configs =
# ------------------------------------------------------------------------------

# Travis CI binaries (comment this out when building for single board)
default_envs = d1_mini, esp01, esp01_1m_ota, esp32dev
default_envs = travis_esp8266, esp01, esp01_1m_ota, travis_esp32

# Release binaries
; default_envs = nodemcuv2, esp01, esp01_1m_ota, esp01_1m_full, esp32dev, custom_WS2801, custom_APA102, custom_LEDPIN_16, custom_LEDPIN_4, custom32_LEDPIN_16
Expand All @@ -38,6 +38,7 @@ default_envs = d1_mini, esp01, esp01_1m_ota, esp32dev
; default_envs = esp8285_5CH_H801
; default_envs = d1_mini_5CH_Shojo_PCB
; default_envs = wemos_shield_esp32
; default_envs = m5atom

[common]
# ------------------------------------------------------------------------------
Expand All @@ -54,6 +55,7 @@ default_envs = d1_mini, esp01, esp01_1m_ota, esp32dev
# arduino core 2.6.1 = platformIO 2.3.0
# arduino core 2.6.2 = platformIO 2.3.1
# arduino core 2.6.3 = platformIO 2.3.2
# arduino core 2.7.0 = platformIO 2.5.0
# ------------------------------------------------------------------------------
arduino_core_2_3_0 = espressif8266@1.5.0
arduino_core_2_4_0 = espressif8266@1.6.0
Expand All @@ -65,13 +67,14 @@ arduino_core_2_5_2 = espressif8266@2.2.3
arduino_core_2_6_1 = espressif8266@2.3.0
arduino_core_2_6_2 = espressif8266@2.3.1
arduino_core_2_6_3 = espressif8266@2.3.3
arduino_core_2_7_1 = espressif8266@2.5.1

# Development platforms
arduino_core_develop = https://github.com/platformio/platform-espressif8266#develop
arduino_core_git = https://github.com/platformio/platform-espressif8266#feature/stage

platform = ${common.arduino_core_2_4_2}
platform_latest = ${common.arduino_core_2_6_3}
# Platform to use for ESP8266
platform_latest = ${common.arduino_core_2_7_1}

# ------------------------------------------------------------------------------
# FLAGS: DEBUG
Expand Down Expand Up @@ -118,6 +121,15 @@ build_flags = -g -w -DMQTT_MAX_PACKET_SIZE=1024 -DPIO_FRAMEWORK_ARDUINO_LWIP_HIG
build_flags_esp8266 = ${common.build_flags} -DESP8266
build_flags_esp32 = ${common.build_flags} -DARDUINO_ARCH_ESP32

# enables all features for travis CI
build_flags_all_features =
-D WLED_USE_ANALOG_LED
-D WLED_USE_H801
-D WLED_ENABLE_5CH_LEDS
-D WLED_ENABLE_ADALIGHT
-D WLED_ENABLE_DMX
-D WLED_ENABLE_MQTT

ldscript_512k = eagle.flash.512k.ld ;for older versions change this to eagle.flash.512k0.ld
ldscript_1m0m = eagle.flash.1m.ld ;for older versions change this to eagle.flash.1m0.ld
ldscript_2m1m = eagle.flash.2m1m.ld
Expand Down Expand Up @@ -201,6 +213,7 @@ build_flags = ${common.build_flags_esp8266}
[env:d1_mini]
board = d1_mini
platform = ${common.platform_latest}
upload_speed = 921500
board_build.ldscript = ${common.ldscript_4m1m}
build_flags = ${common.build_flags_esp8266}

Expand Down Expand Up @@ -246,7 +259,7 @@ build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_HUESYNC -D WLED_USE_
board = d1_mini
platform = ${common.platform_latest}
board_build.ldscript = ${common.ldscript_4m1m}
build_flags = ${common.build_flags_esp8266} -D WLED_USE_ANALOG_LEDS -D SHOJO_PCB -D WLED_ENABLE_5CH_LEDS
build_flags = ${common.build_flags_esp8266} -D WLED_USE_ANALOG_LEDS -D WLED_USE_SHOJO_PCB -D WLED_ENABLE_5CH_LEDS

# ------------------------------------------------------------------------------
# DEVELOPMENT BOARDS
Expand Down Expand Up @@ -314,3 +327,25 @@ build_flags = ${common.build_flags_esp32} -D LEDPIN=16 -D RLYPIN=19 -D BTNPIN=17
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP

[env:m5atom]
board = esp32dev
build_flags = ${common.build_flags_esp32} -D LEDPIN=27 -D BTNPIN=39
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
platform = espressif32@1.11.2

# ------------------------------------------------------------------------------
# travis test board configurations
# ------------------------------------------------------------------------------

[env:travis_esp8266]
extends = env:d1_mini
build_type = debug
build_flags = ${common.build_flags_esp8266} ${common.debug_flags} ${common.build_flags_all_features}

[env:travis_esp32]
extends = env:esp32dev
build_type = debug
build_flags = ${common.build_flags_esp32} ${common.debug_flags} ${common.build_flags_all_features}
26 changes: 11 additions & 15 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3348,7 +3348,17 @@ CRGB WS2812FX::pacifica_one_layer(uint16_t i, CRGBPalette16& p, uint16_t cistart
return ColorFromPalette(p, sindex8, bri, LINEARBLEND);
}

//Solid colour background with glitter
uint16_t WS2812FX::mode_solid_glitter()
{
fill(SEGCOLOR(0));

if (SEGMENT.intensity > random8())
{
setPixelColor(random16(SEGLEN), ULTRAWHITE);
}
return FRAMETIME;
}

//////////////////////////////////////////////////////////////////////////////////////
// Non-reactive routines by Andrew Tuline //
Expand All @@ -3373,7 +3383,6 @@ uint16_t WS2812FX::mode_phased(void) {
}

return FRAMETIME;

} // mode_phased()


Expand All @@ -3390,7 +3399,6 @@ uint16_t WS2812FX::mode_twinkleup(void) {
}

return FRAMETIME;

} // mode_twinkleup()


Expand Down Expand Up @@ -3423,7 +3431,6 @@ uint16_t WS2812FX::mode_noisepal(void) {
dist += beatsin8(10,1,4); // Moving along the distance. Vary it a bit with a sine wave.

return FRAMETIME;

} // mode_noisepal()


Expand All @@ -3446,7 +3453,6 @@ uint16_t WS2812FX::mode_sinewave(void) {
}

return FRAMETIME;

} // mode_sinewave()


Expand Down Expand Up @@ -3487,7 +3493,6 @@ uint16_t WS2812FX::mode_asound01(void) { // Pi
}

return FRAMETIME;

} // mode_asound01()


Expand All @@ -3509,7 +3514,6 @@ uint16_t WS2812FX::mode_asound02(void) { // Pix
}

return FRAMETIME;

} // mode_asound02()


Expand All @@ -3529,7 +3533,6 @@ uint16_t WS2812FX::mode_asound03(void) { // Jug
}

return FRAMETIME;

} // mode_asound03()


Expand All @@ -3545,7 +3548,6 @@ uint16_t WS2812FX::mode_asound04(void) { // Mat
}

return FRAMETIME;

} // mode_asound04()


Expand Down Expand Up @@ -3575,7 +3577,6 @@ uint16_t WS2812FX::mode_asound05(void) { // Myv
gravityCounter = (gravityCounter + 1) % gravity;

return FRAMETIME;

} // mode_asound05()


Expand All @@ -3602,7 +3603,6 @@ uint16_t WS2812FX::mode_asound06(void) { // Pla
}

return FRAMETIME;

} // mode_asound06()


Expand All @@ -3624,7 +3624,6 @@ uint16_t WS2812FX::mode_asound07(void) { // Pud
}

return FRAMETIME;

} // mode_asound07()


Expand All @@ -3649,7 +3648,6 @@ uint16_t WS2812FX::mode_asound08(void) { // Fil
ydist=ydist+beatsin8(4,0,10);

return FRAMETIME;

} // mode_asound08()


Expand All @@ -3675,7 +3673,6 @@ uint16_t WS2812FX::mode_asound09(void) { // Fil
ydist+=beatsin8(4,0,10);

return FRAMETIME;

} // mode_asound09()


Expand Down Expand Up @@ -3947,7 +3944,6 @@ if (samplePeak == 1){

#endif
return FRAMETIME;

} // mode_asound13()


Expand Down Expand Up @@ -4006,4 +4002,4 @@ uint16_t WS2812FX::mode_asound15(void) {
#endif

return FRAMETIME;
} // mode_asound15()
} // mode_asound15()
53 changes: 28 additions & 25 deletions wled00/FX.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
#define IS_REVERSE ((SEGMENT.options & REVERSE ) == REVERSE )
#define IS_SELECTED ((SEGMENT.options & SELECTED ) == SELECTED )

#define MODE_COUNT 122
#define MODE_COUNT 123

#define FX_MODE_STATIC 0
#define FX_MODE_BLINK 1
Expand Down Expand Up @@ -207,25 +207,26 @@
#define FX_MODE_HEARTBEAT 100
#define FX_MODE_PACIFICA 101
#define FX_MODE_CANDLE_MULTI 102
#define FX_MODE_ASound01 103
#define FX_MODE_ASound02 104
#define FX_MODE_ASound03 105
#define FX_MODE_ASound04 106
#define FX_MODE_ASound05 107
#define FX_MODE_ASound06 108
#define FX_MODE_ASound07 109
#define FX_MODE_ASound08 110
#define FX_MODE_ASound09 111
#define FX_MODE_ASound10 112
#define FX_MODE_ASound11 113
#define FX_MODE_ASound12 114
#define FX_MODE_ASound13 115
#define FX_MODE_ASound14 116
#define FX_MODE_ASound15 117
#define FX_MODE_PHASED 118
#define FX_MODE_TWINKLEUP 119
#define FX_MODE_NOISEPAL 120
#define FX_MODE_SINEWAVE 121
#define FX_MODE_SOLID_GLITTER 103
#define FX_MODE_ASound01 104
#define FX_MODE_ASound02 105
#define FX_MODE_ASound03 106
#define FX_MODE_ASound04 107
#define FX_MODE_ASound05 108
#define FX_MODE_ASound06 109
#define FX_MODE_ASound07 110
#define FX_MODE_ASound08 111
#define FX_MODE_ASound09 112
#define FX_MODE_ASound10 113
#define FX_MODE_ASound11 114
#define FX_MODE_ASound12 115
#define FX_MODE_ASound13 116
#define FX_MODE_ASound14 117
#define FX_MODE_ASound15 118
#define FX_MODE_PHASED 119
#define FX_MODE_TWINKLEUP 120
#define FX_MODE_NOISEPAL 121
#define FX_MODE_SINEWAVE 122


// Sound reactive external variables
Expand Down Expand Up @@ -255,7 +256,7 @@ class WS2812FX {
uint8_t fft3;
uint8_t palette;
uint8_t mode;
uint8_t options; //bit pattern: msb first: transitional tbd tbd tbd tbd paused reverse selected
uint8_t options; //bit pattern: msb first: transitional needspixelstate tbd tbd (paused) on reverse selected
uint8_t grouping, spacing;
uint8_t opacity;
uint32_t colors[NUM_COLORS];
Expand Down Expand Up @@ -430,6 +431,7 @@ class WS2812FX {
_mode[FX_MODE_HEARTBEAT] = &WS2812FX::mode_heartbeat;
_mode[FX_MODE_PACIFICA] = &WS2812FX::mode_pacifica;
_mode[FX_MODE_CANDLE_MULTI] = &WS2812FX::mode_candle_multi;
_mode[FX_MODE_SOLID_GLITTER] = &WS2812FX::mode_solid_glitter;
_mode[FX_MODE_ASound01] = &WS2812FX::mode_asound01;
_mode[FX_MODE_ASound02] = &WS2812FX::mode_asound02;
_mode[FX_MODE_ASound03] = &WS2812FX::mode_asound03;
Expand Down Expand Up @@ -619,7 +621,7 @@ class WS2812FX {
mode_twinklecat(void),
mode_halloween_eyes(void),
mode_static_pattern(void),
mode_tri_static_pattern(void),
mode_tri_static_pattern(void),
mode_spots(void),
mode_spots_fade(void),
mode_glitter(void),
Expand All @@ -638,6 +640,7 @@ class WS2812FX {
mode_heartbeat(void),
mode_pacifica(void),
mode_candle_multi(void),
mode_solid_glitter(void),
mode_asound01(void),
mode_asound02(void),
mode_asound03(void),
Expand Down Expand Up @@ -743,9 +746,9 @@ const char JSON_mode_names[] PROGMEM = R"=====([
"Noise 1","Noise 2","Noise 3","Noise 4","Colortwinkles","Lake","Meteor","Meteor Smooth","Railway","Ripple",
"Twinklefox","Twinklecat","Halloween Eyes","Solid Pattern","Solid Pattern Tri","Spots","Spots Fade","Glitter","Candle","Fireworks Starburst",
"Fireworks 1D","Bouncing Balls","Sinelon","Sinelon Dual","Sinelon Rainbow","Popcorn","Drip","Plasma","Percent","Ripple Rainbow",
"Heartbeat","Pacifica","Candle Multi","ASound01","ASound02","ASound03","ASound04","ASound05","ASound06","ASound07",
"ASound08","ASound09","ASound10","ASound11","ASound12","ASound13","ASound14","ASound15","Phased","Twinkleup",
"NoisePal", "SineWave"
"Heartbeat","Pacifica","Candle Multi","Solid Glitter","ASound01","ASound02","ASound03","ASound04","ASound05","ASound06",
"ASound07","ASound08","ASound09","ASound10","ASound11","ASound12","ASound13","ASound14","ASound15","Phased",
"Twinkleup","NoisePal", "SineWave"
])=====";


Expand Down
1 change: 1 addition & 0 deletions wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void WS2812FX::service() {
now = nowUp + timebase;
if (nowUp - _lastShow < MIN_SHOW_DELAY) return;
bool doShow = false;

for(uint8_t i=0; i < MAX_NUM_SEGMENTS; i++)
{
_segment_index = i;
Expand Down
Loading

0 comments on commit 6959496

Please sign in to comment.