aboutsummaryrefslogtreecommitdiff
path: root/Source/Timer.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2018-11-25 12:32:16 +0100
committerXaviDCR92 <xavi.dcr@gmail.com>2018-11-25 12:32:16 +0100
commit135a1e93cb9b3a859c4269a94ababe33b3558f9a (patch)
treed32c9b295895128b98f1af14e0c1d08a1da2b6f0 /Source/Timer.c
parente4ab93f21e73dd86c41c754f4401f87f58c80afe (diff)
downloadairport-135a1e93cb9b3a859c4269a94ababe33b3558f9a.tar.gz
* LEVEL3.PLT was incorrectly using Windows CRLF end of line.
* When assigning a parking slot, busy parking slots cannot be selected. Some work TODO yet, though.
Diffstat (limited to 'Source/Timer.c')
-rw-r--r--Source/Timer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/Timer.c b/Source/Timer.c
index 52030ea..a62723e 100644
--- a/Source/Timer.c
+++ b/Source/Timer.c
@@ -54,13 +54,15 @@ TYPE_TIMER* TimerCreate(uint32_t t, bool rf, void (*timer_callback)(void) )
for (i = 0; i < MAX_TIMERS; i++)
{
- if (timer_array[i].busy == false)
+ TYPE_TIMER* const ptrTimer = &timer_array[i];
+
+ if (ptrTimer->busy == false)
{
- timer_array[i].Timeout_Callback = timer_callback;
- timer_array[i].time = t;
- timer_array[i].orig_time = t;
- timer_array[i].repeat_flag = rf;
- timer_array[i].busy = true;
+ ptrTimer->Timeout_Callback = timer_callback;
+ ptrTimer->time = t;
+ ptrTimer->orig_time = t;
+ ptrTimer->repeat_flag = rf;
+ ptrTimer->busy = true;
success = true;
break;
}