From 5ec89f380fa2a3004163d4e1c8da07dd8fc8ec1e Mon Sep 17 00:00:00 2001 From: rearman Date: Mon, 13 Apr 2026 16:05:02 -0400 Subject: [PATCH] Replace subtraction with 1- --- plc.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plc.lisp b/plc.lisp index f4ae218..ffd37c1 100644 --- a/plc.lisp +++ b/plc.lisp @@ -16,7 +16,7 @@ (defun max-counts (resolution) "Calculate the max count for a PLC analog, given card's bit-resolution." - (- (^ 2 resolution) 1)) + (1- (^ 2 resolution))) (defun volts->counts (vin) "Convert a voltage signal to a PLC count. -- 2.39.5