From fe50f01df7e1a30fc62d571a8b861f96e64e9008 Mon Sep 17 00:00:00 2001 From: plodah Date: Fri, 8 Nov 2024 01:28:04 +0000 Subject: [PATCH] rename msjig token to specify purpose --- users/plodah/functions/indicators.c | 2 +- users/plodah/functions/mouse_jiggler.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/users/plodah/functions/indicators.c b/users/plodah/functions/indicators.c index e8250625f18..e15e483335e 100644 --- a/users/plodah/functions/indicators.c +++ b/users/plodah/functions/indicators.c @@ -121,7 +121,7 @@ bool plodah_indicator_handler(void) { if(!rgb_matrix_get_flags()){ rgb_matrix_set_color(PLODAH_MSJIGGLER_INDICATOR_RGBINDEX, RGB_OFF); } - if(token != INVALID_DEFERRED_TOKEN){ + if(msJigToken != INVALID_DEFERRED_TOKEN){ rgb_matrix_set_color(PLODAH_MSJIGGLER_INDICATOR_RGBINDEX, msjigrgb.r, msjigrgb.g, msjigrgb.b); } #endif // PLODAH_MSJIGGLER_ENABLED && PLODAH_MSJIGGLER_INDICATOR_RGBINDEX diff --git a/users/plodah/functions/mouse_jiggler.c b/users/plodah/functions/mouse_jiggler.c index ef4993158d5..bb1131b1b05 100644 --- a/users/plodah/functions/mouse_jiggler.c +++ b/users/plodah/functions/mouse_jiggler.c @@ -1,6 +1,6 @@ #pragma once // cannibalised https://getreuer.info/posts/keyboards/macros3/index.html#a-mouse-jiggler to make this. -static deferred_token token = INVALID_DEFERRED_TOKEN; +static deferred_token msJigToken = INVALID_DEFERRED_TOKEN; static report_mouse_t report = {0}; #if defined(RGB_MATRIX_ENABLE) && defined(PLODAH_MSJIGGLER_INDICATOR_RGBINDEX) && !defined(PLODAH_MSJIGGLER_INDICATOR_HSV) @@ -42,22 +42,22 @@ void jiggler_onclick( uint16_t keycode ) { #ifndef PLODAH_MSJIGGLER_AUTOSTOP keycode == PL_MSJG && #endif // PLODAH_MSJIGGLER_AUTOSTOP - token + msJigToken ) { - cancel_deferred_exec(token); - token = INVALID_DEFERRED_TOKEN; + cancel_deferred_exec(msJigToken); + msJigToken = INVALID_DEFERRED_TOKEN; report = (report_mouse_t){}; // Clear the mouse. host_mouse_send(&report); } else if (keycode == PL_MSJG) { #ifdef PLODAH_MSJIGGLER_PATTERN #if PLODAH_MSJIGGLER_PATTERN == 1 - token = defer_exec(1, jiggler_callback_figure, NULL); + msJigToken = defer_exec(1, jiggler_callback_figure, NULL); #else // PLODAH_MSJIGGLER_PATTERN == 1 - token = defer_exec(1, jiggler_callback_circle, NULL); + msJigToken = defer_exec(1, jiggler_callback_circle, NULL); #endif // PLODAH_MSJIGGLER_PATTERN == 1 #else // PLODAH_MSJIGGLER_PATTERN - token = defer_exec(1, jiggler_callback_subtle, NULL); + msJigToken = defer_exec(1, jiggler_callback_subtle, NULL); #endif // PLODAH_MSJIGGLER_PATTERN } }