Skip to content

Commit

Permalink
Merge pull request #2 from mnh86/fix-A0-ranges
Browse files Browse the repository at this point in the history
Wider range of A0 values for in/off/out
  • Loading branch information
mnh86 authored Jul 21, 2023
2 parents 7b72ebb + 9143929 commit 656d284
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/NimbleTCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 656d284

Please sign in to comment.