Error compiling JoyC_&_RoverC/Master/Master.ino
-
I try to compile the code from https://github.com/m5stack/M5StickC-Plus/blob/master/examples/KIT/JoyC_%26_RoverC/Master/Master.ino
under Arduino: 1.8.19 (Windows 10), Board: "M5Stick-C-Plus, Default, 1500000, None"
But i get an error:RoverC:88:23: error: 'I2C_ERROR_NO_BEGIN' was not declared in this scope uint8_t IIC_ReState = I2C_ERROR_NO_BEGIN; ^~~~~~~~~~~~~~~~~~ C:\Users\toro\Documents\Arduino\RoverC\RoverC.ino:88:23: note: suggested alternative: 'ESP_ERR_NO_MEM' uint8_t IIC_ReState = I2C_ERROR_NO_BEGIN; ^~~~~~~~~~~~~~~~~~ ESP_ERR_NO_MEMThe answer is in the error, following the suggestion fixes the error.
Now, besides that it works i have no idea if the replacement is correct logically. The Const-Names suggest yes, but there might be more to it...
If the replacement is universally ok, should a github pull request be made?EDIT:
There is an error/warning thrown that i had overlooked.
So, just doing the replacement seems like not enough...RoverC.ino.cpp:1: ...\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.2/ tools/sdk/esp32/include/esp_common/include/esp_err.h:31:37: warning: unsigned conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '257' to '1' [-Woverflow] #define ESP_ERR_NO_MEM 0x101 /*!< Out of memory */ ^~~~~ ...\Arduino\RoverC\RoverC.ino:88:23: note: in expansion of macro 'ESP_ERR_NO_MEM' uint8_t IIC_ReState = ESP_ERR_NO_MEM; ^~~~~~~~~~~~~~ -
@sirtet Change "I2C_ERROR_NO_BEGIN" to "ESP_OK". The git for M5StickC-Plus has already been fixed with this. The fix also works for the M5StickC code.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login