Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Feature: fixed color #4

Closed
fgolman opened this issue Nov 30, 2020 · 5 comments
Closed

New Feature: fixed color #4

fgolman opened this issue Nov 30, 2020 · 5 comments

Comments

@fgolman
Copy link

fgolman commented Nov 30, 2020

It would be great to just have one selected color (either via the HTTP interface or variable in code) rather than the rainbow.

@KodeMunkie
Copy link
Owner

KodeMunkie commented Dec 5, 2020

Added this feature in with some fixes on this pull request: #7
Let me know if this does what you want @fgolman

@KodeMunkie
Copy link
Owner

Set the colour using param name "grb" and value like "0xFFFFFF" (green red blue order). Rainbow palette can be re-enabled by setting the grb to black (0x000000)

@fgolman
Copy link
Author

fgolman commented Dec 5, 2020

Upon compiling this new version, although it proceeds to the end and uploads, there are a number of errors and the application doesn't run unfortunately:

In file included from src\renderEngine.h:20:0,
from src\main.cpp:18:
.pio/libdeps/m5stack-core-esp32/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003

pragma message "FastLED version 3.003.003"

                 ^

Compiling .pio\build\m5stack-core-esp32\libc93\M5Atom\M5Atom.cpp.o
Compiling .pio\build\m5stack-core-esp32\libc93\M5Atom\utility\Button.cpp.o
Archiving .pio\build\m5stack-core-esp32\lib459\libSPI.a
In file included from src\renderEngine.h:20:0,
from src\renderEngine.cpp:19:
.pio/libdeps/m5stack-core-esp32/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003

pragma message "FastLED version 3.003.003"

                 ^

In file included from .pio/libdeps/m5stack-core-esp32/FastLED/FastLED.h:65:0,
from src\renderEngine.h:20,
from src\main.cpp:18:
.pio/libdeps/m5stack-core-esp32/FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

Compiling .pio\build\m5stack-core-esp32\libc93\M5Atom\utility\LED_DisPlay.cpp.o
Compiling .pio\build\m5stack-core-esp32\libc93\M5Atom\utility\M5Timer.cpp.o
In file included from .pio/libdeps/m5stack-core-esp32/FastLED/FastLED.h:65:0,
from src\renderEngine.h:20,
from src\renderEngine.cpp:19:
.pio/libdeps/m5stack-core-esp32/FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from .pio/libdeps/m5stack-core-esp32/FastLED/platforms/esp/32/fastled_esp32.h:8:0,
from .pio/libdeps/m5stack-core-esp32/FastLED/platforms.h:36,
from .pio/libdeps/m5stack-core-esp32/FastLED/FastLED.h:52,
from src\renderEngine.h:20,
from src\renderEngine.cpp:19:
.pio/libdeps/m5stack-core-esp32/FastLED/platforms/esp/32/clockless_rmt_esp32.h: In instantiation of 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::fillNext() [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)10u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]':
.pio/libdeps/m5stack-core-esp32/FastLED/platforms/esp/32/clockless_rmt_esp32.h:494:21: required from
'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::interruptHandler(void*) [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)10u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]'
.pio/libdeps/m5stack-core-esp32/FastLED/platforms/esp/32/clockless_rmt_esp32.h:280:31: required from
'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::initRMT() [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)10u; int XTRA0 = 0;
bool FLIP = false; int WAIT_TIME = 5]'
.pio/libdeps/m5stack-core-esp32/FastLED/platforms/esp/32/clockless_rmt_esp32.h:294:24: required from
'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER
= (EOrder)10u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]'
src\renderEngine.cpp:207:1: required from here
.pio/libdeps/m5stack-core-esp32/FastLED/platforms/esp/32/clockless_rmt_esp32.h:511:22: warning: unused
variable 't1' [-Wunused-variable]
uint32_t t1 = __clock_cycles();
^
Compiling .pio\build\m5stack-core-esp32\libc93\M5Atom\utility\MPU6886.cpp.o
Archiving .pio\build\m5stack-core-esp32\lib855\libWire.a
In file included from .pio\libdeps\m5stack-core-esp32\M5Atom\src\M5Atom.h:52:0,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\M5Atom.cpp:4:
.pio\libdeps\m5stack-core-esp32\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003

