Fix Ext0 motor is not disabled on DaVinci 2.0

Pin is 128 and int8_t see is as -128 and then give the condition to
disable wrong
if(extruder[i].enablePin > -1)
digitalWrite(extruder[i].enablePin,!extruder[i].enableOn);
change type of value to int16_t to avoid 128 and upper pin to be seen as
negative pin
pull/21/merge
Luc 2015-01-12 21:45:45 +08:00
rodzic 4cea0ea717
commit f6dfc8aa8a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -112,7 +112,7 @@ class Extruder // Size: 12*1 Byte+12*4 Byte+4*2Byte = 68 Byte
int32_t xOffset;
int32_t yOffset;
float stepsPerMM; ///< Steps per mm.
int8_t enablePin; ///< Pin to enable extruder stepper motor.
int16_t enablePin; ///< Pin to enable extruder stepper motor.
// uint8_t directionPin; ///< Pin number to assign the direction.
// uint8_t stepPin; ///< Pin number for a step.
uint8_t enableOn;