ESP32 COMPILING ERROR whit PS3 Controller.h

moi21_5
Posts: 1
Joined: Sat Jan 16, 2021 5:40 pm

ESP32 COMPILING ERROR whit PS3 Controller.h

Postby moi21_5 » Sat Jan 16, 2021 5:48 pm

It shows me this warning, i dont knows what thats mena, but i tried everything, like update Arduino IDE, update Espressif data, board preferences, and it doesnt compile.
Im new here, can you help me? Thanks.


[Codebox]

Code: Select all

C:\Users\Moisés\Desktop\arduinos\sketch_jan16c\sketch_jan16c.ino: In function 'void setup()':
C:\Users\Moisés\Desktop\arduinos\sketch_jan16c\sketch_jan16c.ino:205:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\-----\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c: In function 'ps3SetLed':
C:\Users\------\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:160:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
     if(cmd.led4 = player >= 4) player -= 4;
     ^
C:\Users\-----\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:161:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
     if(cmd.led3 = player >= 3) player -= 3;
     ^
C:\Users\-----\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:162:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
     if(cmd.led2 = player >= 2) player -= 2;
     ^
C:\Users\-----\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:163:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
     if(cmd.led1 = player >= 1) player -= 1;
     ^
cc1.exe: some warnings being treated as errors
exit status 1
Error compilando para la tarjeta ESP32 Dev Module.
[/Codebox]

chegewara
Posts: 1384
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 COMPILING ERROR whit PS3 Controller.h

Postby chegewara » Sun Jan 17, 2021 7:16 pm

moi21_5 wrote:
Sat Jan 16, 2021 5:48 pm
C:\Users\------\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:160:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
if(cmd.led4 = player >= 4) player -= 4;
^
C:\Users\-----\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:161:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
if(cmd.led3 = player >= 3) player -= 3;
^
C:\Users\-----\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:162:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
if(cmd.led2 = player >= 2) player -= 2;
^
C:\Users\-----\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3.c:163:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
if(cmd.led1 = player >= 1) player -= 1;
^
cc1.exe: some warnings being treated as errors
exit status 1
Error compilando para la tarjeta ESP32 Dev Module.[/code][/Codebox]
Did you try to fix those errors? This is very descriptive error:

Code: Select all

error: suggest parentheses around assignment used as truth value
https://www.google.com/search?q=error%3 ... e&ie=UTF-8

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 65 guests