Adjust buggy thresholds

This commit is contained in:
Thammi 2013-09-05 22:06:02 +02:00
parent b26cd0526c
commit 250b08679f

View File

@ -7,7 +7,7 @@
#include <pentabug/music.h>
inline uint16_t biased_random(uint8_t value) {
return value / 4 * (rand() & 7);
return value / 8 * (rand() & 7);
}
static void init(void) {
@ -20,12 +20,12 @@ static void run(void) {
pentatonic_all_led_set(light >> 3);
motor_set(biased_random(light) > 0x50);
motor_set(biased_random(light) > 0x40);
led_set(RIGHT, biased_random(light) > 0x20);
led_set(LEFT, biased_random(light) > 0x20);
if(biased_random(light) > 0x70) {
if(biased_random(light) > 0x50) {
uint16_t tone = (biased_random(light) * 2) + 500;
set_note(tone, 0);
} else {