From eb055ca8a23635024660c29f3dfeaefd9dc24bef Mon Sep 17 00:00:00 2001 From: Nico Aleman Date: Thu, 30 Jan 2025 12:59:19 -0800 Subject: [PATCH] Fixed Speed Calculation (Poles -> Pole Pairs) The Poles setting implies total poles, but was used as Pole Pairs in the speed calculation. Fixed such that the set total poles is divided by 2 in the calculation. Before the fix, the speed was reading as half. --- display/res/speed_box.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/display/res/speed_box.lisp b/display/res/speed_box.lisp index 854ed25..309efe5 100644 --- a/display/res/speed_box.lisp +++ b/display/res/speed_box.lisp @@ -7,7 +7,7 @@ @const-start (defun speed_cal(){ (if (and (not-eq poles_config 0) (not-eq pulley_config 0)) - (setq speed_val (*(* (/ (/ (abs rpm) poles_config) pulley_config) wheel_diam_config 0.18845))) + (setq speed_val (*(* (/ (/ (abs rpm) (/ poles_config 2)) pulley_config) wheel_diam_config 0.18845))) (setq speed_val 0.0) )