summaryrefslogtreecommitdiff
path: root/src/modules/strobe
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-29 16:18:19 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-29 16:18:55 -0700
commit12cc817baa17ddf8dde55b5f34f38432225bc1e8 (patch)
tree33eb2fa0b6932ee4dacf0b3bcec2779452083a02 /src/modules/strobe
parentee65637a655254cf1fbb5bf3404b14f179f2a2e7 (diff)
modules/strobe: s/ticks/last_flash_ticks/
Clarifying trivial mechanical rename
Diffstat (limited to 'src/modules/strobe')
-rw-r--r--src/modules/strobe/strobe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/strobe/strobe.c b/src/modules/strobe/strobe.c
index 8b3658e..76ce260 100644
--- a/src/modules/strobe/strobe.c
+++ b/src/modules/strobe/strobe.c
@@ -29,7 +29,7 @@ typedef struct strobe_setup_t {
typedef struct strobe_context_t {
til_module_context_t til_module_context;
strobe_setup_t *setup;
- unsigned ticks;
+ unsigned last_flash_ticks;
unsigned flash:1;
unsigned flash_ready:1;
} strobe_context_t;
@@ -44,7 +44,7 @@ static til_module_context_t * strobe_create_context(const til_module_t *module,
return NULL;
ctxt->setup = (strobe_setup_t *)setup;
- ctxt->ticks = ticks;
+ ctxt->last_flash_ticks = ticks;
return &ctxt->til_module_context;
}
@@ -56,7 +56,7 @@ static void strobe_prepare_frame(til_module_context_t *context, til_stream_t *st
*res_frame_plan = (til_frame_plan_t){ .fragmenter = til_fragmenter_slice_per_cpu_x16 };
- if (ctxt->flash_ready && (ticks - ctxt->ticks >= (unsigned)((1.f / ctxt->setup->hz) * 1000.f))){
+ if (ctxt->flash_ready && (ticks - ctxt->last_flash_ticks >= (unsigned)((1.f / ctxt->setup->hz) * 1000.f))){
ctxt->flash = 1;
ctxt->flash_ready = 0;
} else {
@@ -85,7 +85,7 @@ static void strobe_finish_frame(til_module_context_t *context, til_stream_t *str
return;
ctxt->flash = 0;
- ctxt->ticks = ticks;
+ ctxt->last_flash_ticks = ticks;
}
© All Rights Reserved