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

error #1

Open
hasantunacoder opened this issue Dec 23, 2020 · 1 comment
Open

error #1

hasantunacoder opened this issue Dec 23, 2020 · 1 comment

Comments

@hasantunacoder
Copy link

Arduino:1.8.13 (Windows Store 1.8.42.0) (Windows 10), Kart:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

GsmAsync02NetworkStatus:41:22: error: no matching function for call to 'GsmAsync::GsmAsync(HardwareSerial*&)'

GsmAsync gsmAsync(gsm);

                  ^

In file included from C:\Users\hsntu\AppData\Local\Temp\arduino_modified_sketch_108564\GsmAsync02NetworkStatus.ino:22:0:

C:\Users\hsntu\Documents\Arduino\libraries\GsmAsync-master\src/GsmAsync.h:46:5: note: candidate: GsmAsync::GsmAsync()

 GsmAsync();

 ^~~~~~~~

C:\Users\hsntu\Documents\Arduino\libraries\GsmAsync-master\src/GsmAsync.h:46:5: note: candidate expects 0 arguments, 1 provided

C:\Users\hsntu\Documents\Arduino\libraries\GsmAsync-master\src/GsmAsync.h:43:7: note: candidate: constexpr GsmAsync::GsmAsync(const GsmAsync&)

class GsmAsync

   ^~~~~~~~

C:\Users\hsntu\Documents\Arduino\libraries\GsmAsync-master\src/GsmAsync.h:43:7: note: no known conversion for argument 1 from 'HardwareSerial*' to 'const GsmAsync&'

C:\Users\hsntu\Documents\Arduino\libraries\GsmAsync-master\src/GsmAsync.h:43:7: note: candidate: constexpr GsmAsync::GsmAsync(GsmAsync&&)

C:\Users\hsntu\Documents\Arduino\libraries\GsmAsync-master\src/GsmAsync.h:43:7: note: no known conversion for argument 1 from 'HardwareSerial*' to 'GsmAsync&&'

exit status 1

no matching function for call to 'GsmAsync::GsmAsync(HardwareSerial*&)'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

@mbta009
Copy link

mbta009 commented Jan 8, 2021

Hi. This part of the code has not been updated.Check the C ++ file. How to use lib becomes more understandable.
Use the following form:
GsmAsync gsmAsync;
gsmAsync.init(&Serial1,timeoutHandler,errorHandler); // in Setup

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

2 participants