Skip to content

Commit 9dc92fb

Browse files
committed
Fixed bug where the random seed wasn't being set and fixed the example
1 parent df07605 commit 9dc92fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/Peripherals/TrueRandomNumber/TrueRandomNumber.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void loop() {
1010
Scout.loop();
1111

1212
Serial.print("Random Number: ");
13-
Serial.println(Scout.getRandomNumber());
13+
Serial.println(random());
1414

1515
Scout.delay(1000);
1616
}

utility/phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ static void phyHandleSetRequests(void)
371371
PHY_TX_PWR_REG_s.txPwr = phyIb.txPower;
372372
}
373373

374-
#ifdef PHY_ENABLE_RANDOM_NUMBER_GENERATOR
374+
#ifdef PHY_HAS_RANDOM_NUMBER_GENERATOR
375375
if (phyIb.request & PHY_REQ_RANDOM)
376376
{
377377
uint16_t rnd = phyGetRandomNumber();

0 commit comments

Comments
 (0)