yeganemehr / arduino-at

It's a fully async library for communicate with AT modems.
MIT License
0 stars 1 forks source link

panic() not defined in esp32 #1

Closed GiPe66 closed 1 year ago

GiPe66 commented 1 year ago

The panic define does not exists in ESP32 environment. Thanks for following the project.

In file included from src/main.cpp:3: .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.hpp: In member function 'bool ATConnection::parse()': .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.hpp:111:4: error: 'panic' was not declared in this scope panic(); ^~~~~ In file included from .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.cpp:1: .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.hpp: In member function 'bool ATConnection::parse()': .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.hpp:111:4: error: 'panic' was not declared in this scope panic(); ^~~~~ .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.cpp: In member function 'void ATConnection::putTheCommandInBuffer(ExecuteCommand*)': .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.cpp:80:2: error: 'panic' was not declared in this scope panic(); ^~~~~ In file included from .pio/libdeps/wemos_d1_mini32/arduino-sim800/src/Sim800.hpp:4, from .pio/libdeps/wemos_d1_mini32/arduino-sim800/src/Sim800.cpp:1: .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.hpp: In member function 'bool ATConnection::parse()': .pio/libdeps/wemos_d1_mini32/arduino-at/src/ATConnection.hpp:111:4: error: 'panic' was not declared in this scope panic(); ^~~~~

yeganemehr commented 1 year ago

Hi Again @GiPe66 I'll build tomorrow whole AT + Sim800 + EventEmitter libraries for ESP32 and fix any problem they have.

GiPe66 commented 1 year ago

Thanks @yeganemehr Also if you have an example of Sim800 SMS receive, this will be nice. I made it working but it is not stable. Possibly not correctly implemented.

yeganemehr commented 1 year ago

Please open an issue on arduino-sms800 and I'll add it for you. Current method for receiving an SMS is polling but I'll try to add an Event for receive using AT Unsolicited Codes (+CMTI). See: ATNotificationEvent

yeganemehr commented 1 year ago

Hi @GiPe66 I Fixed this and just released a new version (v0.2.1). Thank you for your contribution. If you encounter any other problems please don't hesitate to report it.