neosarchizo / cm1106_i2c

CUBIC CM1106 I2C library
GNU General Public License v3.0
6 stars 5 forks source link

ESP32 compile problem #2

Open MarioGG7 opened 1 year ago

MarioGG7 commented 1 year ago

Hi I can't compile your library for ESP32 I think the problem is with return value. Can you help with this please?

C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\cm1106_i2c.cpp: In member function 'uint8_t CM1106_I2C::auto_zero_setting(uint8_t, uint8_t, uint16_t)': C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\**cm1106_i2c.cpp:228**:1: error: control reaches end of non-void function [-Werror=return-type] } ^ C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\cm1106_i2c.cpp: In member function 'uint8_t CM1106_I2C::calibration(uint16_t)': C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\**cm1106_i2c.cpp:308**:1: error: control reaches end of non-void function [-Werror=return-type] } ^ C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\cm1106_i2c.cpp: In member function 'uint8_t CM1106_I2C::read_serial_number()': C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\cm1106_i2c.cpp:387:1: error: control reaches end of non-void function [-Werror=return-type] } ^ C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\cm1106_i2c.cpp: In member function 'uint8_t CM1106_I2C::check_sw_version()': C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C\src\cm1106_i2c.cpp:458:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1plus.exe: some warnings being treated as errors Using library CM1106_I2C at version 1.0.2 in folder: C:\Users\mariu\Documents\Arduino\libraries\CM1106_I2C Using library Wire at version 1.0.1 in folder: C:\Users\mariu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\Wire exit status 1 Error compiling for board ESP32 Dev Module.

neosarchizo commented 1 year ago

Try to include stdint

#include <stdint.h>
MarioGG7 commented 1 year ago

Thank you for suggestion, unfortunately stdint.h don't help. Cm1106ESP32

neosarchizo commented 1 year ago

Please let me know the esp32 board name. I will check it later.

MarioGG7 commented 1 year ago

Hi. ESp32 dev module, or ESP32 wroom

On Sun, 21 May 2023, 03:31 Junhyuk Lee, @.***> wrote:

Please let me know the esp32 board name. I will check it later.

— Reply to this email directly, view it on GitHub https://github.com/neosarchizo/cm1106_i2c/issues/2#issuecomment-1556067181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2735DHHSJZFWHZAMERWHTXHF47DANCNFSM6AAAAAAXVLZETA . You are receiving this because you authored the thread.Message ID: @.***>