Permalink
Browse files

* Cooling fan working on ec34 again

  • Loading branch information...
1 parent 177ba29 commit 0ea7dcf571b58401af3835fef07d76990abaf9a6 @phooky phooky committed Sep 1, 2011
Showing with 16 additions and 11 deletions.
  1. +5 −1 v2/src/Extruder/boards/ecv34/ExtruderBoard.cc
  2. +11 −10 v2/src/shared/CoolingFan.cc
@@ -231,7 +231,11 @@ void ExtruderBoard::doInterrupt() {
}
void ExtruderBoard::setFan(bool on) {
- CHANNEL_A.setValue(on);
+ //CHANNEL_A.setValue(on);
+ MOTOR_DIR_PIN.setDirection(true);
+ MOTOR_DIR_PIN.setValue(true);
+ MOTOR_ENABLE_PIN.setDirection(true);
+ MOTOR_ENABLE_PIN.setValue(on);
}
void ExtruderBoard::setValve(bool on) {
@@ -2,6 +2,7 @@
//#include "ExtruderMotor.hh"
#include "Eeprom.hh"
#include "EepromMap.hh"
+#include "ExtruderBoard.hh"
#define FAN_ENABLED 1
#define FAN_DISABLED 0
@@ -23,15 +24,15 @@ CoolingFan::CoolingFan(Heater& heater_in, uint16_t eeprom_base_in) :
}
void CoolingFan::reset() {
- setSetpoint(eeprom::getEeprom16(eeprom_base + SETPOINT_C_OFFSET,
- DEFAULT_COOLING_FAN_SETPOINT_C));
+ setSetpoint(eeprom::getEeprom16(eeprom_base + SETPOINT_C_OFFSET,
+ DEFAULT_COOLING_FAN_SETPOINT_C));
- if (eeprom::getEeprom8(eeprom_base + ENABLE_OFFSET,
- DEFAULT_COOLING_FAN_ENABLE) == FAN_ENABLED) {
+ if (eeprom::getEeprom8(eeprom_base + ENABLE_OFFSET,
+ DEFAULT_COOLING_FAN_ENABLE) == FAN_ENABLED) {
enable();
}
else {
- disable();
+ disable();
}
}
@@ -45,7 +46,7 @@ void CoolingFan::enable() {
void CoolingFan::disable() {
enabled = false;
- disableFan();
+ disableFan();
}
void CoolingFan::manageCoolingFan() {
@@ -61,11 +62,11 @@ void CoolingFan::manageCoolingFan() {
}
void CoolingFan::enableFan() {
-#warning cooling fan feature disabled
- // setExtruderMotor(255);
+//#warning cooling fan feature disabled
+ ExtruderBoard::getBoard().setFan(true);
}
void CoolingFan::disableFan() {
-#warning cooling fan feature disabled
-// setExtruderMotor(0);
+//#warning cooling fan feature disabled
+ ExtruderBoard::getBoard().setFan(false);
}

0 comments on commit 0ea7dcf

Please sign in to comment.