Skip to content

Commit c6a12f6

Browse files
committed
Temp: check network interface type only for boards with ethernet support
1 parent a1d34c8 commit c6a12f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/ArduinoIoTCloudTCP.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,11 @@ int ArduinoIoTCloudTCP::begin(bool const enable_watchdog, String brokerAddress,
308308
if (enable_watchdog) {
309309
watchdog_enable();
310310
#if defined (WIFI_HAS_FEED_WATCHDOG_FUNC) || defined (ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC)
311+
#ifdef BOARD_HAS_ETHERNET
311312
bool const use_ethernet = _connection->getInterface() == NetworkAdapter::ETHERNET ? true : false;
313+
#else
314+
bool const use_ethernet = false;
315+
#endif
312316
watchdog_enable_network_feed(use_ethernet);
313317
#endif
314318
}
@@ -831,7 +835,12 @@ void ArduinoIoTCloudTCP::onOTARequest()
831835
#endif
832836

833837
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
838+
839+
#ifdef BOARD_HAS_ETHERNET
834840
bool const use_ethernet = _connection->getInterface() == NetworkAdapter::ETHERNET ? true : false;
841+
#else
842+
bool const use_ethernet = false;
843+
#endif
835844
_ota_error = portenta_h7_onOTARequest(_ota_url.c_str(), use_ethernet);
836845
#endif
837846
}

0 commit comments

Comments
 (0)