DFRobot / DFRobot_MultiGasSensor

MIT License
3 stars 5 forks source link

Esp32 PCIE SIMCOM7600SA Issue #1

Closed adfo0 closed 1 year ago

adfo0 commented 2 years ago

Hello, I am using the library in a TTGO PCIE module with Modem SIMCOM7600SA. And when trying to compile the program, I get the following errors. I don't understand what it could be, I have no experience with this type of problem.

I hope you can help me, thanks

(The error message is much longer, but it doesn't allow me to copy the whole thing here.)

` In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino: In function 'void setup_gsm()': C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: no matching function for call to 'println(const char [10], int)'

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:100:12: note: candidate: size_t Print::println(unsigned char, int) size_t println(unsigned char, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:100:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'unsigned char' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:101:12: note: candidate: size_t Print::println(int, int) size_t println(int, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:101:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:102:12: note: candidate: size_t Print::println(unsigned int, int) size_t println(unsigned int, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:102:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:103:12: note: candidate: size_t Print::println(long int, int) size_t println(long, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:103:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'long int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:104:12: note: candidate: size_t Print::println(long unsigned int, int) size_t println(unsigned long, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:104:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:105:12: note: candidate: size_t Print::println(long long int, int) size_t println(long long, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:105:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'long long int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:106:12: note: candidate: size_t Print::println(long long unsigned int, int) size_t println(unsigned long long, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:106:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'long long unsigned int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:447:3: note: in expansion of macro 'DBG' DBG("Wait ..."); ^ C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: no matching function for call to 'println(const char [22], int)'

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:459:3: note: in expansion of macro 'DBG' DBG("Initializing modem..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:100:12: note: candidate: size_t Print::println(unsigned char, int) size_t println(unsigned char, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:100:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'unsigned char' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:459:3: note: in expansion of macro 'DBG' DBG("Initializing modem..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:101:12: note: candidate: size_t Print::println(int, int) size_t println(int, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:101:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:459:3: note: in expansion of macro 'DBG' DBG("Initializing modem..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:102:12: note: candidate: size_t Print::println(unsigned int, int) size_t println(unsigned int, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:102:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:459:3: note: in expansion of macro 'DBG' DBG("Initializing modem..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:103:12: note: candidate: size_t Print::println(long int, int) size_t println(long, int = DEC); ^ C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:103:12: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:114:0: C:\Users\adolf\OneDrive\Documents\GitHub\esp32\libraries\DFRobot_MultiGasSensor-main/DFRobot_MultiGasSensor.h:36:164: error: invalid conversion from 'const char*' to 'long int' [-fpermissive]

define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

                                                                                                                                                                ^

C:\Users\adolf\OneDrive\Documents\GitHub\esp32\ST_ODO\ST_ODO.ino:459:3: note: in expansion of macro 'DBG' DBG("Initializing modem..."); ^ In file included from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Stream.h:26:0, from C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:147, from sketch\ST_ODO.ino.cpp:1: C:\Users\adolf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h:104:12: note: candidate: size_t Print::println(long unsigned int, int) size_t println(unsigned long, int = DEC); ^ `

adfo0 commented 2 years ago

Issue ESP32 PCIE.txt

pkx890 commented 2 years ago

Mask the code in library files:#define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}

pkx890 commented 2 years ago

Mask the code in library files:#define DBG(...) {Serial.print("[");Serial.print(FUNCTION); Serial.print("(): "); Serial.print(LINE); Serial.print(" ] 0x"); Serial.println(__VA_ARGS__,HEX);}