Skip to content

Commit

Permalink
#4 Now I-commands are transmitted to upper level
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryDzz committed Mar 25, 2014
1 parent 55f9cac commit 7396309
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions robo_body/rm_equ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,32 @@ void Equipment::executeInstruction(int value)
case Cfg::INSTRUCTION_HEADLIGHTS_OFF:
digitalWrite(Cfg::LIGHT_PIN, LOW);
Cfg::stateHeadlights = value;
Message::send("I", value);
break;
case Cfg::INSTRUCTION_HEADLIGHTS_ON:
digitalWrite(Cfg::LIGHT_PIN, HIGH);
Cfg::stateHeadlights = value;
Message::send("I", value);
break;
case Cfg::INSTRUCTION_MAIN_ACCUMULATOR_CHARGE_OFF:
digitalWrite(Cfg::MAIN_ACCUMULATOR_CHARGER_PIN, LOW);
Cfg::stateMainAccumulatorCharge = value;
Message::send("I", value);
break;
case Cfg::INSTRUCTION_MAIN_ACCUMULATOR_CHARGE_ON:
digitalWrite(Cfg::MAIN_ACCUMULATOR_CHARGER_PIN, HIGH);
Cfg::stateMainAccumulatorCharge = value;
Message::send("I", value);
break;
case Cfg::INSTRUCTION_PHONE_ACCUMULATOR_CHARGE_OFF:
digitalWrite(Cfg::PHONE_ACCUMULATOR_CHARGER_PIN, LOW);
Cfg::statePhoneAccumulatorCharge = value;
Message::send("I", value);
break;
case Cfg::INSTRUCTION_PHONE_ACCUMULATOR_CHARGE_ON:
digitalWrite(Cfg::PHONE_ACCUMULATOR_CHARGER_PIN, HIGH);
Cfg::statePhoneAccumulatorCharge = value;
Message::send("I", value);
break;
}
}
Expand Down

0 comments on commit 7396309

Please sign in to comment.