Browse files

changed 'toggleX' to 'setXRunning' to meet existing naming conventions

  • Loading branch information...
1 parent ca87879 commit 71284ab608b0604acbcb6c68ce7b78f319a47802 @FarMcKon FarMcKon committed Oct 3, 2011
View
2 v2/current_version.txt
@@ -1 +1 @@
-3.2
+3.1
View
4 v2/src/Extruder/Host.cc
@@ -137,7 +137,7 @@ bool processQueryPacket(const InPacket& from_host, OutPacket& to_host) {
to_host.append8(RC_OK);
return true;
case SLAVE_CMD_TOGGLE_FAN:
- board.toggleFan((from_host.read8(2) & 0x01) != 0);
+ board.setFanRunning((from_host.read8(2) & 0x01) != 0);
to_host.append8(RC_OK);
return true;
case SLAVE_CMD_TOGGLE_VALVE:
@@ -235,7 +235,7 @@ bool processQueryPacket(const InPacket& from_host, OutPacket& to_host) {
board.lightIndicatorLED();
return true;
case SLAVE_CMD_TOGGLE_ABP:
- board.toggleAutomatedBuildPlatform((from_host.read8(2) & 0x01) != 0);
+ board.setAutomatedBuildPlatformRunning((from_host.read8(2) & 0x01) != 0);
to_host.append8(RC_OK);
}
View
4 v2/src/Extruder/boards/ecv22/ExtruderBoard.cc
@@ -271,12 +271,12 @@ void setChannel(ChannelChoice c, uint8_t value, bool binary) {
}
}
-void ExtruderBoard::toggleFan(bool state)
+void ExtruderBoard::setFanRunning(bool state)
{ // The Goggles, they do nothing!
// on these board, there is no toggle fan. This is vestigle
}
-void ExtruderBoard::toggleAutomatedBuildPlatform(bool state) {
+void ExtruderBoard::setAutomatedBuildPlatformRunning(bool state) {
setChannel(abp_channel,state?255:0,true);
}
View
4 v2/src/Extruder/boards/ecv22/ExtruderBoard.hh
@@ -100,8 +100,8 @@ public:
// Stops/starts the motor while holding torque
void setMotorOn(bool on);
#endif
- void toggleFan(bool state);
- void toggleAutomatedBuildPlatform(bool state);
+ void setFanRunning(bool state);
+ void setAutomatedBuildPlatformRunning(bool state);
void setValve(bool on);
UART& getHostUART() { return UART::getHostUART(); }
View
4 v2/src/Extruder/boards/ecv34/ExtruderBoard.cc
@@ -244,13 +244,13 @@ void ExtruderBoard::doInterrupt() {
}
//runs the AutoBuildPlatform (connected to 'Extra' screw terms on ECv3.x )
-void ExtruderBoard::toggleAutomatedBuildPlatform(bool state)
+void ExtruderBoard::setAutomatedBuildPlatformRunning(bool state)
{
CHANNEL_A.setValue(state);
}
//runs the Extruder Cooling Fan (connected to 'A1/B1' screw term on ECv3.x)
-void ExtruderBoard::toggleFan(bool state) {
+void ExtruderBoard::setFanRunning(bool state) {
//CHANNEL_A.setValue(on);
MOTOR_DIR_PIN.setDirection(true);
MOTOR_DIR_PIN.setValue(true);
View
4 v2/src/Extruder/boards/ecv34/ExtruderBoard.hh
@@ -100,10 +100,10 @@ public:
void setMotorSpeedRPM(uint32_t speed, bool direction) {} // Unsupported on 3.4
/// Enable/Disable the extruder cooling fan
- void toggleFan(bool state);
+ void setFanRunning(bool state);
/// Enable/Disable the automatic build platform motor
- void toggleAutomatedBuildPlatform(bool state);
+ void setAutomatedBuildPlatformRunning(bool state);
void setValve(bool on);
View
10 v2/src/shared/CoolingFan.cc
@@ -50,25 +50,25 @@ void CoolingFan::enable() {
void CoolingFan::disable() {
enabled = false;
- toggleFan(false);
+ setFanRunning(false);
}
void CoolingFan::manageCoolingFan() {
// TODO: only change the state if necessary
if (enabled) {
if (heater.get_current_temperature() > setPoint) {
- toggleFan(true);
+ setFanRunning(true);
}
else {
- toggleFan(false);
+ setFanRunning(false);
}
}
}
-void CoolingFan::toggleFan(bool state)
+void CoolingFan::setFanRunning(bool state)
{
#ifdef IS_EXTRUDER_BOARD
- ExtruderBoard::getBoard().toggleFan(state);
+ ExtruderBoard::getBoard().setFanRunning(state);
#else
#warning cooling fan feature disabled
#endif
View
2 v2/src/shared/CoolingFan.hh
@@ -36,7 +36,7 @@ class CoolingFan {
private:
/// Enable/Disable the cooling fan, setting it to run at full speed.
- void toggleFan(bool state);
+ void setFanRunning(bool state);
Heater& heater; ///< Heater module to read the current temperature from.

0 comments on commit 71284ab

Please sign in to comment.