Skip to content

Commit

Permalink
Allow digital I/O and solenoid outputs to be set in a disabled state.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbarch committed Feb 17, 2014
1 parent 90fcdad commit ad6a4cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/RobotOpen/RobotOpen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,13 @@ void RobotOpenClass::writePWM(byte channel, byte pwmVal) {
}

void RobotOpenClass::writeSolenoid(byte channel, uint8_t state) {
if (_enabled && channel < 8) {
if (channel < 8) {
digitalWrite(39+channel, state);
}
}

void RobotOpenClass::writeDigital(byte channel, uint8_t state) {
if (_enabled && channel < 22 && digitalOutputChannels[channel] == true) {
if (channel < 22 && digitalOutputChannels[channel] == true) {
if (channel < 3)
digitalWrite(47+channel, state);
else
Expand Down

0 comments on commit ad6a4cd

Please sign in to comment.