Fixed Fan to use correct library and range
This commit is contained in:
parent
799e69dca2
commit
0da2319c67
1 changed files with 7 additions and 2 deletions
|
@ -551,7 +551,7 @@ class Platform
|
||||||
uint16_t zProbeReadings[NumZProbeReadingsAveraged];
|
uint16_t zProbeReadings[NumZProbeReadingsAveraged];
|
||||||
int zProbeADValue;
|
int zProbeADValue;
|
||||||
float zProbeStopHeight;
|
float zProbeStopHeight;
|
||||||
bool zProbeEnable;
|
|
||||||
// AXES
|
// AXES
|
||||||
|
|
||||||
void InitZProbe();
|
void InitZProbe();
|
||||||
|
@ -936,11 +936,16 @@ inline float Platform::DMix(int8_t heater) const
|
||||||
return dMix[heater];
|
return dMix[heater];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Changed to be compatible with existing gcode norms
|
||||||
|
// M106 S0 = fully off M106 S255 = fully on
|
||||||
inline void Platform::CoolingFan(float speed)
|
inline void Platform::CoolingFan(float speed)
|
||||||
{
|
{
|
||||||
|
//byte p = (byte)(255.0*fmin(1.0, fmax(0.0, speed))); //this reverts to 0= off, 1 = on if uncommented
|
||||||
|
byte p = (byte)speed;
|
||||||
|
p = 255 - p; //duet v0.6
|
||||||
if(coolingFanPin < 0)
|
if(coolingFanPin < 0)
|
||||||
return;
|
return;
|
||||||
analogWrite(coolingFanPin, (uint8_t)(speed*255.0));
|
analogWriteNonDue(coolingFanPin, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
//inline void Platform::SetHeatOn(int8_t ho)
|
//inline void Platform::SetHeatOn(int8_t ho)
|
||||||
|
|
Reference in a new issue