diff --git a/source/application/system_state.c b/source/application/system_state.c index f5532ef..c26e733 100644 --- a/source/application/system_state.c +++ b/source/application/system_state.c @@ -160,6 +160,7 @@ static enum system_state handle_state_collision_turn(void) drv_open(&rng); // random number between 500 and 4000 unsigned int sleep = (unsigned int)drv_read(&rng, NULL, 0) % 3500 + 500; + drv_close(&rng); system_state_object.collision_timer.tick = sys_tick_get_ms() + sleep; system_state_object.collision_timer.running = true; // randomize turn direction