Skip to content

Commit

Permalink
fix PWM limit control
Browse files Browse the repository at this point in the history
  • Loading branch information
jay committed Oct 24, 2015
1 parent 7c6fb56 commit 4e6fe65
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/ArduinoAVR/Repetier/Extruder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,20 @@ void Extruder::manageTemperatures()
if(act->currentTemperatureC > MAXTEMP) // Force heater off if MAXTEMP is exceeded
output = 0;
#endif
if (controller == 0)
// limit PMW if we are not a bed controller, to support stock 12V or 19V heaters
if (act != &heatedBedController)
{
output *= EXT0_MAX_PWM;
}
else if (controller == 1)
{
output *= EXT1_MAX_PWM;
if (controller == 0)
{
output *= EXT0_MAX_PWM;
}
else if (controller == 1)
{
output *= EXT1_MAX_PWM;
}
}


pwm_pos[act->pwmIndex] = output; // set pwm signal
#if LED_PIN > -1
if(act == &Extruder::current->tempControl)
Expand Down

0 comments on commit 4e6fe65

Please sign in to comment.