pragma message "FastLED version 3.003.003"

Compiling .pio\build\m5stack-core-esp32\libc93\M5Atom\utility\MahonyAHRS.cpp.o
^
Compiling .pio\build\m5stack-core-esp32\libc93\M5Atom\utility\Task.cpp.o
In file included from .pio\libdeps\m5stack-core-esp32\FastLED/FastLED.h:65:0,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\M5Atom.h:52,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\M5Atom.cpp:4:
.pio\libdeps\m5stack-core-esp32\FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.h:4:0,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.cpp:1:
.pio\libdeps\m5stack-core-esp32\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003

pragma message "FastLED version 3.003.003"

                 ^

Compiling .pio\build\m5stack-core-esp32\lib500\WiFi\ETH.cpp.o
In file included from .pio\libdeps\m5stack-core-esp32\FastLED/FastLED.h:65:0,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.h:4,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.cpp:1:
.pio\libdeps\m5stack-core-esp32\FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from .pio\libdeps\m5stack-core-esp32\FastLED/platforms/esp/32/fastled_esp32.h:8:0,
from .pio\libdeps\m5stack-core-esp32\FastLED/platforms.h:36,
from .pio\libdeps\m5stack-core-esp32\FastLED/FastLED.h:52,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.h:4,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.cpp:1:
.pio\libdeps\m5stack-core-esp32\FastLED/platforms/esp/32/clockless_rmt_esp32.h: In instantiation of 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::fillNext() [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)10u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]':
.pio\libdeps\m5stack-core-esp32\FastLED/platforms/esp/32/clockless_rmt_esp32.h:494:21: required from
'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::interruptHandler(void*) [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)10u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]'
Compiling .pio\build\m5stack-core-esp32\lib500\WiFi\WiFi.cpp.o
.pio\libdeps\m5stack-core-esp32\FastLED/platforms/esp/32/clockless_rmt_esp32.h:280:31: required from
'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::initRMT() [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)10u; int XTRA0 = 0;
bool FLIP = false; int WAIT_TIME = 5]'
.pio\libdeps\m5stack-core-esp32\FastLED/platforms/esp/32/clockless_rmt_esp32.h:294:24: required from
'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with int DATA_PIN = 27; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER
= (EOrder)10u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]'
Compiling .pio\build\m5stack-core-esp32\lib500\WiFi\WiFiAP.cpp.o
.pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.cpp:154:1: required from here
.pio\libdeps\m5stack-core-esp32\FastLED/platforms/esp/32/clockless_rmt_esp32.h:511:22: warning: unused
variable 't1' [-Wunused-variable]
uint32_t t1 = __clock_cycles();
^
In file included from .pio\libdeps\m5stack-core-esp32\FastLED/controller.h:9:0,
from .pio\libdeps\m5stack-core-esp32\FastLED/FastLED.h:47,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.h:4,
from .pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.cpp:1:
.pio\libdeps\m5stack-core-esp32\FastLED/pixeltypes.h: In member function 'virtual void LED_Display::run(void*)':
.pio\libdeps\m5stack-core-esp32\FastLED/pixeltypes.h:178:37: warning: iteration 25u invokes undefined behavior [-Waggressive-loop-optimizations]
r = (colorcode >> 16) & 0xFF;
^
.pio\libdeps\m5stack-core-esp32\M5Atom\src\utility\LED_Display.cpp:19:27: note: containing loop
for (int num = 0; num < 26; num++)
^

@KodeMunkie
Copy link
Owner

KodeMunkie commented Dec 5, 2020 via email

@fgolman
Copy link
Author

fgolman commented Dec 5, 2020

Sorry, you're exactly correct. Totally forgot about that in my excitement!

All good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants