From 91439294a0e3c9fa15baac7c9b38b435a9474fcc Mon Sep 17 00:00:00 2001 From: mnh <123832909+mnh86@users.noreply.github.com> Date: Sun, 18 Jun 2023 14:14:36 -0400 Subject: [PATCH] Update NimbleTCode.h --- include/NimbleTCode.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/NimbleTCode.h b/include/NimbleTCode.h index db1659f..0486a7a 100644 --- a/include/NimbleTCode.h +++ b/include/NimbleTCode.h @@ -141,9 +141,12 @@ void NimbleTCode::handleAirChanges() if (!tcode->axisChanged("A0")) return; int val = tcode->axisRead("A0"); - if (val < 5000) { + // 0-3333 = air out + // 3334-6666 = valve off + // 6667-9999 = air in + if (val < 3334) { frame.air = -1; - } else if (val > 5000) { + } else if (val > 6666) { frame.air = 1; } else { frame.air = 0;