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

Finish State is not left because of closing bracket at wrong position #33

Open
0x0172 opened this issue Mar 13, 2024 · 2 comments
Open

Comments

@0x0172
Copy link

0x0172 commented Mar 13, 2024

I think i found a bug in the Code. The finish state (green light) is not left because a bracket is not at the right place.
The closing bracket needs to be behind ">= 300000)"

https://github.com/DutchDevelop/BLLEDController/blame/0763358e4dc4158633b3bb70be3c480c71d9acba/src/leds.h#L271

Thanks!

@jcwren
Copy link

jcwren commented Mar 17, 2024

This is why one should always enable the -W and -Wall compiler flags.

In file included from src/web-server.h:11,
                 from src/main.cpp:2:
src/leds.h: In function 'void updateleds()':
src/leds.h:234:68: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (printerVariables.stage == 0 || printerVariables.stage == 2 && printerVariables.gcodeState == "RUNNING"){ //Printing or Resume after Pausing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/leds.h: In function 'void ledsloop()':
src/leds.h:271:90: warning: comparison of constant '300000' with boolean expression is always false [-Wbool-compare]
     if((printerVariables.finishstartms > 0 && millis() - printerVariables.finishstartms) >= 300000 && printerVariables.gcodeState == "FINISH"){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

@wile1411
Copy link
Contributor

wile1411 commented Mar 19, 2024

Noticed that and fixed in latest version BLLC_19.3.24.bin version from official site https://www.dutchdevelop.com/bl-led-controller/
Also thanks for the info on the build_flags - I've added it to my dev env.
(I've just done some work on the code as a community member)

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

3 participants