@@ -564,19 +564,19 @@ void CWifi::setTimeout(unsigned long timeout) {
564
564
/* -------------------------------------------------------------------------- */
565
565
float CWifi::ping (IPAddress ip, unsigned int count) {
566
566
/* -------------------------------------------------------------------------- */
567
- return ping (ip.toString ().c_str (), count);
567
+ return ping (ip.toString ().c_str (), count);
568
568
}
569
569
570
570
/* -------------------------------------------------------------------------- */
571
571
float CWifi::ping (const char * host, unsigned int count) {
572
572
/* -------------------------------------------------------------------------- */
573
- modem.begin ();
574
- string res = " " ;
575
- if (modem.write (string (PROMPT (_PINGNAME )),res, " %s,%s,%d\r\n " , CMD_WRITE (_PINGNAME ), host, count)) {
576
- String rsl = res.c_str ();
577
- return rsl.toFloat ();
578
- }
579
- return 0 ;
573
+ modem.begin ();
574
+ string res = " " ;
575
+ if (modem.write (string (PROMPT (_PING )),res, " %s,%s,%d\r\n " , CMD_WRITE (_PING ), host, count)) {
576
+ String rsl = res.c_str ();
577
+ return rsl.toFloat ();
578
+ }
579
+ return 0 ;
580
580
}
581
581
582
582
CWifi WiFi;
0 commit comments