Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue_166: generateRamdomSeed() does not generate a random value #169

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Die SD Karte (Ordner mp3 und advert) hat sich gegenüber der Version 3.1.2 geän
# Change Log

## Version 3.1.5 (30.01.2024)
- [Issue 166](https://github.com/tonuino/TonUINO-TNG/issues/166): Issue_166: generateRamdomSeed() does not generate a random value
- [Issue 165](https://github.com/tonuino/TonUINO-TNG/issues/165): 'Play last card' does not work as ShortCut

## Version 3.1.5 (21.01.2024)
Expand Down
2 changes: 1 addition & 1 deletion src/tonuino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ uint32_t Tonuino::generateRamdomSeed()
uint32_t seedBitValue = 0;
for (uint8_t bitSum = 0; bitSum <= 8; bitSum++) { // 8 samples of analog pin
seedBitValue += analogRead(openAnalogPin); // Flip the coin eight times, adding the results together
delay(1); // Delay a single millisecond to allow the pin to fluctuate
}
delay(1); // Delay a single millisecond to allow the pin to fluctuate
seedLongValue |= ((seedBitValue & 0x01) << bitShift); // Build a stack of 32 flipped coins
}
LOG(init_log, s_debug, F("RamdonSeed: "), seedLongValue);
Expand Down
Loading