File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 2727#include < Arduino.h>
2828#ifdef BOARD_HAS_ECCX08
2929 #include < ArduinoECCX08.h>
30- bool has_crypto = 1 ;
31- #else
32- bool has_crypto = 0 ;
3330#endif
3431
3532/* *************************************************************************************
@@ -91,13 +88,14 @@ void NTPUtils::sendNTPpacket(UDP & udp)
9188 udp.endPacket ();
9289}
9390
94- int NTPUtils::setRandomPort (int minValue, int maxValue) {
95- if (has_crypto) {
96- return ECCX08.random (minValue, maxValue);
97- } else {
98- randomSeed (analogRead (0 ));
99- return random (minValue, maxValue);
100- }
91+ int NTPUtils::setRandomPort (int minValue, int maxValue)
92+ {
93+ #ifdef BOARD_HAS_ECCX08
94+ return ECCX08.random (minValue, maxValue);
95+ #else
96+ randomSeed (analogRead (0 ));
97+ return random (minValue, maxValue);
98+ #endif
10199}
102100
103101#endif /* #ifndef HAS_LORA */
You can’t perform that action at this time.
0 commit comments