Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Fix motherboard builds

* Readd testing code
  • Loading branch information...
commit 6b7f99662ef7b49e144166073587b5cfaedcedaf 1 parent 0ea7dcf
@phooky phooky authored
View
1  v2/src/Motherboard/Main.cc
@@ -45,6 +45,7 @@ void reset(bool hard_reset) {
Timeout t;
t.start(1000L*2500L); // wait for 2500 ms
while (!t.hasElapsed());
+ tool::test(); // Run test
}
if (!tool::reset())
{
View
9 v2/src/Motherboard/Tool.cc
@@ -186,7 +186,7 @@ bool test() {
packet_retry_count = 0;
noise_byte_count = 0;
- // Now, test comms by pinging the extruder controller relentlessly.
+ // Now, test comms by pinging a extruder controller relentlessly.
// TODO: handle cases where a toolhead is not attached?
uint8_t i = 0;
bool result = true;
@@ -195,8 +195,11 @@ bool test() {
result = getToolVersion();
i++;
}
- return (packet_retry_count <= 0);
- //setToolIndicatorLED();
+ bool rv = (packet_retry_count <= 0);
+ if (rv) {
+ setToolIndicatorLED();
+ }
+ return rv;
}
/// The tool is considered locked if a transaction is in progress or
View
12 v2/src/shared/CoolingFan.cc
@@ -1,8 +1,11 @@
+#include "Configuration.hh"
#include "CoolingFan.hh"
//#include "ExtruderMotor.hh"
#include "Eeprom.hh"
#include "EepromMap.hh"
+#ifdef IS_EXTRUDER_BOARD
#include "ExtruderBoard.hh"
+#endif
#define FAN_ENABLED 1
#define FAN_DISABLED 0
@@ -62,11 +65,18 @@ void CoolingFan::manageCoolingFan() {
}
void CoolingFan::enableFan() {
-//#warning cooling fan feature disabled
+#ifdef IS_EXTRUDER_BOARD
ExtruderBoard::getBoard().setFan(true);
+#else
+ #warning cooling fan feature disabled
+#endif
}
void CoolingFan::disableFan() {
+#ifdef IS_EXTRUDER_BOARD
//#warning cooling fan feature disabled
ExtruderBoard::getBoard().setFan(false);
+#else
+ #warning cooling fan feature disabled
+#endif
}
Please sign in to comment.
Something went wrong with that request. Please try again.