Commit 63a7eed2 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved a bug in the one time user time function. It now works as expected...

Solved a bug in the one time user time function. It now works as expected instead of always being active.
parent e46ba9a9
......@@ -63,7 +63,7 @@ void user_time_set_period(uint16_t period_ms)
void user_time_set_one_time(uint16_t time_ms)
{
user_time_single=0x01;
user_time_period=(uint16_t)(((double)time_ms)/7.8);
user_time_time=(uint16_t)(((double)time_ms)/7.8);
user_time_done=0x00;
user_time_active=0x01;
user_time_count=0x0000;
......@@ -85,6 +85,7 @@ uint8_t user_time_is_done(void)
if(user_time_done==0x01)
{
user_time_done=0x00;
user_time_active=0x00;
return 0x01;
}
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment