From: rearman Date: Mon, 13 Apr 2026 20:05:02 +0000 (-0400) Subject: Replace subtraction with 1- X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=5ec89f380fa2a3004163d4e1c8da07dd8fc8ec1e;p=lisp%2Fworkenv.git Replace subtraction with 1- --- 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.