Class options not available?

uhrheber
Posts: 16
Joined: Sat Nov 12, 2016 12:07 pm

Class options not available?

Postby uhrheber » Sat Nov 12, 2016 12:18 pm

Hi.

I'm trying to port an application from ESP8266 to ESP32.
It uses a ping library from https://github.com/dancol90/ESP8266Ping.

The class definition looks like:

Code: Select all

class PingClass {
  public:
    PingClass();

    bool ping(IPAddress dest,   byte count = 5);
    bool ping(const char* host, byte count = 5);

    int averageTime();

  protected:
    static void _ping_sent_cb(void *opt, void *pdata);
    static void _ping_recv_cb(void *opt, void *pdata);

    IPAddress _dest;
    ping_option _options;

    static byte _expected_count, _errors, _success;
    static int _avg_time;
};

extern PingClass Ping;

#endif
Compilation fails with:

Code: Select all

..../Ping.h:50:5: error: 'ping_option' does not name a type
     ping_option _options;
     ^
This works with ESP8266, but not with ESP32. Seems that the options type definition is missing.
I tried to search around, but couldn't find it's definition in both AVR and ESP cores.

Any ideas would be highly appreciated.
Thanks
Uhrheber

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Class options not available?

Postby WiFive » Sat Nov 12, 2016 4:37 pm

https://github.com/esp8266/Arduino/blob ... app/ping.h

The lwip ping app is not in esp-idf

Who is online

Users browsing this forum: No registered users and 69 guests