Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

74xx595 logic and Arduino 1.6.7 compiler fix #32

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LOCAL_PID_AutoTune_v0.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class PID_ATune
};

// irrational constants
static const double CONST_PI = 3.14159265358979323846;
static const double CONST_SQRT2_DIV_2 = 0.70710678118654752440;
const double CONST_PI = 3.14159265358979323846;
const double CONST_SQRT2_DIV_2 = 0.70710678118654752440;

// commonly used methods ***********************************************************************
PID_ATune(double*, double*); // * Constructor. links the Autotune to a given PID
Expand Down
11 changes: 7 additions & 4 deletions Outputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ Documentation, Forums and more information available at http://www.brewtroller.c
#ifdef OUTPUTBANK_MUX_ENABLELOGIC
//MUX in Reset State
muxLatchPin.clear(); //Prepare to copy pin states
muxEnablePin.clear(); //Force clear of pin registers
muxEnablePin.set(); //Force clear (inverse) of pin registers
muxLatchPin.set();
delayMicroseconds(10);
muxLatchPin.clear();
muxEnablePin.set(); //Disable clear
muxEnablePin.clear(); //Disable clear inverse)
#else
set(0);
muxEnablePin.clear();
muxEnablePin.set();
#endif
}

Expand All @@ -102,7 +102,10 @@ Documentation, Forums and more information available at http://www.brewtroller.c

for (byte i = OUTPUTBANK_MUX_COUNT; i > 0; i--) {
muxClockPin.clear();
muxDataPin.set(outputsState & ((unsigned long)1<<(i - 1)));
if(outputsState & ((unsigned long)1<<(i - 1)))
muxDataPin.set();
else
muxDataPin.clear();
muxClockPin.set();
muxDataPin.clear();
}
Expand Down