Browse Source

Added temperature status less.

Hopefully fixed viky button handling without braking other boards
pull/1/head
Erik van der Zalm 11 years ago
parent
commit
8a08cca0f2
  1. 5
      Marlin/Configuration.h
  2. 38
      Marlin/Marlin_main.cpp
  3. 7
      Marlin/pins.h
  4. 1511
      Marlin/ultralcd_implementation_hitachi_HD44780.h

5
Marlin/Configuration.h

@ -540,6 +540,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
//#define FAST_PWM_FAN
// Temperature status leds that display the hotend and bet temperature.
// If alle hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
// Otherwise the RED led is on. There is 1C hysteresis.
//#define TEMP_STAT_LEDS
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE.

38
Marlin/Marlin_main.cpp

@ -2938,6 +2938,39 @@ void controllerFan()
}
#endif
#ifdef TEMP_STAT_LEDS
static bool blue_led = false;
static bool red_led = false;
static uint32_t stat_update = 0;
void handle_status_leds(void) {
float max_temp = 0.0;
if(millis() > stat_update) {
stat_update += 500; // Update every 0.5s
for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) {
max_temp = max(max_temp, degHotend(cur_extruder));
max_temp = max(max_temp, degTargetHotend(cur_extruder));
}
#if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
max_temp = max(max_temp, degTargetBed());
max_temp = max(max_temp, degBed());
#endif
if((max_temp > 55.0) && (red_led == false)) {
digitalWrite(STAT_LED_RED, 1);
digitalWrite(STAT_LED_BLUE, 0);
red_led = true;
blue_led = false;
}
if((max_temp < 54.0) && (blue_led == false)) {
digitalWrite(STAT_LED_RED, 0);
digitalWrite(STAT_LED_BLUE, 1);
red_led = false;
blue_led = true;
}
}
}
#endif
void manage_inactivity()
{
if( (millis() - previous_millis_cmd) > max_inactive_time )
@ -2991,7 +3024,10 @@ void manage_inactivity()
memcpy(destination,current_position,sizeof(destination));
prepare_move();
}
#endif
#endif
#ifdef TEMP_STAT_LEDS
handle_status_leds();
#endif
check_axes_activity();
}

7
Marlin/pins.h

@ -544,6 +544,13 @@
#endif
#endif
#ifdef TEMP_STAT_LEDS
#if MOTHERBOARD == 67
#define STAT_LED_RED 6
#define STAT_LED_BLUE 11
#endif
#endif
#ifdef ULTRA_LCD
#ifdef NEWPANEL

1511
Marlin/ultralcd_implementation_hitachi_HD44780.h

File diff suppressed because it is too large
Loading…
Cancel
Save