|
|
|
@ -113,7 +113,7 @@
|
|
|
|
|
* M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1. (Requires EMERGENCY_PARSER)
|
|
|
|
|
* M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
|
|
|
|
|
* Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
|
|
|
|
|
* IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
|
|
|
|
|
* If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
|
|
|
|
|
* M110 - Set the current line number. (Used by host printing)
|
|
|
|
|
* M111 - Set debug flags: "M111 S<flagbits>". See flag bits defined in enum.h.
|
|
|
|
|
* M112 - Emergency stop.
|
|
|
|
@ -131,7 +131,7 @@
|
|
|
|
|
* M140 - Set bed target temp. S<temp>
|
|
|
|
|
* M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
|
|
|
|
|
* M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
|
|
|
|
|
* M150 - Set BlinkM Color R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM)
|
|
|
|
|
* M150 - Set Status LED Color as R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM or RGB_LED)
|
|
|
|
|
* M155 - Auto-report temperatures with interval of S<seconds>. (Requires AUTO_REPORT_TEMPERATURES)
|
|
|
|
|
* M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
|
|
|
|
|
* M164 - Save the mix as a virtual extruder. (Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS)
|
|
|
|
@ -5958,20 +5958,55 @@ inline void gcode_M121() { endstops.enable_globally(false); }
|
|
|
|
|
}
|
|
|
|
|
#endif // HAVE_TMC2130DRIVER
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BLINKM)
|
|
|
|
|
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
|
|
|
|
|
|
|
|
|
|
void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) {
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BLINKM)
|
|
|
|
|
|
|
|
|
|
// This variant uses i2c to send the RGB components to the device.
|
|
|
|
|
SendColors(
|
|
|
|
|
code_seen('R') ? code_value_byte() : 0,
|
|
|
|
|
code_seen('U') ? code_value_byte() : 0,
|
|
|
|
|
code_seen('B') ? code_value_byte() : 0
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
// This variant uses 3 separate pins for the RGB components.
|
|
|
|
|
// If the pins can do PWM then their intensity will be set.
|
|
|
|
|
digitalWrite(RGB_LED_R_PIN, r ? HIGH : LOW);
|
|
|
|
|
digitalWrite(RGB_LED_G_PIN, g ? HIGH : LOW);
|
|
|
|
|
digitalWrite(RGB_LED_B_PIN, b ? HIGH : LOW);
|
|
|
|
|
analogWrite(RGB_LED_R_PIN, r);
|
|
|
|
|
analogWrite(RGB_LED_G_PIN, g);
|
|
|
|
|
analogWrite(RGB_LED_B_PIN, b);
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* M150: Set Status LED Color - Use R-U-B for R-G-B
|
|
|
|
|
*
|
|
|
|
|
* Always sets all 3 components. If a component is left out, set to 0.
|
|
|
|
|
*
|
|
|
|
|
* Examples:
|
|
|
|
|
*
|
|
|
|
|
* M150 R255 ; Turn LED red
|
|
|
|
|
* M150 R255 U127 ; Turn LED orange (PWM only)
|
|
|
|
|
* M150 ; Turn LED off
|
|
|
|
|
* M150 R U B ; Turn LED white
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
inline void gcode_M150() {
|
|
|
|
|
SendColors(
|
|
|
|
|
code_seen('R') ? code_value_byte() : 0,
|
|
|
|
|
code_seen('U') ? code_value_byte() : 0,
|
|
|
|
|
code_seen('B') ? code_value_byte() : 0
|
|
|
|
|
set_led_color(
|
|
|
|
|
code_seen('R') ? (code_has_value() ? code_value_byte() : 255) : 0,
|
|
|
|
|
code_seen('U') ? (code_has_value() ? code_value_byte() : 255) : 0,
|
|
|
|
|
code_seen('B') ? (code_has_value() ? code_value_byte() : 255) : 0
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // BLINKM
|
|
|
|
|
#endif // BLINKM || RGB_LED
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* M200: Set filament diameter and set E axis units to cubic units
|
|
|
|
@ -8147,9 +8182,9 @@ void process_next_command() {
|
|
|
|
|
break;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BLINKM)
|
|
|
|
|
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
|
|
|
|
|
|
|
|
|
|
case 150: // M150: Set the BlinkM LCD color
|
|
|
|
|
case 150: // M150: Set Status LED Color
|
|
|
|
|
gcode_M150();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -10071,6 +10106,12 @@ void setup() {
|
|
|
|
|
OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(RGB_LED)
|
|
|
|
|
pinMode(RGB_LED_R_PIN, OUTPUT);
|
|
|
|
|
pinMode(RGB_LED_G_PIN, OUTPUT);
|
|
|
|
|
pinMode(RGB_LED_B_PIN, OUTPUT);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
lcd_init();
|
|
|
|
|
#if ENABLED(SHOW_BOOTSCREEN)
|
|
|
|
|
#if ENABLED(DOGLCD)
|
|
|
|
|