From 23a2d320ddb70f07de18860672d61a38445728e3 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 29 Aug 2023 13:47:44 -0700 Subject: modules/rkt: drop ad-hoc last_ticks tracking Commit 64a5b17 added this to til_module_context_t, so it's already being tracked now making this redundant. --- src/modules/rkt/rkt.c | 5 +---- src/modules/rkt/rkt.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c index 82dff44..90af8a2 100644 --- a/src/modules/rkt/rkt.c +++ b/src/modules/rkt/rkt.c @@ -233,9 +233,7 @@ static void rkt_update_rocket(rkt_context_t *ctxt, unsigned ticks) rkt_setup_t *s = (rkt_setup_t *)ctxt->til_module_context.setup; if (!ctxt->paused) - ctxt->rocket_row += ((double)(ticks - ctxt->last_ticks)) * ctxt->rows_per_ms; - - ctxt->last_ticks = ticks; + ctxt->rocket_row += ((double)(ticks - ctxt->til_module_context.last_ticks)) * ctxt->rows_per_ms; if (!s->connect) return; @@ -287,7 +285,6 @@ static til_module_context_t * rkt_create_context(const til_module_t *module, til } ctxt->rows_per_ms = s->rows_per_ms; - ctxt->last_ticks = ticks; rkt_update_rocket(ctxt, ticks); diff --git a/src/modules/rkt/rkt.h b/src/modules/rkt/rkt.h index cff768c..ede973a 100644 --- a/src/modules/rkt/rkt.h +++ b/src/modules/rkt/rkt.h @@ -21,7 +21,6 @@ typedef struct rkt_context_t { const struct sync_track *scene_track; double rows_per_ms; double rocket_row; - unsigned last_ticks; unsigned last_connect; /* ticks at last connect attempt */ unsigned paused:1; unsigned connected:1; /* currently connected to the RocketEditor */ -- cgit v1.2.3