Skip to content

Commit

Permalink
Merge pull request #7720 from thinkyhead/bf1_caselight_fix
Browse files Browse the repository at this point in the history
Fix caselight compile issues
  • Loading branch information
thinkyhead authored Sep 24, 2017
2 parents 386b74f + 9d4d53e commit ca13f4c
Show file tree
Hide file tree
Showing 100 changed files with 243 additions and 193 deletions.
6 changes: 4 additions & 2 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -955,9 +955,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1198,7 +1200,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
7 changes: 3 additions & 4 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10097,15 +10097,14 @@ inline void gcode_M907() {
#ifndef INVERT_CASE_LIGHT
#define INVERT_CASE_LIGHT false
#endif
int case_light_brightness; // LCD routine wants INT
uint8_t case_light_brightness; // LCD routine wants INT
bool case_light_on;

void update_case_light() {
pinMode(CASE_LIGHT_PIN, OUTPUT); // digitalWrite doesn't set the port mode
uint8_t case_light_bright = (uint8_t)case_light_brightness;
if (case_light_on) {
if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) {
analogWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? 255 - case_light_brightness : case_light_brightness );
analogWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? 255 - case_light_brightness : case_light_brightness);
}
else WRITE(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? LOW : HIGH);
}
Expand Down Expand Up @@ -10139,7 +10138,7 @@ inline void gcode_M355() {
}
else {
if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLN("Case light: on");
else SERIAL_ECHOLNPAIR("Case light: ", case_light_brightness);
else SERIAL_ECHOLNPAIR("Case light: ", (int)case_light_brightness);
}

#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1218,7 +1220,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -955,9 +955,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1198,7 +1200,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/Anet/A6/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1098,9 +1098,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1355,7 +1357,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/Anet/A6/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/Anet/A8/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1204,7 +1206,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/Anet/A8/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/BQ/Hephestos/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1189,7 +1191,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1199,7 +1201,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/BQ/WITBOX/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1189,7 +1191,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/Cartesio/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -954,9 +954,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1197,7 +1199,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/Cartesio/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/Creality/CR-10/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -965,9 +965,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1210,7 +1212,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/Felix/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1180,7 +1182,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/Felix/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/example_configurations/Felix/DUAL/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1180,7 +1182,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,11 @@
#if ENABLED(LCD_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
#define LEVEL_BED_CORNERS // Add an option to move between corners
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
Expand Down Expand Up @@ -1203,7 +1205,7 @@
* - Click the controller to view the LCD menu
* - The LCD will display Japanese, Western, or Cyrillic text
*
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
* See http://marlinfw.org/docs/development/lcd_language.html
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/**
* Part-Cooling Fan Multiplexer
*
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
Expand Down
Loading

0 comments on commit ca13f4c

Please sign in to comment.