Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3f269fdf3 | |||
| 79bc5be06d | |||
| 2eb3ff66a9 | |||
| c7c87aacce | |||
| 1fa264a9d8 | |||
| 683ccc8faa | |||
| 352e41bad7 | |||
| c674286de2 | |||
| 364684f60e | |||
| 9f81c7622b | |||
| f344131699 | |||
| 9b27abdb09 | |||
| c8ee607092 | |||
| a130e08b3c | |||
| dc0cf5861a | |||
| 0196385a92 | |||
| 0df276d871 | |||
| baf8b6288c | |||
| e6d3289dba | |||
| 37b1725a65 | |||
| 43ad3cb6a0 | |||
| 22fda76fdc | |||
| e62e389bec | |||
| 6052988f6f | |||
| 38581acb15 | |||
| 6dc6ff8e30 | |||
| b1c20a6aa7 | |||
| 831e72453d | |||
| ecd9c1370b | |||
| a5886798be | |||
| 5b7e2f7055 | |||
| 5b8f71b846 | |||
| ac7dae7b49 | |||
| 2fd98ab17c | |||
| c1e57e3a9b | |||
| 7232bdd883 | |||
| e4cad11951 | |||
| d923c018b8 | |||
| e3f6f1b12c | |||
| ec2c721ca2 | |||
| 919d7f8999 | |||
| 8573625fab | |||
| 900bb1aba3 | |||
| 5927818234 | |||
| 8be2aa0ef4 | |||
| 6284eaf17d | |||
| 5094b167d4 | |||
| 42e9e85282 | |||
| eb0bf22d09 | |||
| 57e51e0d7d | |||
| 3358333e22 | |||
| a7a6503917 | |||
| acbe72c239 | |||
| dbac603128 |
@@ -51,8 +51,8 @@ jobs:
|
||||
export PATH=`pwd`/buildroot/bin/:${PATH}
|
||||
|
||||
# Generate custom version include
|
||||
generate_version ./Marlin/src/inc
|
||||
cat ./Marlin/src/inc/_Version.h
|
||||
generate_version ./Marlin/
|
||||
cat ./Marlin/Version.h
|
||||
#
|
||||
# Back up pins_RAMPS.h
|
||||
#
|
||||
|
||||
+7
-5
@@ -13,8 +13,6 @@ env:
|
||||
- TEST_PLATFORM="DUE"
|
||||
- TEST_PLATFORM="esp32"
|
||||
- TEST_PLATFORM="linux_native"
|
||||
- TEST_PLATFORM="LPC1768"
|
||||
- TEST_PLATFORM="LPC1769"
|
||||
- TEST_PLATFORM="megaatmega2560"
|
||||
- TEST_PLATFORM="STM32F103RE"
|
||||
- TEST_PLATFORM="teensy31"
|
||||
@@ -35,12 +33,16 @@ env:
|
||||
- TEST_PLATFORM="jgaurora_a5s_a1"
|
||||
- TEST_PLATFORM="STM32F103VE_longer"
|
||||
- TEST_PLATFORM="STM32F407VE_black"
|
||||
- TEST_PLATFORM="mks_robin"
|
||||
|
||||
# Put lengthy tests last
|
||||
- TEST_PLATFORM="LPC1768"
|
||||
- TEST_PLATFORM="LPC1769"
|
||||
|
||||
# Non-working environment tests
|
||||
#- TEST_PLATFORM="at90usb1286_cdc"
|
||||
#- TEST_PLATFORM="at90usb1286_dfu"
|
||||
#- TEST_PLATFORM="STM32F103CB_malyan"
|
||||
#- TEST_PLATFORM="mks_robin"
|
||||
#- TEST_PLATFORM="mks_robin_lite"
|
||||
#- TEST_PLATFORM="mks_robin_mini"
|
||||
#- TEST_PLATFORM="mks_robin_nano"
|
||||
@@ -73,8 +75,8 @@ before_script:
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
#
|
||||
# Generate custom version include
|
||||
- generate_version ${TRAVIS_BUILD_DIR}/Marlin/src/inc
|
||||
- cat ${TRAVIS_BUILD_DIR}/Marlin/src/inc/_Version.h
|
||||
- generate_version ${TRAVIS_BUILD_DIR}/Marlin/
|
||||
- cat ${TRAVIS_BUILD_DIR}/Marlin/Version.h
|
||||
#
|
||||
script:
|
||||
- run_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
|
||||
|
||||
Binary file not shown.
-9758
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+271
-1004
File diff suppressed because it is too large
Load Diff
+166
-223
@@ -137,12 +137,10 @@
|
||||
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
|
||||
#define THERMAL_PROTECTION_PERIOD 60 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
|
||||
#define THERMAL_PROTECTION_PERIOD 120 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
#if DISABLED(MachineCR10Orig)
|
||||
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
|
||||
#endif
|
||||
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
|
||||
#if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
|
||||
#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
|
||||
#endif
|
||||
@@ -159,41 +157,22 @@
|
||||
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
|
||||
* below 2.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 50 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#define WATCH_TEMP_PERIOD 120 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Thermal Protection parameters for the bed are just as above for hotends.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_BED)
|
||||
#if(ENABLED(BedDC))
|
||||
#if EITHER(MachineS5, MachineCR10Max)
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 240 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
#define WATCH_BED_TEMP_PERIOD 240 // Seconds
|
||||
#define WATCH_BED_TEMP_INCREASE 4 // Degrees Celsius
|
||||
|
||||
#else
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 50 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
|
||||
#define WATCH_BED_TEMP_PERIOD 180 // Seconds
|
||||
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#endif
|
||||
#else
|
||||
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 30 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
|
||||
#define WATCH_BED_TEMP_PERIOD 120 // Seconds
|
||||
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#endif
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 240 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* As described above, except for the bed (M140/M190/M303).
|
||||
*/
|
||||
#define WATCH_BED_TEMP_PERIOD 240 // Seconds
|
||||
#define WATCH_BED_TEMP_INCREASE 4 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -230,17 +209,14 @@
|
||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define AUTOTEMP
|
||||
#endif
|
||||
#define AUTOTEMP
|
||||
#if ENABLED(AUTOTEMP)
|
||||
#define AUTOTEMP_OLDWEIGHT 0.98
|
||||
#endif
|
||||
|
||||
// Show extra position information in M114
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define M114_DETAIL
|
||||
#endif
|
||||
// Show extra position information with 'M114 D'
|
||||
//#define M114_DETAIL
|
||||
|
||||
// Show Temperature ADC value
|
||||
// Enable for M105 to include ADC values read from temperature sensors.
|
||||
//#define SHOW_TEMP_ADC_VALUES
|
||||
@@ -303,15 +279,16 @@
|
||||
*/
|
||||
//#define USE_CONTROLLER_FAN
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
|
||||
#define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
|
||||
#define CONTROLLERFAN_SPEED 255 // 255 == full speed
|
||||
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
|
||||
#define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
|
||||
#define CONTROLLERFAN_SPEED 255 // 255 == full speed
|
||||
//#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled
|
||||
#endif
|
||||
|
||||
// When first starting the main fan, run it at full speed for the
|
||||
// given number of milliseconds. This gets the fan spinning reliably
|
||||
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
|
||||
#define FAN_KICKSTART_TIME 100
|
||||
//#define FAN_KICKSTART_TIME 100
|
||||
|
||||
/**
|
||||
* PWM Fan Scaling
|
||||
@@ -396,19 +373,15 @@
|
||||
/**
|
||||
* M355 Case Light on-off / brightness
|
||||
*/
|
||||
#if(ENABLED(EnclosureLight))
|
||||
#define CASE_LIGHT_ENABLE
|
||||
#endif
|
||||
//#define CASE_LIGHT_ENABLE
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
#if ENABLED(MachineCR2020)
|
||||
#define CASE_LIGHT_PIN 65 // Override the default pin if needed
|
||||
#else
|
||||
#define CASE_LIGHT_PIN 12 // Override the default pin if needed
|
||||
#endif
|
||||
//#define CASE_LIGHT_PIN 4 // Override the default pin if needed
|
||||
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
|
||||
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
|
||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin)
|
||||
#define CASE_LIGHT_MENU // Add a Case Light option to the LCD main menu
|
||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
|
||||
//#define CASE_LIGHT_MAX_PWM 128 // Limit pwm
|
||||
//#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
||||
//#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
|
||||
//#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
|
||||
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
||||
#define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
|
||||
@@ -467,7 +440,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define Z_DUAL_STEPPER_DRIVERS
|
||||
#if ENABLED(DUAL_Z)
|
||||
#define Z_DUAL_STEPPER_DRIVERS
|
||||
#endif
|
||||
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
|
||||
//#define Z_DUAL_ENDSTOPS
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
@@ -545,16 +520,16 @@
|
||||
// Homing hits each endstop, retracts by these distances, then does a slower bump.
|
||||
#define X_HOME_BUMP_MM 5
|
||||
#define Y_HOME_BUMP_MM 5
|
||||
#define Z_HOME_BUMP_MM 2
|
||||
#define Z_HOME_BUMP_MM 5
|
||||
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
|
||||
//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
|
||||
//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing
|
||||
|
||||
// When G28 is called, this option will make Y home before X
|
||||
//#define HOME_Y_BEFORE_X
|
||||
|
||||
// Enable this if X or Y can't home without homing the other axis first.
|
||||
//#define CODEPENDENT_XY_HOMING
|
||||
#define CODEPENDENT_XY_HOMING
|
||||
|
||||
#if ENABLED(BLTOUCH)
|
||||
/**
|
||||
@@ -600,7 +575,7 @@
|
||||
* differs, a mode set eeprom write will be completed at initialization.
|
||||
* Use the option below to force an eeprom write to a V3.1 probe regardless.
|
||||
*/
|
||||
#define BLTOUCH_SET_5V_MODE
|
||||
//#define BLTOUCH_SET_5V_MODE
|
||||
|
||||
/**
|
||||
* Safety: Activate if connecting a probe with an unknown voltage mode.
|
||||
@@ -616,9 +591,7 @@
|
||||
* This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function
|
||||
* If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state.
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define BLTOUCH_HS_MODE
|
||||
#endif
|
||||
#define BLTOUCH_HS_MODE
|
||||
|
||||
// Safety: Enable voltage mode settings in the LCD menu.
|
||||
//#define BLTOUCH_LCD_VOLTAGE_MENU
|
||||
@@ -629,21 +602,40 @@
|
||||
* Z Steppers Auto-Alignment
|
||||
* Add the G34 command to align multiple Z steppers using a bed probe.
|
||||
*/
|
||||
//#define Z_STEPPER_AUTO_ALIGN
|
||||
#if ENABLED(DUAL_Z)
|
||||
#define Z_STEPPER_AUTO_ALIGN
|
||||
#endif
|
||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||
// Define probe X and Y positions for Z1, Z2 [, Z3]
|
||||
#define Z_STEPPER_ALIGN_XY { { 10, 290 }, { 150, 10 }, { 290, 290 } } // Set number of iterations to align
|
||||
#define Z_STEPPER_ALIGN_ITERATIONS 3
|
||||
#if ENABLED(SX2)
|
||||
#define Z_STEPPER_ALIGN_XY { { 42, 100 }, { 225, 100 } }
|
||||
#else
|
||||
#define Z_STEPPER_ALIGN_XY { { 50, 200 }, { 350, 200 } }
|
||||
#endif
|
||||
|
||||
// Provide Z stepper positions for more rapid convergence in bed alignment.
|
||||
// Currently requires triple stepper drivers.
|
||||
//#define Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
// Define Stepper XY positions for Z1, Z2, Z3 corresponding to
|
||||
// the Z screw positions in the bed carriage.
|
||||
// Define one position per Z stepper in stepper driver order.
|
||||
#define Z_STEPPER_ALIGN_STEPPER_XY { { 210.7, 102.5 }, { 152.6, 220.0 }, { 94.5, 102.5 } }
|
||||
#else
|
||||
// Amplification factor. Used to scale the correction step up or down.
|
||||
// In case the stepper (spindle) position is further out than the test point.
|
||||
// Use a value > 1. NOTE: This may cause instability
|
||||
#define Z_STEPPER_ALIGN_AMP 1.0
|
||||
#endif
|
||||
|
||||
// Set number of iterations to align
|
||||
#define Z_STEPPER_ALIGN_ITERATIONS 6
|
||||
// Enable to restore leveling setup after operation
|
||||
#define RESTORE_LEVELING_AFTER_G34
|
||||
|
||||
// On a 300mm bed a 5% grade would give a misalignment of ~1.5cm
|
||||
#define G34_MAX_GRADE 5 // (%) Maximum incline G34 will handle
|
||||
#define G34_MAX_GRADE 15 // (%) Maximum incline G34 will handle
|
||||
|
||||
// Use the amplification factor to de-/increase correction step.
|
||||
// In case the stepper (spindle) position is further out than the test point
|
||||
// Use a value > 1. NOTE: This may cause instability
|
||||
#define Z_STEPPER_ALIGN_AMP 1.0
|
||||
// Stop criterion. If the accuracy is better than this stop iterating early
|
||||
#define Z_STEPPER_ALIGN_ACC 0.02
|
||||
#endif
|
||||
@@ -673,17 +665,14 @@
|
||||
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
|
||||
#define DEFAULT_MINTRAVELFEEDRATE 0.0
|
||||
|
||||
#if ANY(MachineEnder5, MachineEnder5Plus)
|
||||
#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
|
||||
#endif
|
||||
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
|
||||
|
||||
// Minimum time that a segment needs to take if the buffer is emptied
|
||||
#define DEFAULT_MINSEGMENTTIME 20000 // (ms)
|
||||
|
||||
// If defined the movements slow down when the look ahead buffer is only half full
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define SLOWDOWN
|
||||
#endif
|
||||
#define SLOWDOWN
|
||||
|
||||
// Frequency limit
|
||||
// See nophead's blog for more info
|
||||
// Not working O
|
||||
@@ -786,8 +775,9 @@
|
||||
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
|
||||
* lowest stepping frequencies.
|
||||
*/
|
||||
//#define ADAPTIVE_STEP_SMOOTHING
|
||||
|
||||
#if ENABLED(SKR13)
|
||||
#define ADAPTIVE_STEP_SMOOTHING
|
||||
#endif
|
||||
/**
|
||||
* Custom Microstepping
|
||||
* Override as-needed for your setup. Up to 3 MS pins are supported.
|
||||
@@ -881,9 +871,7 @@
|
||||
#if HAS_LCD_MENU
|
||||
|
||||
// Include a page of printer information in the LCD Main Menu
|
||||
#if(DISABLED(MachineCR10Orig))
|
||||
#define LCD_INFO_MENU
|
||||
#endif
|
||||
#define LCD_INFO_MENU
|
||||
#if ENABLED(LCD_INFO_MENU)
|
||||
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
|
||||
#endif
|
||||
@@ -911,21 +899,24 @@
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
// Scroll a longer status message into view
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define STATUS_MESSAGE_SCROLLING
|
||||
#define STATUS_MESSAGE_SCROLLING
|
||||
|
||||
// On the Info Screen, display XY with one decimal place when possible
|
||||
//#define LCD_DECIMAL_SMALL_XY
|
||||
|
||||
// On the Info Screen, display XY with one decimal place when possible
|
||||
#define LCD_DECIMAL_SMALL_XY
|
||||
#endif
|
||||
// The timeout (in ms) to return to the status screen from sub-menus
|
||||
#define LCD_TIMEOUT_TO_STATUS 15000
|
||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||
|
||||
// Add an 'M73' G-code to set the current percentage
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define LCD_SET_PROGRESS_MANUALLY
|
||||
//#define LCD_SET_PROGRESS_MANUALLY
|
||||
|
||||
#if HAS_PRINT_PROGRESS
|
||||
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits (Graphical LCD only)
|
||||
//#define SHOW_REMAINING_TIME // Display estimated time to completion (Graphical LCD only)
|
||||
#endif
|
||||
|
||||
#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
|
||||
#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
|
||||
//#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
|
||||
#define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
|
||||
@@ -942,22 +933,20 @@
|
||||
// as SD_DETECT_PIN in your board's pins definitions.
|
||||
// This setting should be disabled unless you are using a push button, pulling the pin to ground.
|
||||
// Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
|
||||
#if NONE(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max)
|
||||
#define SD_DETECT_INVERTED
|
||||
#endif
|
||||
#define SD_DETECT_INVERTED
|
||||
|
||||
#define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
|
||||
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
|
||||
|
||||
// Reverse SD sort to show "more recent" files first, according to the card's FAT.
|
||||
// Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define SDCARD_RATHERRECENTFIRST
|
||||
#define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing
|
||||
#define SDCARD_RATHERRECENTFIRST
|
||||
|
||||
//#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files
|
||||
#define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing
|
||||
|
||||
#define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
|
||||
#endif
|
||||
//#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files
|
||||
|
||||
#define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
|
||||
|
||||
/**
|
||||
* Continue after Power-Loss (Creality3D)
|
||||
@@ -967,7 +956,9 @@
|
||||
* an option on the LCD screen to continue the print from the last-known
|
||||
* point in the file.
|
||||
*/
|
||||
//#define POWER_LOSS_RECOVERY
|
||||
#if ENABLED(SKR13)
|
||||
#define POWER_LOSS_RECOVERY
|
||||
#endif
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
@@ -1018,12 +1009,11 @@
|
||||
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
|
||||
#endif
|
||||
|
||||
// This allows hosts to request long names for files and folders with M33
|
||||
#define LONG_FILENAME_HOST_SUPPORT
|
||||
|
||||
// Enable this option to scroll long filenames in the SD card menu
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
// This allows hosts to request long names for files and folders with M33
|
||||
#define LONG_FILENAME_HOST_SUPPORT
|
||||
#define SCROLL_LONG_FILENAMES
|
||||
#endif
|
||||
#define SCROLL_LONG_FILENAMES
|
||||
|
||||
// Leave the heaters on after Stop Print (not recommended!)
|
||||
//#define SD_ABORT_NO_COOLDOWN
|
||||
@@ -1045,9 +1035,7 @@
|
||||
/**
|
||||
* Auto-report SdCard status with M27 S<seconds>
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define AUTO_REPORT_SD_STATUS
|
||||
#endif
|
||||
#define AUTO_REPORT_SD_STATUS
|
||||
|
||||
/**
|
||||
* Support for USB thumb drives using an Arduino USB Host Shield or
|
||||
@@ -1135,7 +1123,7 @@
|
||||
*/
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
// Show SD percentage next to the progress bar
|
||||
//#define DOGM_SD_PERCENT
|
||||
#define DOGM_SD_PERCENT
|
||||
|
||||
// Enable to save many cycles by drawing a hollow frame on the Info Screen
|
||||
#define XYZ_HOLLOW_FRAME
|
||||
@@ -1145,7 +1133,7 @@
|
||||
|
||||
// A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
|
||||
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
|
||||
//#define USE_BIG_EDIT_FONT
|
||||
#define USE_BIG_EDIT_FONT
|
||||
|
||||
// A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
|
||||
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
|
||||
@@ -1171,9 +1159,7 @@
|
||||
* This will prevent position updates from being displayed.
|
||||
*/
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if ENABLED(Big_UI)
|
||||
#define LIGHTWEIGHT_UI
|
||||
#endif
|
||||
//#define LIGHTWEIGHT_UI
|
||||
#if ENABLED(LIGHTWEIGHT_UI)
|
||||
#define STATUS_EXPIRE_SECONDS 20
|
||||
#endif
|
||||
@@ -1187,26 +1173,23 @@
|
||||
//#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones
|
||||
//#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends)
|
||||
#define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM)
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
|
||||
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
|
||||
#endif
|
||||
#define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
|
||||
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
|
||||
#define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating
|
||||
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
|
||||
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
|
||||
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
|
||||
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
|
||||
//#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash)
|
||||
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
|
||||
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash)
|
||||
//#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu
|
||||
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
|
||||
|
||||
// Frivolous Game Options
|
||||
#if ENABLED(SKR13)
|
||||
// Frivolous Game Options
|
||||
#define MARLIN_BRICKOUT
|
||||
#define MARLIN_INVADERS
|
||||
#define MARLIN_SNAKE
|
||||
#endif
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
@@ -1334,7 +1317,7 @@
|
||||
//#define BABYSTEP_WITHOUT_HOMING
|
||||
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
|
||||
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
|
||||
#define BABYSTEP_MULTIPLICATOR 10 // Babysteps are very small. Increase for faster motion.
|
||||
#define BABYSTEP_MULTIPLICATOR 10 // Babysteps are very small. Increase for faster motion.
|
||||
|
||||
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
|
||||
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
|
||||
@@ -1347,16 +1330,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
|
||||
#endif
|
||||
//#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
|
||||
|
||||
#if ANY(ABL_EZABL, ABL_BLTOUCH, ABL_NCSW)
|
||||
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
||||
#endif
|
||||
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard, EXTENSIBLE_UI)
|
||||
#if ENABLED(GRAPHICSLCD)
|
||||
#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
|
||||
#endif
|
||||
#endif
|
||||
@@ -1380,7 +1359,7 @@
|
||||
* See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
|
||||
* Mention @Sebastianv650 on GitHub to alert the author of any issues.
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard, MachineCR10SPro, MachineCR10Max, SKR13, MachineCR10SV2) || ENABLED(OrigLA) || ENABLED(SKR13, SKR13_UART)
|
||||
#if E0_DRIVER_TYPE != TMC2208_STANDALONE
|
||||
#define LIN_ADVANCE
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
@@ -1423,8 +1402,8 @@
|
||||
#if PROBE_SELECTED && !IS_KINEMATIC
|
||||
//#define MIN_PROBE_EDGE_LEFT MIN_PROBE_EDGE
|
||||
//#define MIN_PROBE_EDGE_RIGHT MIN_PROBE_EDGE
|
||||
#define MIN_PROBE_EDGE_FRONT (MIN_PROBE_EDGE + ClipClearance)
|
||||
#define MIN_PROBE_EDGE_BACK (MIN_PROBE_EDGE + ClipClearance)
|
||||
//#define MIN_PROBE_EDGE_FRONT MIN_PROBE_EDGE
|
||||
//#define MIN_PROBE_EDGE_BACK MIN_PROBE_EDGE
|
||||
#endif
|
||||
|
||||
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
|
||||
@@ -1439,7 +1418,7 @@
|
||||
* Repeatedly attempt G29 leveling until it succeeds.
|
||||
* Stop after G29_MAX_RETRIES attempts.
|
||||
*/
|
||||
#if ENABLED(ABL_BI) && NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#if DISABLED(UBL)
|
||||
#define G29_RETRY_AND_RECOVER
|
||||
#endif
|
||||
#if ENABLED(G29_RETRY_AND_RECOVER)
|
||||
@@ -1460,9 +1439,7 @@
|
||||
//
|
||||
// G2/G3 Arc Support
|
||||
//
|
||||
#if DISABLED(MachineCR10Orig)
|
||||
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
|
||||
#endif
|
||||
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
|
||||
#if ENABLED(ARC_SUPPORT)
|
||||
#define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
|
||||
#define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle
|
||||
@@ -1472,7 +1449,7 @@
|
||||
#endif
|
||||
|
||||
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||
//#define BEZIER_CURVE_SUPPORT
|
||||
#define BEZIER_CURVE_SUPPORT
|
||||
|
||||
/**
|
||||
* G38 Probe Target
|
||||
@@ -1517,9 +1494,8 @@
|
||||
*
|
||||
* Override the default value based on the driver type set in Configuration.h.
|
||||
*/
|
||||
#if ENABLED(SKR13)
|
||||
#define MINIMUM_STEPPER_PULSE 1
|
||||
#endif
|
||||
//#define MINIMUM_STEPPER_PULSE 2
|
||||
|
||||
/**
|
||||
* Maximum stepping rate (in Hz) the stepper driver allows
|
||||
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
|
||||
@@ -1548,11 +1524,7 @@
|
||||
// The number of linear motions that can be in the plan at any give time.
|
||||
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#if(ENABLED(MachineCR10Orig) || ENABLED(LowMemoryBoard))
|
||||
#define BLOCK_BUFFER_SIZE 4 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
|
||||
#else
|
||||
#define BLOCK_BUFFER_SIZE 16
|
||||
#endif
|
||||
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
|
||||
#else
|
||||
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
|
||||
#endif
|
||||
@@ -1561,11 +1533,8 @@
|
||||
|
||||
// The ASCII buffer for serial input
|
||||
#define MAX_CMD_SIZE 96
|
||||
#if(ENABLED(MachineCR10Orig) || ENABLED(LowMemoryBoard))
|
||||
#define BUFSIZE 2
|
||||
#else
|
||||
#define BUFSIZE 4
|
||||
#endif
|
||||
|
||||
// Transmission to Host Buffer Size
|
||||
// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
|
||||
// To buffer a simple "ok" you need 4 bytes.
|
||||
@@ -1610,14 +1579,10 @@
|
||||
// Therefore some clients abort after 30 seconds in a timeout.
|
||||
// Some other clients start sending commands while receiving a 'wait'.
|
||||
// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define NO_TIMEOUTS 1000 // Milliseconds
|
||||
#endif
|
||||
#define NO_TIMEOUTS 1000 // Milliseconds
|
||||
|
||||
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define ADVANCED_OK
|
||||
#endif
|
||||
#define ADVANCED_OK
|
||||
|
||||
// Printrun may have trouble receiving long strings all at once.
|
||||
// This option inserts short delays between lines of serial output.
|
||||
@@ -1649,9 +1614,7 @@
|
||||
* Note that M207 / M208 / M209 settings are saved to EEPROM.
|
||||
*
|
||||
*/
|
||||
#if ENABLED(SKR13)
|
||||
#define FWRETRACT
|
||||
#endif
|
||||
#define FWRETRACT
|
||||
#if ENABLED(FWRETRACT)
|
||||
#define FWRETRACT_AUTORETRACT // Override slicer retractions
|
||||
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||
@@ -1678,24 +1641,24 @@
|
||||
#if EXTRUDERS > 1
|
||||
// Z raise distance for tool-change, as needed for some extruders
|
||||
#define TOOLCHANGE_ZRAISE 2 // (mm)
|
||||
#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change
|
||||
//#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change
|
||||
|
||||
// Retract and prime filament on tool-change
|
||||
#define TOOLCHANGE_FILAMENT_SWAP
|
||||
//#define TOOLCHANGE_FILAMENT_SWAP
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
#define TOOLCHANGE_FIL_SWAP_LENGTH 80 // (mm)
|
||||
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
|
||||
#define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
|
||||
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3000 // (mm/m)
|
||||
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3000 // (mm/m)
|
||||
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
|
||||
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Position to park head during tool change.
|
||||
* Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
|
||||
*/
|
||||
#define TOOLCHANGE_PARK
|
||||
//#define TOOLCHANGE_PARK
|
||||
#if ENABLED(TOOLCHANGE_PARK)
|
||||
#define TOOLCHANGE_PARK_XY { X_MAX_POS - 5, Y_MIN_POS + 10 }
|
||||
#define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
|
||||
#define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m)
|
||||
#endif
|
||||
#endif
|
||||
@@ -1713,36 +1676,25 @@
|
||||
#define ADVANCED_PAUSE_FEATURE
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
|
||||
// This short retract is done immediately, before parking the nozzle.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#if ENABLED(DirectDrive)
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 125
|
||||
#else
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 430 // (mm) The length of filament for a complete unload.
|
||||
#endif
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
// Set to 0 for manual unloading.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
|
||||
#if ENABLED(DirectDrive)
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 100
|
||||
#elif(ENABLED(MachineCRX))
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 450 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
#else
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 430 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
#endif
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
||||
#define ADVANCED_PAUSE_PURGE_LENGTH 20 // (mm) Length to extrude after loading.
|
||||
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
|
||||
// Set to 0 for manual extrusion.
|
||||
// Filament can be extruded repeatedly from the Filament Change menu
|
||||
// until extrusion is consistent, and to purge old filament.
|
||||
@@ -1750,19 +1702,19 @@
|
||||
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
||||
|
||||
// Filament Unload does a Retract, Delay, and Purge first:
|
||||
#define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length.
|
||||
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
|
||||
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 0 // (mm) An unretract is done, then this length is purged.
|
||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
||||
|
||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
||||
#define FILAMENT_CHANGE_ALERT_BEEPS 2 // Number of alert beeps to play when a response is needed.
|
||||
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
||||
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
|
||||
|
||||
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
|
||||
#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
|
||||
#if NONE(MachineCR10Orig, MachineEnder4, EXTENSIBLE_UI)
|
||||
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
|
||||
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||
#endif
|
||||
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
|
||||
#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
|
||||
|
||||
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
|
||||
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||
#endif
|
||||
|
||||
// @section tmc
|
||||
@@ -2054,7 +2006,7 @@
|
||||
* Define you own with
|
||||
* { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] }
|
||||
*/
|
||||
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
|
||||
#define CHOPPER_TIMING CHOPPER_DEFAULT_24V
|
||||
|
||||
/**
|
||||
* Monitor Trinamic drivers for error conditions,
|
||||
@@ -2486,15 +2438,13 @@
|
||||
/**
|
||||
* Auto-report temperatures with M155 S<seconds>
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define AUTO_REPORT_TEMPERATURES
|
||||
#endif
|
||||
#define AUTO_REPORT_TEMPERATURES
|
||||
|
||||
/**
|
||||
* Include capabilities in M115 output
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define EXTENDED_CAPABILITIES_REPORT
|
||||
#endif
|
||||
#define EXTENDED_CAPABILITIES_REPORT
|
||||
|
||||
/**
|
||||
* Expected Printer Check
|
||||
* Add the M16 G-code to compare a string to the MACHINE_NAME.
|
||||
@@ -2539,9 +2489,7 @@
|
||||
/**
|
||||
* Spend 28 bytes of SRAM to optimize the GCode parser
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define FASTER_GCODE_PARSER
|
||||
#endif
|
||||
#define FASTER_GCODE_PARSER
|
||||
|
||||
/**
|
||||
* CNC G-code options
|
||||
@@ -2580,36 +2528,34 @@
|
||||
/**
|
||||
* User-defined menu items that execute custom GCode
|
||||
*/
|
||||
#if ANY(ABL_UBL, ABL_BI) && NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define CUSTOM_USER_MENUS
|
||||
#endif
|
||||
|
||||
#define CUSTOM_USER_MENUS
|
||||
#if ENABLED(CUSTOM_USER_MENUS)
|
||||
//#define USER_SCRIPT_DONE "M117 User Script Done"
|
||||
#define USER_SCRIPT_AUDIBLE_FEEDBACK
|
||||
#define USER_SCRIPT_RETURN // Return to status screen after a script
|
||||
#define CUSTOM_USER_MENU_TITLE "Leveling Tools"
|
||||
|
||||
#if ENABLED(BedDC)
|
||||
#define CommBedTmp "55"
|
||||
#else
|
||||
#define CommBedTmp "75"
|
||||
#endif
|
||||
#define CommBedTmp "65"
|
||||
#if ENABLED(DUAL_Z)
|
||||
#define ALIGN_CMD "G34I20\n"
|
||||
#else
|
||||
#define ALIGN_CMD ""
|
||||
#endif
|
||||
#define USER_DESC_1 "Setup"
|
||||
#if (ENABLED(ABL_UBL))
|
||||
#define USER_GCODE_1 "M190S" CommBedTmp "\nG28\nG29P1\nG29P3\nG29S1\nG29S0\nG29F0.0\nG29A\nM104S215\nG28\nM109S215\nG1X150Y150F5000\nG1Z0\nM500\nM400\nM117 Set Z Offset"
|
||||
#elif ENABLED(ABL_BI)
|
||||
#define USER_GCODE_1 "M190S" CommBedTmp "\nG28\nG29\nM400\nM104S215\nG28\nM109S215\nM420S1\nG1X100Y100F5000\nG1Z0\nM500\nM117 Set Z Offset"
|
||||
#if (ENABLED(UBL))
|
||||
#define USER_GCODE_1 "M190S" CommBedTmp"\nG28\n" ALIGN_CMD "G29P1\nG29S1\nG29S0\n G29F0.0\nG29A\nG28\nM109S225\nG1X150Y150\nG1Z0\nM500\nM400\nM77\nM117 Set Z Offset"
|
||||
#else
|
||||
#define USER_GCODE_1 "M190S" CommBedTmp"\n M117 Probing....\nM104S225\nG28\n" ALIGN_CMD "G29\nM400\nG28\nM420S1\nM109S225\nG1X100Y100\nG1Z0\nM500\nM400\nM77\nM117 Set Z Offset"
|
||||
#endif
|
||||
|
||||
#define USER_DESC_2 "PID Tune"
|
||||
#define USER_GCODE_2 "M106S128\nM303C8S215E0U\nM500\nM117 PID Tune Done"
|
||||
#define USER_DESC_2 "PID Tune"
|
||||
#define USER_GCODE_2 "M106 S128 \n M303 C8 S225 E0 U \n M500 \n M117 PID Tune Done"
|
||||
|
||||
#define USER_DESC_3 "Prep for Z Adjust"
|
||||
#define USER_GCODE_3 "M190S" CommBedTmp "\nM104S215\nG28\nG29L1\nG1 X100Y100F5000\nG1Z0"
|
||||
#define USER_DESC_3 "Prep for Z Adjust"
|
||||
#define USER_GCODE_3 "M190 S" CommBedTmp" \n M104 S235 \n G28 \n G29 L1 \n G1 X100 Y 100 \n G1 Z0"
|
||||
|
||||
#define USER_DESC_4 "Store Settings"
|
||||
#define USER_GCODE_4 "M500\nM117 Settings Stored"
|
||||
#define USER_DESC_4 "Store Settings"
|
||||
#define USER_GCODE_4 "M500\nM117 Settings Stored"
|
||||
|
||||
//#define USER_DESC_5 "Run Mesh Validation"
|
||||
//#define USER_GCODE_5 "G26"
|
||||
@@ -2631,9 +2577,7 @@
|
||||
*/
|
||||
#define HOST_ACTION_COMMANDS
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
#if DISABLED(MachineCR10Orig)
|
||||
#define HOST_PROMPT_SUPPORT
|
||||
#endif
|
||||
#define HOST_PROMPT_SUPPORT
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2861,8 +2805,7 @@
|
||||
/**
|
||||
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
|
||||
*/
|
||||
#if NONE(MachineCR10Orig, LowMemoryBoard)
|
||||
#define PINS_DEBUGGING
|
||||
#endif
|
||||
//#define PINS_DEBUGGING
|
||||
|
||||
// Enable Marlin dev mode which adds some special commands
|
||||
//#define MARLIN_DEV_MODE
|
||||
|
||||
+25
-19
@@ -251,6 +251,10 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
||||
# Overlord/Overlord Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
||||
# ADIMLab Gantry v1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
||||
# ADIMLab Gantry v2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
||||
|
||||
#
|
||||
# RAMBo and derivatives
|
||||
@@ -277,42 +281,44 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
||||
# Cartesio CN Controls V12
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
|
||||
# Cheaptronic v1.0
|
||||
# Cartesio CN Controls V15
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
|
||||
# Cheaptronic v2.0
|
||||
# Cheaptronic v1.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
|
||||
# Makerbot Mightyboard Revision E
|
||||
# Cheaptronic v2.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
|
||||
# Megatronics
|
||||
# Makerbot Mightyboard Revision E
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
|
||||
# Megatronics v2.0
|
||||
# Megatronics
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
|
||||
# Megatronics v3.0
|
||||
# Megatronics v2.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
|
||||
# Megatronics v3.1
|
||||
# Megatronics v3.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
|
||||
# Megatronics v3.2
|
||||
# Megatronics v3.1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
|
||||
# Elefu Ra Board (v3)
|
||||
# Megatronics v3.2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
||||
# Leapfrog
|
||||
# Elefu Ra Board (v3)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
|
||||
# Mega controller
|
||||
# Leapfrog
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
|
||||
# Geeetech GT2560 Rev B for Mecreator2
|
||||
# Mega controller
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
|
||||
# Geeetech GT2560 Rev. A
|
||||
# Geeetech GT2560 Rev B for Mecreator2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
|
||||
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
||||
# Geeetech GT2560 Rev. A
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
||||
# Geeetech GT2560 Rev B for A10(M/D)
|
||||
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
||||
# Geeetech GT2560 Rev B for A20(M/D)
|
||||
# Geeetech GT2560 Rev B for A10(M/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
||||
# Einstart retrofit
|
||||
# Geeetech GT2560 Rev B for A20(M/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||
# Wanhao 0ne+ i3 Mini
|
||||
# Einstart retrofit
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
||||
# Wanhao 0ne+ i3 Mini
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
||||
|
||||
#
|
||||
# ATmega1281, ATmega2561
|
||||
@@ -687,7 +693,7 @@ CXXSTANDARD = -std=gnu++11
|
||||
CDEBUG = -g$(DEBUG)
|
||||
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||
CTUNING = -fsigned-char -funsigned-bitfields -fpack-struct -fno-exceptions \
|
||||
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
|
||||
-fshort-enums -ffunction-sections -fdata-sections
|
||||
ifneq ($(HARDWARE_MOTHERBOARD),)
|
||||
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
////////////////////////////
|
||||
// VENDOR VERSION EXAMPLE //
|
||||
////////////////////////////
|
||||
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
#define SHORT_BUILD_VERSION "2.0.x_SX4I"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
* from where the binary was downloaded or the source code was compiled.
|
||||
*/
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D"
|
||||
|
||||
/**
|
||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define STRING_DISTRIBUTION_DATE "2019-10-19"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
#define MACHINE_NAME "TM3D SX4"
|
||||
|
||||
/**
|
||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||
* Code which is installed on the device. In most cases —unless the manufacturer
|
||||
* has a distinct Github fork— the Source Code URL should just be the main
|
||||
* Marlin repository.
|
||||
*/
|
||||
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/TM_SX4_2.0"
|
||||
|
||||
/**
|
||||
* Default generic printer UUID.
|
||||
*/
|
||||
//#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
|
||||
|
||||
/**
|
||||
* The WEBSITE_URL is the location where users can get more information such as
|
||||
* documentation about a specific Marlin release.
|
||||
*/
|
||||
#define WEBSITE_URL "tinymachines3d.com"
|
||||
|
||||
/**
|
||||
* Set the vendor info the serial USB interface, if changable
|
||||
* Currently only supported by DUE platform
|
||||
*/
|
||||
//#define USB_DEVICE_VENDOR_ID 0x0000
|
||||
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
||||
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
||||
@@ -29,7 +29,6 @@
|
||||
* - http://www.marlinfw.org/tools/u8glib/converter.html
|
||||
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||
*/
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_PWM
|
||||
|
||||
#include "HAL.h"
|
||||
|
||||
@@ -278,5 +278,5 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
|
||||
}
|
||||
}
|
||||
|
||||
#endif // FAST_PWM_FAN
|
||||
#endif // FAST_PWM_FAN || SPINDLE_LASER_PWM
|
||||
#endif // __AVR__
|
||||
|
||||
@@ -38,22 +38,39 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Serial ports
|
||||
#if !WITHIN(SERIAL_PORT, -1, 3)
|
||||
#error "SERIAL_PORT must be from -1 to 3"
|
||||
// Define MYSERIAL0/1 before MarlinSerial includes!
|
||||
#if SERIAL_PORT == -1
|
||||
#define MYSERIAL0 Serial1
|
||||
#elif SERIAL_PORT == 0
|
||||
#define MYSERIAL0 Serial
|
||||
#elif SERIAL_PORT == 1
|
||||
#define MYSERIAL0 Serial1
|
||||
#elif SERIAL_PORT == 2
|
||||
#define MYSERIAL0 Serial2
|
||||
#elif SERIAL_PORT == 3
|
||||
#define MYSERIAL0 Serial3
|
||||
#else
|
||||
#error "The required SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||
#endif
|
||||
|
||||
// MYSERIAL0 required before MarlinSerial includes!
|
||||
#define MYSERIAL0 customizedSerial1
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
||||
#error "SERIAL_PORT_2 must be from -1 to 3"
|
||||
#elif SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 must be different than SERIAL_PORT"
|
||||
#if SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
|
||||
#endif
|
||||
#if SERIAL_PORT_2 == -1
|
||||
#define MYSERIAL1 Serial1
|
||||
#elif SERIAL_PORT_2 == 0
|
||||
#define MYSERIAL1 Serial
|
||||
#elif SERIAL_PORT_2 == 1
|
||||
#define MYSERIAL1 Serial1
|
||||
#elif SERIAL_PORT_2 == 2
|
||||
#define MYSERIAL1 Serial2
|
||||
#elif SERIAL_PORT_2 == 3
|
||||
#define MYSERIAL1 Serial3
|
||||
#else
|
||||
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
||||
#endif
|
||||
#define NUM_SERIAL 2
|
||||
#define MYSERIAL1 customizedSerial2
|
||||
#else
|
||||
#define NUM_SERIAL 1
|
||||
#endif
|
||||
|
||||
@@ -48,9 +48,7 @@
|
||||
#define _CONF_USB_H_
|
||||
|
||||
#undef UNUSED /* To avoid a macro clash as macros.h already defines it */
|
||||
#include "../../../core/macros.h" /* For ENABLED()/DISABLED() */
|
||||
#include "../../../core/boards.h" /* For MB() */
|
||||
#include "../../../../Configuration.h" /* For CUSTOM_MACHINE_NAME definition - We just need the name, no C++ allowed! */
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
#include "compiler.h"
|
||||
|
||||
/**
|
||||
@@ -59,8 +57,6 @@
|
||||
*/
|
||||
|
||||
//! Device definition (mandatory)
|
||||
#define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */
|
||||
#define USB_DEVICE_PRODUCT_ID 0x2424 /* MSC / CDC */
|
||||
#define USB_DEVICE_MAJOR_VERSION 1
|
||||
#define USB_DEVICE_MINOR_VERSION 0
|
||||
#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
|
||||
@@ -70,15 +66,6 @@
|
||||
// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
|
||||
// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
|
||||
|
||||
//! USB Device string definitions (Optional)
|
||||
#define USB_DEVICE_MANUFACTURE_NAME "marlinfw.org"
|
||||
#ifdef CUSTOM_MACHINE_NAME
|
||||
#define USB_DEVICE_PRODUCT_NAME CUSTOM_MACHINE_NAME
|
||||
#else
|
||||
#define USB_DEVICE_PRODUCT_NAME "3D Printer"
|
||||
#endif
|
||||
#define USB_DEVICE_SERIAL_NAME "123985739853"
|
||||
|
||||
/**
|
||||
* Device speeds support
|
||||
* Low speed not supported by CDC and MSC
|
||||
|
||||
@@ -187,19 +187,21 @@ void HAL_adc_start_conversion(uint8_t adc_pin) {
|
||||
const adc1_channel_t chan = get_channel(adc_pin);
|
||||
uint32_t mv;
|
||||
esp_adc_cal_get_voltage((adc_channel_t)chan, &characteristics[attenuations[chan]], &mv);
|
||||
HAL_adc_result = mv * 1023.0 / 3300.0;
|
||||
|
||||
// Change the attenuation level based on the new reading
|
||||
adc_atten_t atten;
|
||||
if (mv < thresholds[ADC_ATTEN_DB_0] - 100)
|
||||
adc1_set_attenuation(chan, ADC_ATTEN_DB_0);
|
||||
atten = ADC_ATTEN_DB_0;
|
||||
else if (mv > thresholds[ADC_ATTEN_DB_0] - 50 && mv < thresholds[ADC_ATTEN_DB_2_5] - 100)
|
||||
adc1_set_attenuation(chan, ADC_ATTEN_DB_2_5);
|
||||
atten = ADC_ATTEN_DB_2_5;
|
||||
else if (mv > thresholds[ADC_ATTEN_DB_2_5] - 50 && mv < thresholds[ADC_ATTEN_DB_6] - 100)
|
||||
adc1_set_attenuation(chan, ADC_ATTEN_DB_6);
|
||||
atten = ADC_ATTEN_DB_6;
|
||||
else if (mv > thresholds[ADC_ATTEN_DB_6] - 50)
|
||||
adc1_set_attenuation(chan, ADC_ATTEN_DB_11);
|
||||
atten = ADC_ATTEN_DB_11;
|
||||
else return;
|
||||
|
||||
HAL_adc_result = mv * 1023.0 / 3300.0;
|
||||
adc1_set_attenuation(chan, atten);
|
||||
}
|
||||
|
||||
void analogWrite(pin_t pin, int value) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_PWM
|
||||
|
||||
#include <pwm.h>
|
||||
|
||||
@@ -36,5 +36,5 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
|
||||
pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size);
|
||||
}
|
||||
|
||||
#endif // FAST_PWM_FAN
|
||||
#endif // FAST_PWM_FAN || SPINDLE_LASER_PWM
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
@@ -31,7 +31,7 @@ try:
|
||||
#
|
||||
import subprocess
|
||||
# typical result (string): 'Drives: C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\'
|
||||
driveStr = subprocess.check_output("fsutil fsinfo drives")
|
||||
driveStr = subprocess.check_output("fsutil fsinfo drives").decode('utf8')
|
||||
# typical result (string): 'C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\'
|
||||
driveStr = driveStr.strip().lstrip('Drives: ')
|
||||
# typical result (array of stings): ['C:\\', 'D:\\', 'E:\\', 'F:\\',
|
||||
@@ -44,7 +44,7 @@ try:
|
||||
for drive in drives:
|
||||
final_drive_name = drive.strip().rstrip('\\') # typical result (string): 'C:'
|
||||
try:
|
||||
volume_info = subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT)
|
||||
volume_info = subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT).decode('utf8')
|
||||
except Exception as e:
|
||||
continue
|
||||
else:
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#ifdef __STM32F1__
|
||||
|
||||
#include "HAL.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "HAL.h"
|
||||
|
||||
#include <STM32ADC.h>
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
#ifdef __STM32F1__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "HAL.h"
|
||||
|
||||
#include "timers.h"
|
||||
|
||||
// ------------------------
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libmaple/timer.h>
|
||||
#include "../../core/boards.h"
|
||||
|
||||
// ------------------------
|
||||
// Defines
|
||||
@@ -54,7 +55,13 @@ typedef uint16_t hal_timer_t;
|
||||
#define TEMP_TIMER_NUM 2 // index of timer to use for temperature
|
||||
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
|
||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
|
||||
|
||||
#if MB(BIGTREE_SKR_MINI_E3, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
|
||||
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
|
||||
#define SERVO0_TIMER_NUM 8
|
||||
#else
|
||||
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
|
||||
#endif
|
||||
|
||||
#define STEP_TIMER_IRQ_PRIO 1
|
||||
#define TEMP_TIMER_IRQ_PRIO 2
|
||||
|
||||
+12
-26
@@ -217,7 +217,7 @@ void setup_killpin() {
|
||||
|
||||
void setup_powerhold() {
|
||||
#if HAS_SUICIDE
|
||||
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
||||
OUT_WRITE(SUICIDE_PIN, HIGH);
|
||||
#endif
|
||||
#if HAS_POWER_SWITCH
|
||||
#if ENABLED(PS_DEFAULT_OFF)
|
||||
@@ -275,6 +275,10 @@ void quickstop_stepper() {
|
||||
sync_plan_position();
|
||||
}
|
||||
|
||||
void enable_e_steppers() {
|
||||
enable_E0(); enable_E1(); enable_E2(); enable_E3(); enable_E4(); enable_E5();
|
||||
}
|
||||
|
||||
void enable_all_steppers() {
|
||||
#if ENABLED(AUTO_POWER_CONTROL)
|
||||
powerManager.power_on();
|
||||
@@ -282,30 +286,11 @@ void enable_all_steppers() {
|
||||
enable_X();
|
||||
enable_Y();
|
||||
enable_Z();
|
||||
enable_E0();
|
||||
enable_E1();
|
||||
enable_E2();
|
||||
enable_E3();
|
||||
enable_E4();
|
||||
enable_E5();
|
||||
}
|
||||
|
||||
void enable_e_steppers() {
|
||||
enable_E0();
|
||||
enable_E1();
|
||||
enable_E2();
|
||||
enable_E3();
|
||||
enable_E4();
|
||||
enable_E5();
|
||||
enable_e_steppers();
|
||||
}
|
||||
|
||||
void disable_e_steppers() {
|
||||
disable_E0();
|
||||
disable_E1();
|
||||
disable_E2();
|
||||
disable_E3();
|
||||
disable_E4();
|
||||
disable_E5();
|
||||
disable_E0(); disable_E1(); disable_E2(); disable_E3(); disable_E4(); disable_E5();
|
||||
}
|
||||
|
||||
void disable_e_stepper(const uint8_t e) {
|
||||
@@ -339,7 +324,7 @@ void disable_all_steppers() {
|
||||
#ifdef ACTION_ON_CANCEL
|
||||
host_action_cancel();
|
||||
#endif
|
||||
kill(PSTR(MSG_ERR_PROBING_FAILED));
|
||||
kill(GET_TEXT(MSG_LCD_PROBING_FAILED));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -701,15 +686,16 @@ void idle(
|
||||
* Kill all activity and lock the machine.
|
||||
* After this the machine will need to be reset.
|
||||
*/
|
||||
void kill(PGM_P const lcd_msg/*=nullptr*/, const bool steppers_off/*=false*/) {
|
||||
void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr*/, const bool steppers_off/*=false*/) {
|
||||
thermalManager.disable_all_heaters();
|
||||
|
||||
SERIAL_ERROR_MSG(MSG_ERR_KILLED);
|
||||
|
||||
#if HAS_DISPLAY
|
||||
ui.kill_screen(lcd_msg ?: PSTR(MSG_KILLED));
|
||||
ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component);
|
||||
#else
|
||||
UNUSED(lcd_msg);
|
||||
UNUSED(lcd_error);
|
||||
UNUSED(lcd_component);
|
||||
#endif
|
||||
|
||||
#ifdef ACTION_ON_KILL
|
||||
|
||||
+2
-2
@@ -322,7 +322,7 @@ void disable_e_stepper(const uint8_t e);
|
||||
void disable_e_steppers();
|
||||
void disable_all_steppers();
|
||||
|
||||
void kill(PGM_P const lcd_msg=nullptr, const bool steppers_off=false);
|
||||
void kill(PGM_P const lcd_error=nullptr, PGM_P const lcd_component=nullptr, const bool steppers_off=false);
|
||||
void minkill(const bool steppers_off=false);
|
||||
|
||||
void quickstop_stepper();
|
||||
@@ -368,7 +368,7 @@ bool pin_is_protected(const pin_t pin);
|
||||
void protected_pin_err();
|
||||
|
||||
#if HAS_SUICIDE
|
||||
inline void suicide() { OUT_WRITE(SUICIDE_PIN, SUICIDE_PIN_INVERTING); }
|
||||
inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(G29_RETRY_AND_RECOVER)
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
#define BOARD_UNKNOWN -1
|
||||
|
||||
//
|
||||
@@ -268,11 +270,12 @@
|
||||
#define BOARD_BIGTREE_SKR_MINI_V1_1 4010 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
|
||||
#define BOARD_BIGTREE_SKR_MINI_E3 4011 // BigTreeTech SKR Mini E3 (STM32F103RC)
|
||||
#define BOARD_BIGTREE_SKR_E3_DIP 4012 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC)
|
||||
#define BOARD_JGAURORA_A5S_A1 4013 // JGAurora A5S A1 (STM32F103ZET6)
|
||||
#define BOARD_FYSETC_AIO_II 4014 // FYSETC AIO_II
|
||||
#define BOARD_FYSETC_CHEETAH 4015 // FYSETC Cheetah
|
||||
#define BOARD_FYSETC_CHEETAH_V12 4016 // FYSETC Cheetah V1.2
|
||||
#define BOARD_LONGER3D_LK 4017 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_2 4013 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
||||
#define BOARD_JGAURORA_A5S_A1 4014 // JGAurora A5S A1 (STM32F103ZET6)
|
||||
#define BOARD_FYSETC_AIO_II 4015 // FYSETC AIO_II
|
||||
#define BOARD_FYSETC_CHEETAH 4016 // FYSETC Cheetah
|
||||
#define BOARD_FYSETC_CHEETAH_V12 4017 // FYSETC Cheetah V1.2
|
||||
#define BOARD_LONGER3D_LK 4018 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
|
||||
|
||||
//
|
||||
// ARM Cortex-M4F
|
||||
@@ -307,7 +310,7 @@
|
||||
//
|
||||
// Espressif ESP32 WiFi
|
||||
//
|
||||
#define BOARD_ESP32 6000
|
||||
#define BOARD_ESPRESSIF_ESP32 6000
|
||||
|
||||
//
|
||||
// Simulations
|
||||
@@ -315,4 +318,7 @@
|
||||
|
||||
#define BOARD_LINUX_RAMPS 9999
|
||||
|
||||
#define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)
|
||||
#define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
|
||||
#define MB(V...) DO(MB,||,V)
|
||||
|
||||
#define IS_MELZI MB(MELZI, MELZI_CREALITY, MELZI_MAKR3D, MELZI_MALYAN, MELZI_TRONXY)
|
||||
|
||||
+66
-63
@@ -49,7 +49,7 @@
|
||||
// da Danish
|
||||
// de German
|
||||
// el Greek
|
||||
// el-gr Greek (Greece)
|
||||
// el_gr Greek (Greece)
|
||||
// en English
|
||||
// es Spanish
|
||||
// eu Basque-Euskera
|
||||
@@ -58,12 +58,12 @@
|
||||
// gl Galician
|
||||
// hr Croatian
|
||||
// it Italian
|
||||
// jp-kana Japanese
|
||||
// jp_kana Japanese
|
||||
// ko_KR Korean (South Korea)
|
||||
// nl Dutch
|
||||
// pl Polish
|
||||
// pt Portuguese
|
||||
// pt-br Portuguese (Brazilian)
|
||||
// pt_br Portuguese (Brazilian)
|
||||
// ru Russian
|
||||
// sk Slovak
|
||||
// tr Turkish
|
||||
@@ -97,7 +97,20 @@
|
||||
// #define STRING_SPLASH_LINE3 WEBSITE_URL
|
||||
//#endif
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_CHARACTER_LCD
|
||||
|
||||
// Custom characters defined in the first 8 characters of the LCD
|
||||
#define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!
|
||||
#define LCD_STR_DEGREE "\x01"
|
||||
#define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
|
||||
#define LCD_STR_UPLEVEL "\x03"
|
||||
#define LCD_STR_REFRESH "\x04"
|
||||
#define LCD_STR_FOLDER "\x05"
|
||||
#define LCD_STR_FEEDRATE "\x06"
|
||||
#define LCD_STR_CLOCK "\x07"
|
||||
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
|
||||
|
||||
#else
|
||||
//
|
||||
// Custom characters from Marlin_symbols.fon which was merged into ISO10646-0-3.bdf
|
||||
// \x00 intentionally skipped to avoid problems in strings
|
||||
@@ -120,19 +133,6 @@
|
||||
#define LCD_STR_FILAM_DIA "\xF8"
|
||||
#define LCD_STR_FILAM_MUL "\xA4"
|
||||
|
||||
#elif HAS_CHARACTER_LCD
|
||||
|
||||
// Custom characters defined in the first 8 characters of the LCD
|
||||
#define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!
|
||||
#define LCD_STR_DEGREE "\x01"
|
||||
#define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
|
||||
#define LCD_STR_UPLEVEL "\x03"
|
||||
#define LCD_STR_REFRESH "\x04"
|
||||
#define LCD_STR_FOLDER "\x05"
|
||||
#define LCD_STR_FEEDRATE "\x06"
|
||||
#define LCD_STR_CLOCK "\x07"
|
||||
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
|
||||
|
||||
#endif
|
||||
|
||||
// Common LCD messages
|
||||
@@ -168,7 +168,6 @@
|
||||
#define MSG_INVALID_E_STEPPER "Invalid E stepper"
|
||||
#define MSG_E_STEPPER_NOT_SPECIFIED "E stepper not specified"
|
||||
#define MSG_INVALID_SOLENOID "Invalid solenoid"
|
||||
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
|
||||
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
|
||||
#define MSG_COUNT_X " Count X:"
|
||||
#define MSG_COUNT_A " Count A:"
|
||||
@@ -243,10 +242,9 @@
|
||||
#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
|
||||
#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
|
||||
#define MSG_ERR_HOTEND_TOO_COLD "Hotend too cold"
|
||||
#define MSG_ERR_Z_HOMING_SER "Home XY first"
|
||||
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"
|
||||
|
||||
#define MSG_FILAMENT_CHANGE_HEAT "Press button (or M108) to heat nozzle"
|
||||
#define MSG_FILAMENT_CHANGE_INSERT "Insert filament and press button (or M108)"
|
||||
#define MSG_FILAMENT_CHANGE_WAIT "Press button (or M108) to resume"
|
||||
#define MSG_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle"
|
||||
#define MSG_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button"
|
||||
#define MSG_FILAMENT_CHANGE_WAIT_LCD "Press button to resume"
|
||||
@@ -254,8 +252,6 @@
|
||||
#define MSG_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108"
|
||||
#define MSG_FILAMENT_CHANGE_WAIT_M108 "Send M108 to resume"
|
||||
|
||||
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"
|
||||
|
||||
#define MSG_STOP_BLTOUCH "STOP called because of BLTouch error - restart with M999"
|
||||
#define MSG_STOP_UNHOMED "STOP called because of unhomed error - restart with M999"
|
||||
#define MSG_KILL_INACTIVE_TIME "KILL caused by too much inactive time - current command: "
|
||||
@@ -298,6 +294,8 @@
|
||||
#define MSG_T_THERMAL_RUNAWAY "Thermal Runaway"
|
||||
#define MSG_T_MAXTEMP "MAXTEMP triggered"
|
||||
#define MSG_T_MINTEMP "MINTEMP triggered"
|
||||
#define MSG_ERR_PROBING_FAILED "Probing Failed"
|
||||
#define MSG_ZPROBE_OUT_SER "Z Probe Past Bed"
|
||||
|
||||
// Debug
|
||||
#define MSG_DEBUG_PREFIX "DEBUG:"
|
||||
@@ -313,11 +311,9 @@
|
||||
|
||||
#define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h)
|
||||
#define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M)
|
||||
#define INCLUDE_LANGUAGE_DATA LANGUAGE_DATA_INCL(LCD_LANGUAGE)
|
||||
|
||||
#define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h)
|
||||
#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M)
|
||||
#define INCLUDE_LANGUAGE LANGUAGE_INCL(LCD_LANGUAGE)
|
||||
|
||||
// Never translate these strings
|
||||
#define MSG_X "X"
|
||||
@@ -337,38 +333,52 @@
|
||||
#define MSG_Y2 "Y2"
|
||||
#define MSG_Z2 "Z2"
|
||||
#define MSG_Z3 "Z3"
|
||||
#define MSG_H1 "1"
|
||||
#define MSG_H2 "2"
|
||||
#define MSG_H3 "3"
|
||||
#define MSG_H4 "4"
|
||||
#define MSG_H5 "5"
|
||||
#define MSG_H6 "6"
|
||||
#define MSG_LCD_N0 " 1"
|
||||
#define MSG_LCD_N1 " 2"
|
||||
#define MSG_LCD_N2 " 3"
|
||||
#define MSG_LCD_N3 " 4"
|
||||
#define MSG_LCD_N4 " 5"
|
||||
#define MSG_LCD_N5 " 6"
|
||||
#define MSG_E1 "E1"
|
||||
#define MSG_E2 "E2"
|
||||
#define MSG_E3 "E3"
|
||||
#define MSG_E4 "E4"
|
||||
#define MSG_E5 "E5"
|
||||
#define MSG_E6 "E6"
|
||||
#define MSG_MOVE_E1 "1"
|
||||
#define MSG_MOVE_E2 "2"
|
||||
#define MSG_MOVE_E3 "3"
|
||||
#define MSG_MOVE_E4 "4"
|
||||
#define MSG_MOVE_E5 "5"
|
||||
#define MSG_MOVE_E6 "6"
|
||||
#define MSG_DIAM_E1 " 1"
|
||||
#define MSG_DIAM_E2 " 2"
|
||||
#define MSG_DIAM_E3 " 3"
|
||||
#define MSG_DIAM_E4 " 4"
|
||||
#define MSG_DIAM_E5 " 5"
|
||||
#define MSG_DIAM_E6 " 6"
|
||||
|
||||
#include INCLUDE_LANGUAGE
|
||||
#define LCD_STR_A MSG_A
|
||||
#define LCD_STR_B MSG_B
|
||||
#define LCD_STR_C MSG_C
|
||||
#define LCD_STR_E MSG_E
|
||||
|
||||
/**
|
||||
* Tool indexes for LCD display only
|
||||
*
|
||||
* By convention the LCD shows "E1" for the first extruder.
|
||||
* However, internal to Marlin E0/T0 is the first tool, and
|
||||
* most board silkscreens say "E0." Zero-based labels will
|
||||
* make these indexes consistent but this defies expectation.
|
||||
*
|
||||
*/
|
||||
#if ENABLED(NUMBER_TOOLS_FROM_0)
|
||||
#define LCD_STR_N0 "0"
|
||||
#define LCD_STR_N1 "1"
|
||||
#define LCD_STR_N2 "2"
|
||||
#define LCD_STR_N3 "3"
|
||||
#define LCD_STR_N4 "4"
|
||||
#define LCD_STR_N5 "5"
|
||||
#else
|
||||
#define LCD_STR_N0 "1"
|
||||
#define LCD_STR_N1 "2"
|
||||
#define LCD_STR_N2 "3"
|
||||
#define LCD_STR_N3 "4"
|
||||
#define LCD_STR_N4 "5"
|
||||
#define LCD_STR_N5 "6"
|
||||
#endif
|
||||
|
||||
#define LCD_STR_E0 "E" LCD_STR_N0
|
||||
#define LCD_STR_E1 "E" LCD_STR_N1
|
||||
#define LCD_STR_E2 "E" LCD_STR_N2
|
||||
#define LCD_STR_E3 "E" LCD_STR_N3
|
||||
#define LCD_STR_E4 "E" LCD_STR_N4
|
||||
#define LCD_STR_E5 "E" LCD_STR_N5
|
||||
|
||||
#include "multi_language.h" // Allow multiple languages
|
||||
|
||||
#include "../lcd/language/language_en.h"
|
||||
#include LANGUAGE_INCL(LCD_LANGUAGE)
|
||||
#include LANGUAGE_INCL(LCD_LANGUAGE_2)
|
||||
#include LANGUAGE_INCL(LCD_LANGUAGE_3)
|
||||
#include LANGUAGE_INCL(LCD_LANGUAGE_4)
|
||||
#include LANGUAGE_INCL(LCD_LANGUAGE_5)
|
||||
|
||||
#if NONE(DISPLAY_CHARSET_ISO10646_1, \
|
||||
DISPLAY_CHARSET_ISO10646_5, \
|
||||
@@ -381,10 +391,3 @@
|
||||
DISPLAY_CHARSET_ISO10646_SK)
|
||||
#define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
|
||||
#endif
|
||||
|
||||
#include "../lcd/language/language_en.h"
|
||||
|
||||
#ifdef CUSTOM_USER_MENU_TITLE
|
||||
#undef MSG_USER_MENU
|
||||
#define MSG_USER_MENU CUSTOM_USER_MENU_TITLE
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define NUM_AXIS 4
|
||||
#define ABCE 4
|
||||
#define XYZE 4
|
||||
#define ABC 3
|
||||
@@ -227,6 +226,9 @@
|
||||
#define LIST_N(N,V...) _LIST_N(N,V)
|
||||
#define ARRAY_N(N,V...) { _LIST_N(N,V) }
|
||||
|
||||
#define _JOIN_1(O) (O)
|
||||
#define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V)))
|
||||
|
||||
// Macros for adding
|
||||
#define INC_0 1
|
||||
#define INC_1 2
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/********************
|
||||
* multi_language.h *
|
||||
********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2019 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
typedef const char Language_Str[];
|
||||
|
||||
#if defined(LCD_LANGUAGE_5)
|
||||
#define NUM_LANGUAGES 5
|
||||
#elif defined(LCD_LANGUAGE_4)
|
||||
#define NUM_LANGUAGES 4
|
||||
#elif defined(LCD_LANGUAGE_3)
|
||||
#define NUM_LANGUAGES 3
|
||||
#elif defined(LCD_LANGUAGE_2)
|
||||
#define NUM_LANGUAGES 2
|
||||
#else
|
||||
#define NUM_LANGUAGES 1
|
||||
#endif
|
||||
|
||||
// Setting the unused languages equal to each other allows
|
||||
// the compiler to optimize away the conditionals
|
||||
|
||||
#ifndef LCD_LANGUAGE_2
|
||||
#define LCD_LANGUAGE_2 LCD_LANGUAGE
|
||||
#endif
|
||||
|
||||
#ifndef LCD_LANGUAGE_3
|
||||
#define LCD_LANGUAGE_3 LCD_LANGUAGE_2
|
||||
#endif
|
||||
|
||||
#ifndef LCD_LANGUAGE_4
|
||||
#define LCD_LANGUAGE_4 LCD_LANGUAGE_3
|
||||
#endif
|
||||
|
||||
#ifndef LCD_LANGUAGE_5
|
||||
#define LCD_LANGUAGE_5 LCD_LANGUAGE_4
|
||||
#endif
|
||||
|
||||
#define _GET_LANG(LANG) Language_##LANG
|
||||
#define GET_LANG(LANG) _GET_LANG(LANG)
|
||||
|
||||
#if NUM_LANGUAGES > 1
|
||||
extern uint8_t lang;
|
||||
#define GET_TEXT(MSG) ( \
|
||||
lang == 0 ? GET_LANG(LCD_LANGUAGE)::MSG : \
|
||||
lang == 1 ? GET_LANG(LCD_LANGUAGE_2)::MSG : \
|
||||
lang == 2 ? GET_LANG(LCD_LANGUAGE_3)::MSG : \
|
||||
lang == 3 ? GET_LANG(LCD_LANGUAGE_4)::MSG : \
|
||||
GET_LANG(LCD_LANGUAGE_5)::MSG \
|
||||
)
|
||||
#define MAX_LANG_CHARSIZE _MAX(GET_LANG(LCD_LANGUAGE)::CHARSIZE, \
|
||||
GET_LANG(LCD_LANGUAGE_2)::CHARSIZE, \
|
||||
GET_LANG(LCD_LANGUAGE_3)::CHARSIZE, \
|
||||
GET_LANG(LCD_LANGUAGE_4)::CHARSIZE, \
|
||||
GET_LANG(LCD_LANGUAGE_5)::CHARSIZE)
|
||||
#else
|
||||
#define GET_TEXT(MSG) GET_LANG(LCD_LANGUAGE)::MSG
|
||||
#define MAX_LANG_CHARSIZE GET_LANG(LCD_LANGUAGE)::CHARSIZE
|
||||
#endif
|
||||
#define GET_TEXT_F(MSG) (const __FlashStringHelper*)GET_TEXT(MSG)
|
||||
|
||||
#define MSG_CONCAT(A,B) pgm_p_pair_t(GET_TEXT(A),GET_TEXT(B))
|
||||
@@ -123,7 +123,7 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const
|
||||
}
|
||||
|
||||
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
|
||||
#if USES_Z_MIN_PROBE_ENDSTOP
|
||||
#if HAS_CUSTOM_PROBE_PIN
|
||||
#define TEST_PROBE_PIN (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING)
|
||||
#else
|
||||
#define TEST_PROBE_PIN (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING)
|
||||
|
||||
@@ -228,14 +228,14 @@ void reset_bed_level() {
|
||||
#ifdef MANUAL_PROBE_START_Z
|
||||
constexpr float startz = _MAX(0, MANUAL_PROBE_START_Z);
|
||||
#if MANUAL_PROBE_HEIGHT > 0
|
||||
do_blocking_move_to(pos.x, pos.y, MANUAL_PROBE_HEIGHT);
|
||||
do_blocking_move_to_xy_z(pos, MANUAL_PROBE_HEIGHT);
|
||||
do_blocking_move_to_z(startz);
|
||||
#else
|
||||
do_blocking_move_to(pos.x, pos.y, startz);
|
||||
do_blocking_move_to_xy_z(pos, startz);
|
||||
#endif
|
||||
#elif MANUAL_PROBE_HEIGHT > 0
|
||||
const float prev_z = current_position.z;
|
||||
do_blocking_move_to(pos.x, pos.y, MANUAL_PROBE_HEIGHT);
|
||||
do_blocking_move_to_xy_z(pos, MANUAL_PROBE_HEIGHT);
|
||||
do_blocking_move_to_z(prev_z);
|
||||
#else
|
||||
do_blocking_move_to_xy(pos);
|
||||
|
||||
@@ -757,7 +757,7 @@
|
||||
const int point_num = (GRID_MAX_POINTS) - count + 1;
|
||||
SERIAL_ECHOLNPAIR("\nProbing mesh point ", point_num, "/", int(GRID_MAX_POINTS), ".\n");
|
||||
#if HAS_DISPLAY
|
||||
ui.status_printf_P(0, PSTR(MSG_PROBING_MESH " %i/%i"), point_num, int(GRID_MAX_POINTS));
|
||||
ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), point_num, int(GRID_MAX_POINTS));
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
@@ -892,7 +892,7 @@
|
||||
ui.capture();
|
||||
|
||||
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
|
||||
do_blocking_move_to(current_position.x, current_position.y, z_clearance);
|
||||
do_blocking_move_to_xy_z(current_position, z_clearance);
|
||||
|
||||
ui.return_to_status();
|
||||
|
||||
@@ -921,7 +921,7 @@
|
||||
|
||||
if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
|
||||
|
||||
serialprintPGM(parser.seen('B') ? PSTR(MSG_UBL_BC_INSERT) : PSTR(MSG_UBL_BC_INSERT2));
|
||||
serialprintPGM(parser.seen('B') ? GET_TEXT(MSG_UBL_BC_INSERT) : GET_TEXT(MSG_UBL_BC_INSERT2));
|
||||
|
||||
const float z_step = 0.01f; // existing behavior: 0.01mm per click, occasionally step
|
||||
//const float z_step = planner.steps_to_mm[Z_AXIS]; // approx one step each click
|
||||
@@ -948,7 +948,7 @@
|
||||
if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
|
||||
|
||||
restore_ubl_active_state_and_leave();
|
||||
do_blocking_move_to(pos, Z_CLEARANCE_DEPLOY_PROBE);
|
||||
do_blocking_move_to_xy_z(pos, Z_CLEARANCE_DEPLOY_PROBE);
|
||||
}
|
||||
|
||||
inline void set_message_with_feedback(PGM_P const msg_P) {
|
||||
@@ -959,7 +959,7 @@
|
||||
void abort_fine_tune() {
|
||||
ui.return_to_status();
|
||||
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
|
||||
set_message_with_feedback(PSTR(MSG_EDITING_STOPPED));
|
||||
set_message_with_feedback(GET_TEXT(MSG_EDITING_STOPPED));
|
||||
}
|
||||
|
||||
void unified_bed_leveling::fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) {
|
||||
@@ -986,7 +986,7 @@
|
||||
LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
|
||||
ui.capture(); // Take over control of the LCD encoder
|
||||
|
||||
do_blocking_move_to(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
|
||||
do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
|
||||
|
||||
#if ENABLED(UBL_MESH_EDIT_MOVES_Z)
|
||||
do_blocking_move_to_z(h_offset); // Move Z to the given 'H' offset
|
||||
@@ -1055,7 +1055,7 @@
|
||||
if (do_ubl_mesh_map) display_map(g29_map_type);
|
||||
restore_ubl_active_state_and_leave();
|
||||
|
||||
do_blocking_move_to(pos, Z_CLEARANCE_BETWEEN_PROBES);
|
||||
do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES);
|
||||
|
||||
LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH);
|
||||
SERIAL_ECHOLNPGM("Done Editing Mesh");
|
||||
@@ -1072,7 +1072,7 @@
|
||||
bool err_flag = false;
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
set_message_with_feedback(PSTR(MSG_UBL_DOING_G29));
|
||||
set_message_with_feedback(GET_TEXT(MSG_UBL_DOING_G29));
|
||||
#endif
|
||||
|
||||
g29_constant = 0;
|
||||
@@ -1196,7 +1196,7 @@
|
||||
if (ubl_state_recursion_chk != 1) {
|
||||
SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row.");
|
||||
#if HAS_LCD_MENU
|
||||
set_message_with_feedback(PSTR(MSG_UBL_SAVE_ERROR));
|
||||
set_message_with_feedback(GET_TEXT(MSG_UBL_SAVE_ERROR));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -1210,7 +1210,7 @@
|
||||
if (--ubl_state_recursion_chk) {
|
||||
SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
|
||||
#if HAS_LCD_MENU
|
||||
set_message_with_feedback(PSTR(MSG_UBL_RESTORE_ERROR));
|
||||
set_message_with_feedback(GET_TEXT(MSG_UBL_RESTORE_ERROR));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -1410,7 +1410,7 @@
|
||||
if (do_3_pt_leveling) {
|
||||
SERIAL_ECHOLNPGM("Tilting mesh (1/3)");
|
||||
#if HAS_DISPLAY
|
||||
ui.status_printf_P(0, PSTR(MSG_LCD_TILTING_MESH " 1/3"));
|
||||
ui.status_printf_P(0, PSTR(S_FMT " 1/3"), GET_TEXT(MSG_LCD_TILTING_MESH));
|
||||
#endif
|
||||
|
||||
measured_z = probe_at_point(points[0], PROBE_PT_RAISE, g29_verbose_level);
|
||||
@@ -1431,7 +1431,7 @@
|
||||
if (!abort_flag) {
|
||||
SERIAL_ECHOLNPGM("Tilting mesh (2/3)");
|
||||
#if HAS_DISPLAY
|
||||
ui.status_printf_P(0, PSTR(MSG_LCD_TILTING_MESH " 2/3"));
|
||||
ui.status_printf_P(0, PSTR(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH));
|
||||
#endif
|
||||
|
||||
measured_z = probe_at_point(points[1], PROBE_PT_RAISE, g29_verbose_level);
|
||||
@@ -1453,7 +1453,7 @@
|
||||
if (!abort_flag) {
|
||||
SERIAL_ECHOLNPGM("Tilting mesh (3/3)");
|
||||
#if HAS_DISPLAY
|
||||
ui.status_printf_P(0, PSTR(MSG_LCD_TILTING_MESH " 3/3"));
|
||||
ui.status_printf_P(0, PSTR(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH));
|
||||
#endif
|
||||
|
||||
measured_z = probe_at_point(points[2], PROBE_PT_STOW, g29_verbose_level);
|
||||
@@ -1497,7 +1497,7 @@
|
||||
if (!abort_flag) {
|
||||
SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n");
|
||||
#if HAS_DISPLAY
|
||||
ui.status_printf_P(0, PSTR(MSG_LCD_TILTING_MESH " %i/%i"), point_num, total_points);
|
||||
ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points);
|
||||
#endif
|
||||
|
||||
measured_z = probe_at_point(rpos, parser.seen('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling
|
||||
|
||||
@@ -306,6 +306,9 @@ public:
|
||||
PORT_REDIRECT(card.transfer_port_index);
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
|
||||
while (PENDING(millis(), transfer_window)) {
|
||||
switch (stream_state) {
|
||||
/**
|
||||
@@ -439,6 +442,8 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
void dispatch() {
|
||||
|
||||
@@ -71,7 +71,13 @@ void update_case_light() {
|
||||
|
||||
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
|
||||
if (PWM_PIN(CASE_LIGHT_PIN))
|
||||
analogWrite(pin_t(CASE_LIGHT_PIN), n10ct);
|
||||
analogWrite(pin_t(CASE_LIGHT_PIN),
|
||||
#if CASE_LIGHT_MAX_PWM == 255
|
||||
n10ct
|
||||
#else
|
||||
map(n10ct, 0, 255, 0, CASE_LIGHT_MAX_PWM)
|
||||
#endif
|
||||
);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#if MB(5DPRINT)
|
||||
#define DIGIPOT_I2C_FACTOR 117.96
|
||||
#define DIGIPOT_I2C_MAX_CURRENT 1.736
|
||||
#elif MB(AZTEEG_X5_MINI) || MB(AZTEEG_X5_MINI_WIFI)
|
||||
#elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI)
|
||||
#define DIGIPOT_I2C_FACTOR 113.5
|
||||
#define DIGIPOT_I2C_MAX_CURRENT 2.0
|
||||
#else
|
||||
|
||||
@@ -102,8 +102,8 @@ void host_action(const char * const pstr, const bool eol) {
|
||||
|
||||
void host_response_handler(const uint8_t response) {
|
||||
#ifdef DEBUG_HOST_ACTIONS
|
||||
SERIAL_ECHOLNPAIR("M86 Handle Reason: ", host_prompt_reason);
|
||||
SERIAL_ECHOLNPAIR("M86 Handle Response: ", response);
|
||||
SERIAL_ECHOLNPAIR("M876 Handle Reason: ", host_prompt_reason);
|
||||
SERIAL_ECHOLNPAIR("M876 Handle Response: ", response);
|
||||
#endif
|
||||
const char *msg = PSTR("UNKNOWN STATE");
|
||||
const PromptReason hpr = host_prompt_reason;
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "../lcd/extensible_ui/ui_api.h"
|
||||
#endif
|
||||
|
||||
#include "../core/language.h"
|
||||
#include "../lcd/ultralcd.h"
|
||||
|
||||
#if HAS_BUZZER
|
||||
@@ -76,6 +77,12 @@ fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#include "../sd/cardreader.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#define _PMSG(L) L##_M108
|
||||
#else
|
||||
#define _PMSG(L) L##_LCD
|
||||
#endif
|
||||
|
||||
#if HAS_BUZZER
|
||||
static void filament_change_beep(const int8_t max_beep_count, const bool init=false) {
|
||||
if (pause_mode == PAUSE_MODE_PAUSE_PRINT) return;
|
||||
@@ -163,7 +170,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||
#if HAS_LCD_MENU
|
||||
if (show_lcd) lcd_pause_show_message(PAUSE_MESSAGE_INSERT, mode);
|
||||
#endif
|
||||
SERIAL_ECHO_MSG(MSG_FILAMENT_CHANGE_INSERT);
|
||||
SERIAL_ECHO_MSG(_PMSG(MSG_FILAMENT_CHANGE_INSERT));
|
||||
|
||||
#if HAS_BUZZER
|
||||
filament_change_beep(max_beep_count, true);
|
||||
@@ -188,7 +195,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||
host_action_prompt_show();
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(PSTR("Load Filament"));
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("Load Filament"));
|
||||
#endif
|
||||
while (wait_for_user) {
|
||||
#if HAS_BUZZER
|
||||
@@ -243,7 +250,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purge Running..."), PSTR("Continue"));
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(PSTR("Filament Purge Running..."));
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("Filament Purge Running..."));
|
||||
#endif
|
||||
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
|
||||
do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||
@@ -481,14 +488,6 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
|
||||
* Used by M125 and M600
|
||||
*/
|
||||
|
||||
#if (HAS_LCD_MENU || ENABLED(EXTENSIBLE_UI)) && ENABLED(EMERGENCY_PARSER)
|
||||
#define _PMSG(L) L
|
||||
#elif ENABLED(EMERGENCY_PARSER)
|
||||
#define _PMSG(L) L##_M108
|
||||
#else
|
||||
#define _PMSG(L) L##_LCD
|
||||
#endif
|
||||
|
||||
void show_continue_prompt(const bool is_reload) {
|
||||
#if HAS_LCD_MENU
|
||||
lcd_pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING);
|
||||
@@ -527,7 +526,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), PSTR("Continue"));
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(PSTR("Nozzle Parked"));
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("Nozzle Parked"));
|
||||
#endif
|
||||
while (wait_for_user) {
|
||||
#if HAS_BUZZER
|
||||
@@ -551,7 +550,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(PSTR("HeaterTimeout"));
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("HeaterTimeout"));
|
||||
#endif
|
||||
|
||||
// Wait for LCD click or M108
|
||||
@@ -581,7 +580,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue"));
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired("Reheat finished.");
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("Reheat finished."));
|
||||
#endif
|
||||
wait_for_user = true;
|
||||
nozzle_timed_out = false;
|
||||
|
||||
@@ -228,7 +228,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
|
||||
#if PIN_EXISTS(POWER_LOSS)
|
||||
void PrintJobRecovery::_outage() {
|
||||
save(true);
|
||||
kill(PSTR(MSG_OUTAGE_RECOVERY));
|
||||
kill(GET_TEXT(MSG_OUTAGE_RECOVERY));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ bool MMU2::rx_ok() {
|
||||
void MMU2::check_version() {
|
||||
if (buildnr < MMU_REQUIRED_FW_BUILDNR) {
|
||||
SERIAL_ERROR_MSG("Invalid MMU2 firmware. Version >= " STRINGIFY(MMU_REQUIRED_FW_BUILDNR) " required.");
|
||||
kill(MSG_MMU2_WRONG_FIRMWARE);
|
||||
kill(GET_TEXT(MSG_MMU2_WRONG_FIRMWARE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ void MMU2::tool_change(uint8_t index) {
|
||||
if (index != extruder) {
|
||||
|
||||
disable_E0();
|
||||
ui.status_printf_P(0, PSTR(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
|
||||
ui.status_printf_P(0, GET_TEXT(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
|
||||
|
||||
command(MMU_CMD_T0 + index);
|
||||
|
||||
@@ -712,7 +712,7 @@ void MMU2::filament_runout() {
|
||||
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), PSTR("Continue"));
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(PSTR("MMU2 Eject Recover"));
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("MMU2 Eject Recover"));
|
||||
#endif
|
||||
while (wait_for_user) idle();
|
||||
BUZZ(200, 404);
|
||||
|
||||
@@ -34,14 +34,16 @@ SpindleLaser cutter;
|
||||
|
||||
cutter_power_t SpindleLaser::power; // = 0
|
||||
|
||||
#define SPINDLE_LASER_PWM_OFF ((SPINDLE_LASER_PWM_INVERT) ? 255 : 0)
|
||||
|
||||
void SpindleLaser::init() {
|
||||
OUT_WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_HIGH); // Init spindle to off
|
||||
#if ENABLED(SPINDLE_CHANGE_DIR)
|
||||
OUT_WRITE(SPINDLE_DIR_PIN, SPINDLE_INVERT_DIR ? 255 : 0); // Init rotation to clockwise (M3)
|
||||
#endif
|
||||
#if ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
SET_PWM(SPINDLE_LASER_PWM_PIN);
|
||||
analogWrite(pin_t(SPINDLE_LASER_PWM_PIN), SPINDLE_LASER_PWM_INVERT ? 255 : 0); // set to lowest speed
|
||||
analogWrite(pin_t(SPINDLE_LASER_PWM_PIN), SPINDLE_LASER_PWM_OFF); // set to lowest speed
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -54,34 +56,34 @@ void SpindleLaser::init() {
|
||||
*/
|
||||
void SpindleLaser::set_ocr(const uint8_t ocr) {
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ACTIVE_HIGH); // turn spindle on (active low)
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
analogWrite(pin_t(SPINDLE_LASER_PWM_PIN), (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr);
|
||||
#endif
|
||||
analogWrite(pin_t(SPINDLE_LASER_PWM_PIN), ocr ^ SPINDLE_LASER_PWM_OFF);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void SpindleLaser::update_output() {
|
||||
const bool ena = enabled();
|
||||
void SpindleLaser::apply_power(const cutter_power_t inpow) {
|
||||
static cutter_power_t last_power_applied = 0;
|
||||
if (inpow == last_power_applied) return;
|
||||
last_power_applied = inpow;
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
if (ena) {
|
||||
if (enabled()) {
|
||||
#define _scaled(F) ((F - (SPEED_POWER_INTERCEPT)) * inv_slope)
|
||||
constexpr float inv_slope = RECIPROCAL(SPEED_POWER_SLOPE),
|
||||
min_ocr = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * inv_slope, // Minimum allowed
|
||||
max_ocr = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * inv_slope; // Maximum allowed
|
||||
min_ocr = _scaled(SPEED_POWER_MIN),
|
||||
max_ocr = _scaled(SPEED_POWER_MAX);
|
||||
int16_t ocr_val;
|
||||
if (power <= SPEED_POWER_MIN) ocr_val = min_ocr; // Use minimum if set below
|
||||
else if (power >= SPEED_POWER_MAX) ocr_val = max_ocr; // Use maximum if set above
|
||||
else ocr_val = (power - (SPEED_POWER_INTERCEPT)) * inv_slope; // Use calculated OCR value
|
||||
set_ocr(ocr_val & 0xFF); // ...limited to Atmel PWM max
|
||||
if (inpow <= SPEED_POWER_MIN) ocr_val = min_ocr; // Use minimum if set below
|
||||
else if (inpow >= SPEED_POWER_MAX) ocr_val = max_ocr; // Use maximum if set above
|
||||
else ocr_val = _scaled(inpow); // Use calculated OCR value
|
||||
set_ocr(ocr_val & 0xFF); // ...limited to Atmel PWM max
|
||||
}
|
||||
else { // Convert RPM to PWM duty cycle
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_HIGH); // Turn spindle off (active low)
|
||||
analogWrite(pin_t(SPINDLE_LASER_PWM_PIN), SPINDLE_LASER_PWM_INVERT ? 255 : 0); // Only write low byte
|
||||
else {
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_HIGH); // Turn spindle off (active low)
|
||||
analogWrite(pin_t(SPINDLE_LASER_PWM_PIN), SPINDLE_LASER_PWM_OFF); // Only write low byte
|
||||
}
|
||||
#else
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, ena ? SPINDLE_LASER_ACTIVE_HIGH : !SPINDLE_LASER_ACTIVE_HIGH);
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, (SPINDLE_LASER_ACTIVE_HIGH) ? enabled() : !enabled());
|
||||
#endif
|
||||
power_delay(ena);
|
||||
}
|
||||
|
||||
#if ENABLED(SPINDLE_CHANGE_DIR)
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
#define MSG_CUTTER(M) _MSG_CUTTER(M)
|
||||
|
||||
#if SPEED_POWER_MAX > 255
|
||||
#define cutter_power_t uint16_t
|
||||
typedef uint16_t cutter_power_t;
|
||||
#define CUTTER_MENU_TYPE uint16_5
|
||||
#else
|
||||
#define cutter_power_t uint8_t
|
||||
typedef uint8_t cutter_power_t;
|
||||
#define CUTTER_MENU_TYPE uint8
|
||||
#endif
|
||||
|
||||
@@ -51,9 +51,17 @@ public:
|
||||
|
||||
static inline bool enabled() { return !!power; }
|
||||
|
||||
static inline void set_power(const uint8_t pwr) { power = pwr; update_output(); }
|
||||
static inline void set_power(const cutter_power_t pwr) { power = pwr; }
|
||||
|
||||
static inline void set_enabled(const bool enable) { set_power(enable ? 255 : 0); }
|
||||
static inline void refresh() { apply_power(power); }
|
||||
|
||||
static inline void set_enabled(const bool enable) {
|
||||
const bool was = enabled();
|
||||
set_power(enable ? 255 : 0);
|
||||
if (was != enable) power_delay();
|
||||
}
|
||||
|
||||
static void apply_power(const cutter_power_t inpow);
|
||||
|
||||
//static bool active() { return READ(SPINDLE_LASER_ENA_PIN) == SPINDLE_LASER_ACTIVE_HIGH; }
|
||||
|
||||
@@ -61,11 +69,15 @@ public:
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
static void set_ocr(const uint8_t ocr);
|
||||
static inline void set_ocr_power(const uint8_t pwr) { power = pwr; set_ocr(pwr); }
|
||||
static inline void set_ocr_power(const cutter_power_t pwr) { power = pwr; set_ocr(pwr); }
|
||||
#endif
|
||||
|
||||
// Wait for spindle to spin up or spin down
|
||||
static inline void power_delay(const bool on) { safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY); }
|
||||
static inline void power_delay() {
|
||||
#if SPINDLE_LASER_POWERUP_DELAY || SPINDLE_LASER_POWERDOWN_DELAY
|
||||
safe_delay(enabled() ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLED(SPINDLE_CHANGE_DIR)
|
||||
static void set_direction(const bool reverse);
|
||||
|
||||
@@ -1118,7 +1118,7 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
|
||||
#endif
|
||||
}
|
||||
|
||||
if (axis_connection) ui.set_status_P(PSTR(MSG_ERROR_TMC));
|
||||
if (axis_connection) ui.set_status_P(GET_TEXT(MSG_ERROR_TMC));
|
||||
}
|
||||
|
||||
#endif // HAS_TRINAMIC
|
||||
|
||||
@@ -393,34 +393,16 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
|
||||
|
||||
template<class TMC, char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
|
||||
bool TMCMarlin<TMC, AXIS_LETTER, DRIVER_ID, AXIS_ID>::test_stall_status() {
|
||||
uint16_t sg_result = 0;
|
||||
|
||||
this->switchCSpin(LOW);
|
||||
|
||||
if (this->TMC_SW_SPI != nullptr) {
|
||||
this->TMC_SW_SPI->transfer(TMC2130_n::DRV_STATUS_t::address);
|
||||
this->TMC_SW_SPI->transfer16(0);
|
||||
// We only care about the last 10 bits
|
||||
sg_result = this->TMC_SW_SPI->transfer(0);
|
||||
sg_result <<= 8;
|
||||
sg_result |= this->TMC_SW_SPI->transfer(0);
|
||||
}
|
||||
else {
|
||||
SPI.beginTransaction(SPISettings(16000000/8, MSBFIRST, SPI_MODE3));
|
||||
// Read DRV_STATUS
|
||||
SPI.transfer(TMC2130_n::DRV_STATUS_t::address);
|
||||
SPI.transfer16(0);
|
||||
// We only care about the last 10 bits
|
||||
sg_result = SPI.transfer(0);
|
||||
sg_result <<= 8;
|
||||
sg_result |= SPI.transfer(0);
|
||||
SPI.endTransaction();
|
||||
}
|
||||
// read stallGuard flag from TMC library, will handle HW and SW SPI
|
||||
TMC2130_n::DRV_STATUS_t drv_status{0};
|
||||
drv_status.sr = this->DRV_STATUS();
|
||||
|
||||
this->switchCSpin(HIGH);
|
||||
|
||||
return (sg_result & 0x3FF) == 0;
|
||||
return drv_status.stallGuard;
|
||||
}
|
||||
|
||||
#endif // SPI_ENDSTOPS
|
||||
|
||||
#endif // USE_SENSORLESS
|
||||
|
||||
@@ -168,7 +168,7 @@ int8_t g26_prime_flag;
|
||||
*/
|
||||
bool user_canceled() {
|
||||
if (!ui.button_pressed()) return false; // Return if the button isn't pressed
|
||||
ui.set_status_P(PSTR(MSG_G26_CANCELED), 99);
|
||||
ui.set_status_P(GET_TEXT(MSG_G26_CANCELED), 99);
|
||||
#if HAS_LCD_MENU
|
||||
ui.quick_feedback();
|
||||
#endif
|
||||
@@ -370,7 +370,7 @@ inline bool turn_on_heaters() {
|
||||
|
||||
if (g26_bed_temp > 25) {
|
||||
#if HAS_SPI_LCD
|
||||
ui.set_status_P(PSTR(MSG_G26_HEATING_BED), 99);
|
||||
ui.set_status_P(GET_TEXT(MSG_G26_HEATING_BED), 99);
|
||||
ui.quick_feedback();
|
||||
#if HAS_LCD_MENU
|
||||
ui.capture();
|
||||
@@ -391,7 +391,7 @@ inline bool turn_on_heaters() {
|
||||
|
||||
// Start heating the active nozzle
|
||||
#if HAS_SPI_LCD
|
||||
ui.set_status_P(PSTR(MSG_G26_HEATING_NOZZLE), 99);
|
||||
ui.set_status_P(GET_TEXT(MSG_G26_HEATING_NOZZLE), 99);
|
||||
ui.quick_feedback();
|
||||
#endif
|
||||
thermalManager.setTargetHotend(g26_hotend_temp, active_extruder);
|
||||
@@ -426,7 +426,7 @@ inline bool prime_nozzle() {
|
||||
if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged
|
||||
|
||||
ui.capture();
|
||||
ui.set_status_P(PSTR(MSG_G26_MANUAL_PRIME), 99);
|
||||
ui.set_status_P(GET_TEXT(MSG_G26_MANUAL_PRIME), 99);
|
||||
ui.chirp();
|
||||
|
||||
destination = current_position;
|
||||
@@ -450,7 +450,7 @@ inline bool prime_nozzle() {
|
||||
|
||||
ui.wait_for_release();
|
||||
|
||||
ui.set_status_P(PSTR(MSG_G26_PRIME_DONE), 99);
|
||||
ui.set_status_P(GET_TEXT(MSG_G26_PRIME_DONE), 99);
|
||||
ui.quick_feedback();
|
||||
ui.release();
|
||||
}
|
||||
@@ -458,7 +458,7 @@ inline bool prime_nozzle() {
|
||||
#endif
|
||||
{
|
||||
#if HAS_SPI_LCD
|
||||
ui.set_status_P(PSTR(MSG_G26_FIXED_LENGTH), 99);
|
||||
ui.set_status_P(GET_TEXT(MSG_G26_FIXED_LENGTH), 99);
|
||||
ui.quick_feedback();
|
||||
#endif
|
||||
destination = current_position;
|
||||
@@ -827,7 +827,7 @@ void GcodeSuite::G26() {
|
||||
} while (--g26_repeats && location.valid());
|
||||
|
||||
LEAVE:
|
||||
ui.set_status_P(PSTR(MSG_G26_LEAVING), -1);
|
||||
ui.set_status_P(GET_TEXT(MSG_G26_LEAVING), -1);
|
||||
|
||||
retract_filament(destination);
|
||||
destination.z = Z_CLEARANCE_BETWEEN_PROBES;
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "../gcode.h"
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/probe.h"
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
#include "../../module/configuration_store.h"
|
||||
|
||||
@@ -722,7 +722,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
if (verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", int(pt_index), "/", int(GRID_MAX_POINTS), ".");
|
||||
#if HAS_DISPLAY
|
||||
ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), PSTR(MSG_PROBING_MESH), int(pt_index), int(GRID_MAX_POINTS));
|
||||
ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), int(pt_index), int(GRID_MAX_POINTS));
|
||||
#endif
|
||||
|
||||
measured_z = faux ? 0.001 * random(-100, 101) : probe_at_point(probePos, raise_after, verbose_level);
|
||||
@@ -764,7 +764,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
for (uint8_t i = 0; i < 3; ++i) {
|
||||
if (verbose_level) SERIAL_ECHOLNPAIR("Probing point ", int(i), "/3.");
|
||||
#if HAS_DISPLAY
|
||||
ui.status_printf_P(0, PSTR(MSG_PROBING_MESH " %i/3"), int(i));
|
||||
ui.status_printf_P(0, PSTR(S_FMT" %i/3"), GET_TEXT(MSG_PROBING_MESH)), int(i);
|
||||
#endif
|
||||
|
||||
// Retain the last probe position
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
// Disallow Z homing if X or Y are unknown
|
||||
if (!TEST(axis_known_position, X_AXIS) || !TEST(axis_known_position, Y_AXIS)) {
|
||||
LCD_MESSAGEPGM(MSG_ERR_Z_HOMING);
|
||||
SERIAL_ECHO_MSG(MSG_ERR_Z_HOMING);
|
||||
SERIAL_ECHO_MSG(MSG_ERR_Z_HOMING_SER);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
}
|
||||
else {
|
||||
LCD_MESSAGEPGM(MSG_ZPROBE_OUT);
|
||||
SERIAL_ECHO_MSG(MSG_ZPROBE_OUT);
|
||||
SERIAL_ECHO_MSG(MSG_ZPROBE_OUT_SER);
|
||||
}
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< home_z_safely");
|
||||
|
||||
@@ -25,37 +25,49 @@
|
||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/delta.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/endstops.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/probe.h"
|
||||
|
||||
#if HOTENDS > 1
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#include "../../module/probe.h"
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
#include "../../libs/least_squares_fit.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
#include "../../core/debug_out.h"
|
||||
|
||||
// Sanity-check
|
||||
// Sanity-check the count of Z_STEPPER_ALIGN_XY points
|
||||
constexpr xy_pos_t sanity_arr_z_align[] = Z_STEPPER_ALIGN_XY;
|
||||
static_assert(COUNT(sanity_arr_z_align) == Z_STEPPER_COUNT,
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
"Z_STEPPER_ALIGN_XY requires three {X,Y} entries (Z, Z2, and Z3)."
|
||||
#else
|
||||
"Z_STEPPER_ALIGN_XY requires two {X,Y} entries (Z and Z2)."
|
||||
#endif
|
||||
);
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
static_assert(COUNT(sanity_arr_z_align) >= Z_STEPPER_COUNT,
|
||||
"Z_STEPPER_ALIGN_XY requires at least three {X,Y} entries (Z, Z2, Z3, ...)."
|
||||
);
|
||||
#else
|
||||
static_assert(COUNT(sanity_arr_z_align) == Z_STEPPER_COUNT,
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
"Z_STEPPER_ALIGN_XY requires three {X,Y} entries (Z, Z2, and Z3)."
|
||||
#else
|
||||
"Z_STEPPER_ALIGN_XY requires two {X,Y} entries (Z and Z2)."
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
||||
xy_pos_t z_auto_align_pos[Z_STEPPER_COUNT] = Z_STEPPER_ALIGN_XY;
|
||||
static xy_pos_t z_auto_align_pos[Z_STEPPER_COUNT] = Z_STEPPER_ALIGN_XY;
|
||||
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
static xy_pos_t z_stepper_pos[] = Z_STEPPER_ALIGN_STEPPER_XY;
|
||||
#endif
|
||||
|
||||
#define G34_PROBE_COUNT COUNT(z_auto_align_pos)
|
||||
|
||||
inline void set_all_z_lock(const bool lock) {
|
||||
stepper.set_z_lock(lock);
|
||||
@@ -68,7 +80,9 @@ inline void set_all_z_lock(const bool lock) {
|
||||
/**
|
||||
* G34: Z-Stepper automatic alignment
|
||||
*
|
||||
* Parameters: I<iterations> T<accuracy> A<amplification>
|
||||
* I<iterations>
|
||||
* T<accuracy>
|
||||
* A<amplification>
|
||||
*/
|
||||
void GcodeSuite::G34() {
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
@@ -90,11 +104,18 @@ void GcodeSuite::G34() {
|
||||
break;
|
||||
}
|
||||
|
||||
const float z_auto_align_amplification = parser.floatval('A', Z_STEPPER_ALIGN_AMP);
|
||||
if (!WITHIN(ABS(z_auto_align_amplification), 0.5f, 2.0f)) {
|
||||
SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0).");
|
||||
break;
|
||||
}
|
||||
const float z_auto_align_amplification =
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
Z_STEPPER_ALIGN_AMP;
|
||||
#else
|
||||
parser.floatval('A', Z_STEPPER_ALIGN_AMP);
|
||||
if (!WITHIN(ABS(z_auto_align_amplification), 0.5f, 2.0f)) {
|
||||
SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0).");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_RAISE;
|
||||
|
||||
// Wait for planner moves to finish!
|
||||
planner.synchronize();
|
||||
@@ -130,11 +151,13 @@ void GcodeSuite::G34() {
|
||||
#define Z_BASIC_CLEARANCE Z_CLEARANCE_BETWEEN_PROBES
|
||||
#endif
|
||||
|
||||
// Compute a worst-case clearance height to probe from. After the first
|
||||
// iteration this will be re-calculated based on the actual bed position
|
||||
float z_probe = Z_BASIC_CLEARANCE + (G34_MAX_GRADE) * 0.01f * (
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
SQRT(_MAX(HYPOT2(z_auto_align_pos[0].x - z_auto_align_pos[0].y, z_auto_align_pos[1].x - z_auto_align_pos[1].y),
|
||||
HYPOT2(z_auto_align_pos[1].x - z_auto_align_pos[1].y, z_auto_align_pos[2].x - z_auto_align_pos[2].y),
|
||||
HYPOT2(z_auto_align_pos[2].x - z_auto_align_pos[2].y, z_auto_align_pos[0].x - z_auto_align_pos[0].y)))
|
||||
HYPOT2(z_auto_align_pos[1].x - z_auto_align_pos[1].y, z_auto_align_pos[2].x - z_auto_align_pos[2].y),
|
||||
HYPOT2(z_auto_align_pos[2].x - z_auto_align_pos[2].y, z_auto_align_pos[0].x - z_auto_align_pos[0].y)))
|
||||
#else
|
||||
HYPOT(z_auto_align_pos[0].x - z_auto_align_pos[0].y, z_auto_align_pos[1].x - z_auto_align_pos[1].y)
|
||||
#endif
|
||||
@@ -147,12 +170,10 @@ void GcodeSuite::G34() {
|
||||
current_position.z -= z_probe * 0.5f;
|
||||
|
||||
float last_z_align_move[Z_STEPPER_COUNT] = ARRAY_N(Z_STEPPER_COUNT, 10000.0f, 10000.0f, 10000.0f),
|
||||
z_measured[Z_STEPPER_COUNT] = { 0 },
|
||||
z_measured[G34_PROBE_COUNT] = { 0 },
|
||||
z_maxdiff = 0.0f,
|
||||
amplification = z_auto_align_amplification;
|
||||
|
||||
const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_RAISE;
|
||||
|
||||
uint8_t iteration;
|
||||
bool err_break = false;
|
||||
for (iteration = 0; iteration < z_auto_align_iterations; ++iteration) {
|
||||
@@ -161,17 +182,19 @@ void GcodeSuite::G34() {
|
||||
SERIAL_ECHOLNPAIR("\nITERATION: ", int(iteration + 1));
|
||||
|
||||
// Initialize minimum value
|
||||
float z_measured_min = 100000.0f;
|
||||
float z_measured_min = 100000.0f,
|
||||
z_measured_max = -100000.0f;
|
||||
|
||||
// Probe all positions (one per Z-Stepper)
|
||||
for (uint8_t izstepper = 0; izstepper < Z_STEPPER_COUNT; ++izstepper) {
|
||||
for (uint8_t i = 0; i < G34_PROBE_COUNT; ++i) {
|
||||
// iteration odd/even --> downward / upward stepper sequence
|
||||
const uint8_t zstepper = (iteration & 1) ? Z_STEPPER_COUNT - 1 - izstepper : izstepper;
|
||||
const uint8_t iprobe = (iteration & 1) ? G34_PROBE_COUNT - 1 - i : i;
|
||||
|
||||
// Safe clearance even on an incline
|
||||
if (iteration == 0 || izstepper > 0) do_blocking_move_to_z(z_probe);
|
||||
if (iteration == 0 || i > 0) do_blocking_move_to_z(z_probe);
|
||||
|
||||
// Probe a Z height for each stepper.
|
||||
const float z_probed_height = probe_at_point(z_auto_align_pos[zstepper], raise_after, 0, true);
|
||||
const float z_probed_height = probe_at_point(z_auto_align_pos[i], raise_after, 0, true);
|
||||
if (isnan(z_probed_height)) {
|
||||
SERIAL_ECHOLNPGM("Probing failed.");
|
||||
err_break = true;
|
||||
@@ -180,35 +203,58 @@ void GcodeSuite::G34() {
|
||||
|
||||
// Add height to each value, to provide a more useful target height for
|
||||
// the next iteration of probing. This allows adjustments to be made away from the bed.
|
||||
z_measured[zstepper] = z_probed_height + Z_CLEARANCE_BETWEEN_PROBES;
|
||||
z_measured[iprobe] = z_probed_height + Z_CLEARANCE_BETWEEN_PROBES;
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(zstepper + 1), " measured position is ", z_measured[zstepper]);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(iprobe + 1), " measured position is ", z_measured[iprobe]);
|
||||
|
||||
// Remember the minimum measurement to calculate the correction later on
|
||||
z_measured_min = _MIN(z_measured_min, z_measured[zstepper]);
|
||||
} // for (zstepper)
|
||||
z_measured_min = _MIN(z_measured_min, z_measured[iprobe]);
|
||||
z_measured_max = _MAX(z_measured_max, z_measured[iprobe]);
|
||||
} // for (i)
|
||||
|
||||
if (err_break) break;
|
||||
|
||||
// Adapt the next probe clearance height based on the new measurements.
|
||||
// Safe_height = lowest distance to bed (= highest measurement) plus highest measured misalignment.
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
z_maxdiff = _MAX(ABS(z_measured[0] - z_measured[1]), ABS(z_measured[1] - z_measured[2]), ABS(z_measured[2] - z_measured[0]));
|
||||
z_probe = Z_BASIC_CLEARANCE + _MAX(z_measured[0], z_measured[1], z_measured[2]) + z_maxdiff;
|
||||
#else
|
||||
z_maxdiff = ABS(z_measured[0] - z_measured[1]);
|
||||
z_probe = Z_BASIC_CLEARANCE + _MAX(z_measured[0], z_measured[1]) + z_maxdiff;
|
||||
z_maxdiff = z_measured_max - z_measured_min;
|
||||
z_probe = Z_BASIC_CLEARANCE + z_measured_max + z_maxdiff;
|
||||
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
// Replace the initial values in z_measured with calculated heights at
|
||||
// each stepper position. This allows the adjustment algorithm to be
|
||||
// shared between both possible probing mechanisms.
|
||||
|
||||
// This must be done after the next z_probe height is calculated, so that
|
||||
// the height is calculated from actual print area positions, and not
|
||||
// extrapolated motor movements.
|
||||
|
||||
// Compute the least-squares fit for all probed points.
|
||||
// Calculate the Z position of each stepper and store it in z_measured.
|
||||
// This allows the actual adjustment logic to be shared by both algorithms.
|
||||
linear_fit_data lfd;
|
||||
incremental_LSF_reset(&lfd);
|
||||
for (uint8_t i = 0; i < G34_PROBE_COUNT; ++i) {
|
||||
SERIAL_ECHOLNPAIR("PROBEPT_", int(i + 1), ": ", z_measured[i]);
|
||||
incremental_LSF(&lfd, z_auto_align_pos[i], z_measured[i]);
|
||||
}
|
||||
finish_incremental_LSF(&lfd);
|
||||
|
||||
z_measured_min = 100000.0f;
|
||||
for (uint8_t i = 0; i < Z_STEPPER_COUNT; ++i) {
|
||||
z_measured[i] = -(lfd.A * z_stepper_pos[i].x + lfd.B * z_stepper_pos[i].y);
|
||||
z_measured_min = _MIN(z_measured_min, z_measured[i]);
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR("CALCULATED STEPPER POSITIONS: Z1=", z_measured[0], " Z2=", z_measured[1], " Z3=", z_measured[2]);
|
||||
#endif
|
||||
|
||||
SERIAL_ECHOPAIR("\n"
|
||||
SERIAL_ECHOLNPAIR("\n"
|
||||
"DIFFERENCE Z1-Z2=", ABS(z_measured[0] - z_measured[1])
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
, " Z2-Z3=", ABS(z_measured[1] - z_measured[2])
|
||||
, " Z3-Z1=", ABS(z_measured[2] - z_measured[0])
|
||||
#endif
|
||||
);
|
||||
SERIAL_EOL();
|
||||
SERIAL_EOL();
|
||||
|
||||
// The following correction actions are to be enabled for select Z-steppers only
|
||||
stepper.set_separate_multi_axis(true);
|
||||
@@ -220,8 +266,10 @@ void GcodeSuite::G34() {
|
||||
const float z_align_move = z_measured[zstepper] - z_measured_min,
|
||||
z_align_abs = ABS(z_align_move);
|
||||
|
||||
// Optimize one iterations correction based on the first measurements
|
||||
if (z_align_abs > 0.0f) amplification = iteration == 1 ? _MIN(last_z_align_move[zstepper] / z_align_abs, 2.0f) : z_auto_align_amplification;
|
||||
#if DISABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
// Optimize one iteration's correction based on the first measurements
|
||||
if (z_align_abs > 0.0f) amplification = iteration == 1 ? _MIN(last_z_align_move[zstepper] / z_align_abs, 2.0f) : z_auto_align_amplification;
|
||||
#endif
|
||||
|
||||
// Check for less accuracy compared to last move
|
||||
if (last_z_align_move[zstepper] < z_align_abs - 1.0) {
|
||||
@@ -266,7 +314,6 @@ void GcodeSuite::G34() {
|
||||
|
||||
SERIAL_ECHOLNPAIR("Did ", int(iteration + (iteration != z_auto_align_iterations)), " iterations of ", int(z_auto_align_iterations));
|
||||
SERIAL_ECHOLNPAIR_F("Accuracy: ", z_maxdiff);
|
||||
SERIAL_EOL();
|
||||
|
||||
// Restore the active tool after homing
|
||||
#if HOTENDS > 1
|
||||
@@ -299,31 +346,82 @@ void GcodeSuite::G34() {
|
||||
}
|
||||
|
||||
/**
|
||||
* M422: Z-Stepper automatic alignment parameter selection
|
||||
* M422: Set a Z-Stepper automatic alignment XY point.
|
||||
* Use repeatedly to set multiple points.
|
||||
*
|
||||
* S<index> : Index of the probe point to set
|
||||
*
|
||||
* With Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS:
|
||||
* W<index> : Index of the Z stepper position to set
|
||||
* The W and S parameters may not be combined.
|
||||
*
|
||||
* S and W require an X and/or Y parameter
|
||||
* X<pos> : X position to set (Unchanged if omitted)
|
||||
* Y<pos> : Y position to set (Unchanged if omitted)
|
||||
*/
|
||||
void GcodeSuite::M422() {
|
||||
const int8_t zstepper = parser.intval('S') - 1;
|
||||
if (!WITHIN(zstepper, 0, Z_STEPPER_COUNT - 1)) {
|
||||
SERIAL_ECHOLNPGM("?(S) Z-Stepper index invalid.");
|
||||
if (!parser.seen_any()) {
|
||||
for (uint8_t i = 0; i < G34_PROBE_COUNT; ++i)
|
||||
SERIAL_ECHOLNPAIR("M422 S", i + 1, " X", z_auto_align_pos[i].x, " Y", z_auto_align_pos[i].y);
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
for (uint8_t i = 0; i < Z_STEPPER_COUNT; ++i)
|
||||
SERIAL_ECHOLNPAIR("M422 W", i + 1, " X", z_stepper_pos[i].x, " Y", z_stepper_pos[i].y);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
const bool is_probe_point = parser.seen('S');
|
||||
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
if (is_probe_point && parser.seen('W')) {
|
||||
SERIAL_ECHOLNPGM("?(S) and (W) may not be combined.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
xy_pos_t *pos_dest = (
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
!is_probe_point ? z_stepper_pos :
|
||||
#endif
|
||||
z_auto_align_pos
|
||||
);
|
||||
|
||||
// Get the Probe Position Index or Z Stepper Index
|
||||
int8_t position_index;
|
||||
if (is_probe_point) {
|
||||
position_index = parser.intval('S') - 1;
|
||||
if (!WITHIN(position_index, 0, int8_t(G34_PROBE_COUNT) - 1)) {
|
||||
SERIAL_ECHOLNPGM("?(S) Z-ProbePosition index invalid.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
position_index = parser.intval('W') - 1;
|
||||
if (!WITHIN(position_index, 0, Z_STEPPER_COUNT - 1)) {
|
||||
SERIAL_ECHOLNPGM("?(W) Z-Stepper index invalid.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const xy_pos_t pos = {
|
||||
parser.floatval('X', z_auto_align_pos[zstepper].x),
|
||||
parser.floatval('Y', z_auto_align_pos[zstepper].y)
|
||||
parser.floatval('X', pos_dest[position_index].x),
|
||||
parser.floatval('Y', pos_dest[position_index].y)
|
||||
};
|
||||
|
||||
if (!WITHIN(pos.x, X_MIN_POS, X_MAX_POS)) {
|
||||
SERIAL_ECHOLNPGM("?(X) out of bounds.");
|
||||
return;
|
||||
if (is_probe_point) {
|
||||
if (!position_is_reachable_by_probe(pos.x, Y_CENTER)) {
|
||||
SERIAL_ECHOLNPGM("?(X) out of bounds.");
|
||||
return;
|
||||
}
|
||||
if (!position_is_reachable_by_probe(pos)) {
|
||||
SERIAL_ECHOLNPGM("?(Y) out of bounds.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!WITHIN(pos.y, Y_MIN_POS, Y_MAX_POS)) {
|
||||
SERIAL_ECHOLNPGM("?(Y) out of bounds.");
|
||||
return;
|
||||
}
|
||||
|
||||
z_auto_align_pos[zstepper] = pos;
|
||||
pos_dest[position_index] = pos;
|
||||
}
|
||||
|
||||
#endif // Z_STEPPER_AUTO_ALIGN
|
||||
|
||||
@@ -126,7 +126,7 @@ void GcodeSuite::M48() {
|
||||
for (uint8_t n = 0; n < n_samples; n++) {
|
||||
#if HAS_SPI_LCD
|
||||
// Display M48 progress in the status bar
|
||||
ui.status_printf_P(0, PSTR(MSG_M48_POINT ": %d/%d"), int(n + 1), int(n_samples));
|
||||
ui.status_printf_P(0, PSTR(S_FMT ": %d/%d"), GET_TEXT(MSG_M48_POINT), int(n + 1), int(n_samples));
|
||||
#endif
|
||||
if (n_legs) {
|
||||
const int dir = (random(0, 10) > 5.0) ? -1 : 1; // clockwise or counter clockwise
|
||||
@@ -252,7 +252,7 @@ void GcodeSuite::M48() {
|
||||
#if HAS_SPI_LCD
|
||||
// Display M48 results in the status bar
|
||||
char sigma_str[8];
|
||||
ui.status_printf_P(0, PSTR(MSG_M48_DEVIATION ": %s"), dtostrf(sigma, 2, 6, sigma_str));
|
||||
ui.status_printf_P(0, PSTR(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -93,13 +93,13 @@ void GcodeSuite::M852() {
|
||||
|
||||
if (!ijk) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR_F(MSG_SKEW_FACTOR " XY: ", planner.skew_factor.xy, 6);
|
||||
serialprintPGM(GET_TEXT(MSG_SKEW_FACTOR));
|
||||
SERIAL_ECHOPAIR_F(" XY: ", planner.skew_factor.xy, 6);
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
SERIAL_ECHOPAIR(" XZ: ", planner.skew_factor.xz);
|
||||
SERIAL_ECHOLNPAIR(" YZ: ", planner.skew_factor.yz);
|
||||
#else
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOPAIR_F(" XZ: ", planner.skew_factor.xz, 6);
|
||||
SERIAL_ECHOPAIR_F(" YZ: ", planner.skew_factor.yz, 6);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,10 +117,10 @@ void GcodeSuite::M204() {
|
||||
* Y = Max Y Jerk (units/sec^2)
|
||||
* Z = Max Z Jerk (units/sec^2)
|
||||
* E = Max E Jerk (units/sec^2)
|
||||
* J = Junction Deviation (mm) (Requires JUNCTION_DEVIATION)
|
||||
* J = Junction Deviation (mm) (If not using CLASSIC_JERK)
|
||||
*/
|
||||
void GcodeSuite::M205() {
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
#define J_PARAM "J"
|
||||
#else
|
||||
#define J_PARAM
|
||||
@@ -136,7 +136,7 @@ void GcodeSuite::M205() {
|
||||
if (parser.seen('B')) planner.settings.min_segment_time_us = parser.value_ulong();
|
||||
if (parser.seen('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units();
|
||||
if (parser.seen('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units();
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
if (parser.seen('J')) {
|
||||
const float junc_dev = parser.value_linear_units();
|
||||
if (WITHIN(junc_dev, 0.01f, 0.3f)) {
|
||||
@@ -159,7 +159,7 @@ void GcodeSuite::M205() {
|
||||
SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses.");
|
||||
#endif
|
||||
}
|
||||
#if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
if (parser.seen('E')) planner.set_max_jerk(E_AXIS, parser.value_linear_units());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -334,7 +334,7 @@ void GcodeSuite::M43() {
|
||||
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), PSTR("Continue"));
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(PSTR("M43 Wait Called"));
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("M43 Wait Called"));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ void GcodeSuite::M92() {
|
||||
const float value = parser.value_per_axis_units((AxisEnum)(E_AXIS_N(target_extruder)));
|
||||
if (value < 20) {
|
||||
float factor = planner.settings.axis_steps_per_mm[E_AXIS_N(target_extruder)] / value; // increase e constants if M92 E14 is given for netfab.
|
||||
#if HAS_CLASSIC_JERK && !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
planner.max_jerk.e *= factor;
|
||||
#endif
|
||||
planner.settings.max_feedrate_mm_s[E_AXIS_N(target_extruder)] *= factor;
|
||||
|
||||
@@ -41,7 +41,7 @@ void GcodeSuite::M108() {
|
||||
* M112: Full Shutdown
|
||||
*/
|
||||
void GcodeSuite::M112() {
|
||||
kill(PSTR("M112 Shutdown"), true);
|
||||
kill(PSTR("M112 Shutdown"), nullptr, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,10 +29,20 @@
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
/**
|
||||
* M3 - Cutter ON (Clockwise)
|
||||
* M4 - Cutter ON (Counter-clockwise)
|
||||
* Laser:
|
||||
*
|
||||
* S<power> - Set power. S0 turns it off.
|
||||
* M3 - Laser ON/Power (Ramped power)
|
||||
* M4 - Laser ON/Power (Continuous power)
|
||||
*
|
||||
* S<power> - Set power. S0 will turn the laser off.
|
||||
* O<ocr> - Set power and OCR
|
||||
*
|
||||
* Spindle:
|
||||
*
|
||||
* M3 - Spindle ON (Clockwise)
|
||||
* M4 - Spindle ON (Counter-clockwise)
|
||||
*
|
||||
* S<power> - Set power. S0 will turn the spindle off.
|
||||
* O<ocr> - Set power and OCR
|
||||
*
|
||||
* If no PWM pin is defined then M3/M4 just turns it on.
|
||||
@@ -61,12 +71,14 @@
|
||||
*/
|
||||
void GcodeSuite::M3_M4(const bool is_M4) {
|
||||
|
||||
planner.synchronize(); // Wait for previous movement commands (G0/G0/G2/G3) to complete before changing power
|
||||
#if ENABLED(SPINDLE_FEATURE)
|
||||
planner.synchronize(); // Wait for movement to complete before changing power
|
||||
#endif
|
||||
|
||||
cutter.set_direction(is_M4);
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
if (parser.seen('O'))
|
||||
if (parser.seenval('O'))
|
||||
cutter.set_ocr_power(parser.value_byte()); // The OCR is a value from 0 to 255 (uint8_t)
|
||||
else
|
||||
cutter.set_power(parser.intval('S', 255));
|
||||
@@ -79,7 +91,9 @@ void GcodeSuite::M3_M4(const bool is_M4) {
|
||||
* M5 - Cutter OFF
|
||||
*/
|
||||
void GcodeSuite::M5() {
|
||||
planner.synchronize();
|
||||
#if ENABLED(SPINDLE_FEATURE)
|
||||
planner.synchronize();
|
||||
#endif
|
||||
cutter.set_enabled(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
* a print without suicide...
|
||||
*/
|
||||
#if HAS_SUICIDE
|
||||
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
||||
OUT_WRITE(SUICIDE_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
#if DISABLED(AUTO_POWER_CONTROL)
|
||||
@@ -110,6 +110,6 @@ void GcodeSuite::M81() {
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
LCD_MESSAGEPGM(MACHINE_NAME " " MSG_OFF ".");
|
||||
LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " MSG_OFF "."));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -65,8 +65,10 @@ void GcodeSuite::M907() {
|
||||
#if ENABLED(DIGIPOT_I2C)
|
||||
// this one uses actual amps in floating point
|
||||
LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) digipot_i2c_set_current(i, parser.value_float());
|
||||
// for each additional extruder (named B,C,D,E..., channels 4,5,6,7...)
|
||||
for (uint8_t i = NUM_AXIS; i < DIGIPOT_I2C_NUM_CHANNELS; i++) if (parser.seenval('B' + i - (NUM_AXIS))) digipot_i2c_set_current(i, parser.value_float());
|
||||
// Additional extruders use B,C,D for channels 4,5,6.
|
||||
// TODO: Change these parameters because 'E' is used. B<index>?
|
||||
for (uint8_t i = E_AXIS + 1; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
|
||||
if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c_set_current(i, parser.value_float());
|
||||
#endif
|
||||
|
||||
#if ENABLED(DAC_STEPPER_CURRENT)
|
||||
|
||||
@@ -71,7 +71,7 @@ void GcodeSuite::M7219() {
|
||||
}
|
||||
else if (parser.seen('D')) {
|
||||
const uint8_t uline = parser.value_byte() & 0x7,
|
||||
line = uline + parser.byteval('U') << 3;
|
||||
line = uline + (parser.byteval('U') << 3);
|
||||
if (line < MAX7219_LINES) {
|
||||
max7219.led_line[line] = v;
|
||||
return max7219.refresh_line(line);
|
||||
|
||||
@@ -446,7 +446,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case 141: M141(); break; // M141: Set chamber temperature
|
||||
//case 191: M191(); break; // M191: Wait for chamber temperature to reach target
|
||||
case 191: M191(); break; // M191: Wait for chamber temperature to reach target
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
|
||||
|
||||
@@ -620,7 +620,7 @@ private:
|
||||
|
||||
#if HAS_HEATED_CHAMBER
|
||||
static void M141();
|
||||
//static void M191();
|
||||
static void M191();
|
||||
#endif
|
||||
|
||||
#if HOTENDS && HAS_LCD_MENU
|
||||
|
||||
@@ -70,7 +70,7 @@ void GcodeSuite::M428() {
|
||||
diff[i] = -current_position[i];
|
||||
if (!WITHIN(diff[i], -20, 20)) {
|
||||
SERIAL_ERROR_MSG(MSG_ERR_M428_TOO_FAR);
|
||||
LCD_ALERTMESSAGEPGM("Err: Too far!");
|
||||
LCD_ALERTMESSAGEPGM_P(PSTR("Err: Too far!"));
|
||||
BUZZ(200, 40);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
void GcodeSuite::M16() {
|
||||
|
||||
if (strcmp_P(parser.string_arg, PSTR(MACHINE_NAME)))
|
||||
kill(PSTR(MSG_EXPECTED_PRINTER));
|
||||
kill(GET_TEXT(MSG_EXPECTED_PRINTER));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,10 @@ void GcodeSuite::M0_M1() {
|
||||
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
|
||||
ExtUI::onUserConfirmRequired(has_message ? args : MSG_USERWAIT); // SRAM string
|
||||
if (has_message)
|
||||
ExtUI::onUserConfirmRequired(args); // Can this take an SRAM string??
|
||||
else
|
||||
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
|
||||
|
||||
#else
|
||||
|
||||
@@ -98,7 +101,7 @@ void GcodeSuite::M0_M1() {
|
||||
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), PSTR("Continue"));
|
||||
#endif
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(PSTR("M0/1 Break Called"));
|
||||
ExtUI::onUserConfirmRequired_P(PSTR("M0/1 Break Called"));
|
||||
#endif
|
||||
|
||||
if (ms > 0) {
|
||||
|
||||
@@ -38,8 +38,11 @@
|
||||
* This has no effect during an SD print job
|
||||
*/
|
||||
void GcodeSuite::M73() {
|
||||
if (parser.seen('P') && !IS_SD_PRINTING())
|
||||
ui.set_progress(parser.value_byte());
|
||||
if (parser.seen('P'))
|
||||
ui.set_progress((PROGRESS_SCALE) > 1
|
||||
? parser.value_float() * (PROGRESS_SCALE)
|
||||
: parser.value_byte()
|
||||
);
|
||||
}
|
||||
|
||||
#endif // LCD_SET_PROGRESS_MANUALLY
|
||||
|
||||
@@ -59,8 +59,8 @@ void plan_arc(
|
||||
switch (gcode.workspace_plane) {
|
||||
default:
|
||||
case GcodeSuite::PLANE_XY: p_axis = X_AXIS; q_axis = Y_AXIS; l_axis = Z_AXIS; break;
|
||||
case GcodeSuite::PLANE_ZX: p_axis = Z_AXIS; q_axis = X_AXIS; l_axis = Y_AXIS; break;
|
||||
case GcodeSuite::PLANE_YZ: p_axis = Y_AXIS; q_axis = Z_AXIS; l_axis = X_AXIS; break;
|
||||
case GcodeSuite::PLANE_ZX: p_axis = Z_AXIS; q_axis = X_AXIS; l_axis = Y_AXIS; break;
|
||||
}
|
||||
#else
|
||||
constexpr AxisEnum p_axis = X_AXIS, q_axis = Y_AXIS, l_axis = Z_AXIS;
|
||||
@@ -242,19 +242,20 @@ void plan_arc(
|
||||
* G2: Clockwise Arc
|
||||
* G3: Counterclockwise Arc
|
||||
*
|
||||
* This command has two forms: IJ-form and R-form.
|
||||
* This command has two forms: IJ-form (JK, KI) and R-form.
|
||||
*
|
||||
* - I specifies an X offset. J specifies a Y offset.
|
||||
* At least one of the IJ parameters is required.
|
||||
* X and Y can be omitted to do a complete circle.
|
||||
* The given XY is not error-checked. The arc ends
|
||||
* based on the angle of the destination.
|
||||
* Mixing I or J with R will throw an error.
|
||||
* - Depending on the current Workspace Plane orientation,
|
||||
* use parameters IJ/JK/KI to specify the XY/YZ/ZX offsets.
|
||||
* At least one of the IJ/JK/KI parameters is required.
|
||||
* XY/YZ/ZX can be omitted to do a complete circle.
|
||||
* The given XY/YZ/ZX is not error-checked. The arc ends
|
||||
* based on the angle of the destination.
|
||||
* Mixing IJ/JK/KI with R will throw an error.
|
||||
*
|
||||
* - R specifies the radius. X or Y is required.
|
||||
* Omitting both X and Y will throw an error.
|
||||
* X or Y must differ from the current XY.
|
||||
* Mixing R with I or J will throw an error.
|
||||
* - R specifies the radius. X or Y (Y or Z / Z or X) is required.
|
||||
* Omitting both XY/YZ/ZX will throw an error.
|
||||
* XY/YZ/ZX must differ from the current XY/YZ/ZX.
|
||||
* Mixing R with IJ/JK/KI will throw an error.
|
||||
*
|
||||
* - P specifies the number of full circles to do
|
||||
* before the specified arc move.
|
||||
@@ -284,18 +285,30 @@ void GcodeSuite::G2_G3(const bool clockwise) {
|
||||
if (r) {
|
||||
const xy_pos_t p1 = current_position, p2 = destination;
|
||||
if (p1 != p2) {
|
||||
const xy_pos_t d = p2 - p1, m = (p1 + p2) * 0.5f; // XY distance and midpoint
|
||||
const float e = clockwise ^ (r < 0) ? -1 : 1, // clockwise -1/1, counterclockwise 1/-1
|
||||
len = d.magnitude(), // Total move length
|
||||
h = SQRT(sq(r) - sq(len * 0.5f)); // Distance to the arc pivot-point
|
||||
const xy_pos_t s = { d.x, -d.y }; // Inverse Slope of the perpendicular bisector
|
||||
arc_offset = m + s * RECIPROCAL(len) * e * h - p1; // The calculated offset
|
||||
const xy_pos_t d2 = (p2 - p1) * 0.5f; // XY vector to midpoint of move from current
|
||||
const float e = clockwise ^ (r < 0) ? -1 : 1, // clockwise -1/1, counterclockwise 1/-1
|
||||
len = d2.magnitude(), // Distance to mid-point of move from current
|
||||
h2 = (r - len) * (r + len), // factored to reduce rounding error
|
||||
h = (h2 >= 0) ? SQRT(h2) : 0.0f; // Distance to the arc pivot-point from midpoint
|
||||
const xy_pos_t s = { -d2.y, d2.x }; // Perpendicular bisector. (Divide by len for unit vector.)
|
||||
arc_offset = d2 + s / len * e * h; // The calculated offset (mid-point if |r| <= len)
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (parser.seenval('I')) arc_offset.a = parser.value_linear_units();
|
||||
if (parser.seenval('J')) arc_offset.b = parser.value_linear_units();
|
||||
#if ENABLED(CNC_WORKSPACE_PLANES)
|
||||
char achar, bchar;
|
||||
switch (gcode.workspace_plane) {
|
||||
default:
|
||||
case GcodeSuite::PLANE_XY: achar = 'I'; bchar = 'J'; break;
|
||||
case GcodeSuite::PLANE_YZ: achar = 'J'; bchar = 'K'; break;
|
||||
case GcodeSuite::PLANE_ZX: achar = 'K'; bchar = 'I'; break;
|
||||
}
|
||||
#else
|
||||
constexpr char achar = 'I', bchar = 'J';
|
||||
#endif
|
||||
if (parser.seenval(achar)) arc_offset.a = parser.value_linear_units();
|
||||
if (parser.seenval(bchar)) arc_offset.b = parser.value_linear_units();
|
||||
}
|
||||
|
||||
if (arc_offset) {
|
||||
|
||||
@@ -31,16 +31,21 @@ void GcodeSuite::M105() {
|
||||
const int8_t target_extruder = get_target_extruder_from_command();
|
||||
if (target_extruder < 0) return;
|
||||
|
||||
SERIAL_ECHOPGM(MSG_OK);
|
||||
|
||||
#if HAS_TEMP_SENSOR
|
||||
SERIAL_ECHOPGM(MSG_OK);
|
||||
|
||||
thermalManager.print_heater_states(target_extruder
|
||||
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
|
||||
, parser.boolval('R')
|
||||
#endif
|
||||
);
|
||||
#else // !HAS_TEMP_SENSOR
|
||||
SERIAL_ERROR_MSG(MSG_ERR_NO_THERMISTORS);
|
||||
#endif
|
||||
|
||||
SERIAL_EOL();
|
||||
SERIAL_EOL();
|
||||
|
||||
#else
|
||||
|
||||
SERIAL_ECHOLNPGM(" T:0"); // Some hosts send M105 to test the serial connection
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ void GcodeSuite::M190() {
|
||||
}
|
||||
else return;
|
||||
|
||||
ui.set_status_P(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING));
|
||||
ui.set_status_P(thermalManager.isHeatingBed() ? GET_TEXT(MSG_BED_HEATING) : GET_TEXT(MSG_BED_COOLING));
|
||||
|
||||
thermalManager.wait_for_bed(no_wait_for_cooling);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "../gcode.h"
|
||||
#include "../../module/temperature.h"
|
||||
|
||||
/*
|
||||
#include "../../module/motion.h"
|
||||
#include "../../lcd/ultralcd.h"
|
||||
|
||||
@@ -40,7 +39,6 @@
|
||||
#endif
|
||||
|
||||
#include "../../Marlin.h" // for wait_for_heatup and idle()
|
||||
*/
|
||||
|
||||
/**
|
||||
* M141: Set chamber temperature
|
||||
@@ -54,7 +52,6 @@ void GcodeSuite::M141() {
|
||||
* M191: Sxxx Wait for chamber current temp to reach target temp. Waits only when heating
|
||||
* Rxxx Wait for chamber current temp to reach target temp. Waits when heating and cooling
|
||||
*/
|
||||
/*
|
||||
void GcodeSuite::M191() {
|
||||
if (DEBUGGING(DRYRUN)) return;
|
||||
|
||||
@@ -68,10 +65,11 @@ void GcodeSuite::M191() {
|
||||
}
|
||||
else return;
|
||||
|
||||
lcd_setstatusPGM(thermalManager.isHeatingChamber() ? PSTR(MSG_CHAMBER_HEATING) : PSTR(MSG_CHAMBER_COOLING));
|
||||
|
||||
thermalManager.wait_for_chamber(no_wait_for_cooling);
|
||||
const bool is_heating = thermalManager.isHeatingChamber();
|
||||
if (is_heating || !no_wait_for_cooling) {
|
||||
lcd_setstatusPGM(is_heating ? GET_TEXT(MSG_CHAMBER_HEATING) : GET_TEXT(MSG_CHAMBER_COOLING));
|
||||
thermalManager.wait_for_chamber(false);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#endif // HAS_HEATED_CHAMBER
|
||||
|
||||
@@ -501,8 +501,8 @@
|
||||
#define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING))
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#define USES_Z_MIN_PROBE_ENDSTOP DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
||||
#define HOMING_Z_WITH_PROBE (Z_HOME_DIR < 0 && !USES_Z_MIN_PROBE_ENDSTOP)
|
||||
#define HAS_CUSTOM_PROBE_PIN DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
||||
#define HOMING_Z_WITH_PROBE (Z_HOME_DIR < 0 && !HAS_CUSTOM_PROBE_PIN)
|
||||
#ifndef Z_PROBE_LOW_POINT
|
||||
#define Z_PROBE_LOW_POINT -5
|
||||
#endif
|
||||
@@ -525,13 +525,14 @@
|
||||
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
|
||||
#endif
|
||||
|
||||
#define HAS_SOFTWARE_ENDSTOPS EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
||||
#define HAS_RESUME_CONTINUE ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
|
||||
#define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
|
||||
#define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE)
|
||||
#define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
|
||||
#define HAS_SERVICE_INTERVALS (ENABLED(PRINTCOUNTER) && (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0))
|
||||
#define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
#define HAS_SOFTWARE_ENDSTOPS EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
||||
#define HAS_RESUME_CONTINUE ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
|
||||
#define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
|
||||
#define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE)
|
||||
#define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
|
||||
#define HAS_PRINT_PROGRESS_PERMYRIAD (HAS_PRINT_PROGRESS && EITHER(PRINT_PROGRESS_SHOW_DECIMALS, SHOW_REMAINING_TIME))
|
||||
#define HAS_SERVICE_INTERVALS (ENABLED(PRINTCOUNTER) && (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0))
|
||||
#define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
|
||||
#define Z_MULTI_STEPPER_DRIVERS EITHER(Z_DUAL_STEPPER_DRIVERS, Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#define Z_MULTI_ENDSTOPS EITHER(Z_DUAL_ENDSTOPS, Z_TRIPLE_ENDSTOPS)
|
||||
@@ -561,6 +562,12 @@
|
||||
#define BOOT_MARLIN_LOGO_SMALL
|
||||
#endif
|
||||
|
||||
#define IS_RE_ARM_BOARD (MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_14_RE_ARM_SF))
|
||||
#define IS_RE_ARM_BOARD MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
|
||||
|
||||
#define HAS_SDCARD_CONNECTION EITHER(TARGET_LPC1768, ADAFRUIT_GRAND_CENTRAL_M4)
|
||||
|
||||
#define HAS_LINEAR_E_JERK (DISABLED(CLASSIC_JERK) && ENABLED(LIN_ADVANCE))
|
||||
|
||||
#ifndef SPI_SPEED
|
||||
#define SPI_SPEED SPI_FULL_SPEED
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
#define NOT_A_PIN 0 // For PINS_DEBUGGING
|
||||
#endif
|
||||
|
||||
#define HAS_CLASSIC_JERK (IS_KINEMATIC || DISABLED(JUNCTION_DEVIATION))
|
||||
#define HAS_CLASSIC_JERK (ENABLED(CLASSIC_JERK) || IS_KINEMATIC)
|
||||
#define HAS_CLASSIC_E_JERK (HAS_CLASSIC_JERK && DISABLED(LIN_ADVANCE))
|
||||
|
||||
/**
|
||||
* Axis lengths and center
|
||||
@@ -220,11 +221,6 @@
|
||||
#ifndef Z_SAFE_HOMING_Y_POINT
|
||||
#define Z_SAFE_HOMING_Y_POINT _SAFE_POINT(Y)
|
||||
#endif
|
||||
#define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT
|
||||
#define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT
|
||||
#else
|
||||
#define X_TILT_FULCRUM X_HOME_POS
|
||||
#define Y_TILT_FULCRUM Y_HOME_POS
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -829,12 +825,12 @@
|
||||
// Is an endstop plug used for the Z2 endstop or the bed probe?
|
||||
#define IS_Z2_OR_PROBE(A,M) ( \
|
||||
(Z_MULTI_ENDSTOPS && Z2_USE_ENDSTOP == _##A##M##_) \
|
||||
|| (USES_Z_MIN_PROBE_ENDSTOP && Z_MIN_PROBE_PIN == A##_##M##_PIN ) )
|
||||
|| (HAS_CUSTOM_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN ) )
|
||||
|
||||
// Is an endstop plug used for the Z3 endstop or the bed probe?
|
||||
#define IS_Z3_OR_PROBE(A,M) ( \
|
||||
(ENABLED(Z_TRIPLE_ENDSTOPS) && Z3_USE_ENDSTOP == _##A##M##_) \
|
||||
|| (USES_Z_MIN_PROBE_ENDSTOP && Z_MIN_PROBE_PIN == A##_##M##_PIN ) )
|
||||
|| (HAS_CUSTOM_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN ) )
|
||||
|
||||
/**
|
||||
* Set ENDSTOPPULLUPS for active endstop switches
|
||||
@@ -1009,7 +1005,7 @@
|
||||
#define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
|
||||
#define HAS_Z3_MIN (PIN_EXISTS(Z3_MIN))
|
||||
#define HAS_Z3_MAX (PIN_EXISTS(Z3_MAX))
|
||||
#define HAS_Z_MIN_PROBE_PIN (USES_Z_MIN_PROBE_ENDSTOP && PIN_EXISTS(Z_MIN_PROBE))
|
||||
#define HAS_Z_MIN_PROBE_PIN (HAS_CUSTOM_PROBE_PIN && PIN_EXISTS(Z_MIN_PROBE))
|
||||
#define HAS_CALIBRATION_PIN (PIN_EXISTS(CALIBRATION))
|
||||
|
||||
// ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
|
||||
@@ -1067,7 +1063,7 @@
|
||||
#define WATCH_CHAMBER (HAS_HEATED_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0)
|
||||
|
||||
// Auto fans
|
||||
#define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
|
||||
#define HAS_AUTO_FAN_0 (HOTENDS > 0 && PIN_EXISTS(E0_AUTO_FAN))
|
||||
#define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
|
||||
#define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
|
||||
#define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN))
|
||||
@@ -1076,14 +1072,9 @@
|
||||
#define HAS_AUTO_CHAMBER_FAN (HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_AUTO_FAN))
|
||||
|
||||
#define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3 || HAS_AUTO_FAN_4 || HAS_AUTO_FAN_5 || HAS_AUTO_CHAMBER_FAN)
|
||||
#define _FANOVERLAP(A,B) (A##_AUTO_FAN_PIN == E##B##_AUTO_FAN_PIN)
|
||||
#if HAS_AUTO_FAN
|
||||
#define AUTO_CHAMBER_IS_0 (CHAMBER_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
|
||||
#define AUTO_CHAMBER_IS_1 (CHAMBER_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
|
||||
#define AUTO_CHAMBER_IS_2 (CHAMBER_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
|
||||
#define AUTO_CHAMBER_IS_3 (CHAMBER_AUTO_FAN_PIN == E3_AUTO_FAN_PIN)
|
||||
#define AUTO_CHAMBER_IS_4 (CHAMBER_AUTO_FAN_PIN == E4_AUTO_FAN_PIN)
|
||||
#define AUTO_CHAMBER_IS_5 (CHAMBER_AUTO_FAN_PIN == E5_AUTO_FAN_PIN)
|
||||
#define AUTO_CHAMBER_IS_E (AUTO_CHAMBER_IS_0 || AUTO_CHAMBER_IS_1 || AUTO_CHAMBER_IS_2 || AUTO_CHAMBER_IS_3 || AUTO_CHAMBER_IS_4 || AUTO_CHAMBER_IS_5)
|
||||
#define AUTO_CHAMBER_IS_E (_FANOVERLAP(CHAMBER,0) || _FANOVERLAP(CHAMBER,1) || _FANOVERLAP(CHAMBER,2) || _FANOVERLAP(CHAMBER,3) || _FANOVERLAP(CHAMBER,4) || _FANOVERLAP(CHAMBER,5))
|
||||
#endif
|
||||
|
||||
#if !HAS_AUTO_CHAMBER_FAN || AUTO_CHAMBER_IS_E
|
||||
@@ -1334,6 +1325,17 @@
|
||||
#define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MIN/MAX case light PWM scaling
|
||||
*/
|
||||
#if HAS_CASE_LIGHT
|
||||
#ifndef CASE_LIGHT_MAX_PWM
|
||||
#define CASE_LIGHT_MAX_PWM 255
|
||||
#elif !WITHIN(CASE_LIGHT_MAX_PWM, 1, 255)
|
||||
#error "CASE_LIGHT_MAX_PWM must be a value from 1 to 255."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Bed Probe dependencies
|
||||
*/
|
||||
@@ -1766,23 +1768,25 @@
|
||||
#define Z_STEPPER_COUNT 1
|
||||
#endif
|
||||
|
||||
// Get LCD character width/height, which may be overridden by pins, configs, etc.
|
||||
#ifndef LCD_WIDTH
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#define LCD_WIDTH 21
|
||||
#elif ENABLED(ULTIPANEL)
|
||||
#define LCD_WIDTH 20
|
||||
#elif HAS_SPI_LCD
|
||||
#define LCD_WIDTH 16
|
||||
#if HAS_SPI_LCD
|
||||
// Get LCD character width/height, which may be overridden by pins, configs, etc.
|
||||
#ifndef LCD_WIDTH
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#define LCD_WIDTH 21
|
||||
#elif ENABLED(ULTIPANEL)
|
||||
#define LCD_WIDTH 20
|
||||
#else
|
||||
#define LCD_WIDTH 16
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifndef LCD_HEIGHT
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#define LCD_HEIGHT 5
|
||||
#elif ENABLED(ULTIPANEL)
|
||||
#define LCD_HEIGHT 4
|
||||
#elif HAS_SPI_LCD
|
||||
#define LCD_HEIGHT 2
|
||||
#ifndef LCD_HEIGHT
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#define LCD_HEIGHT 5
|
||||
#elif ENABLED(ULTIPANEL)
|
||||
#define LCD_HEIGHT 4
|
||||
#else
|
||||
#define LCD_HEIGHT 2
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1804,3 +1808,10 @@
|
||||
#if !NUM_SERIAL
|
||||
#undef BAUD_RATE_GCODE
|
||||
#endif
|
||||
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
#undef Z_STEPPER_ALIGN_AMP
|
||||
#endif
|
||||
#ifndef Z_STEPPER_ALIGN_AMP
|
||||
#define Z_STEPPER_ALIGN_AMP 1.0
|
||||
#endif
|
||||
|
||||
@@ -34,9 +34,21 @@
|
||||
|
||||
#include "../core/boards.h"
|
||||
#include "../core/macros.h"
|
||||
#include "Version.h"
|
||||
#include "../../Configuration.h"
|
||||
|
||||
|
||||
#ifdef CUSTOM_VERSION_FILE
|
||||
#if defined(__has_include)
|
||||
#if __has_include(XSTR(../../CUSTOM_VERSION_FILE))
|
||||
#include XSTR(../../CUSTOM_VERSION_FILE)
|
||||
#endif
|
||||
#else
|
||||
#include XSTR(../../CUSTOM_VERSION_FILE)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "Version.h"
|
||||
|
||||
#include "Conditionals_LCD.h"
|
||||
#include HAL_PATH(../HAL, inc/Conditionals_LCD.h)
|
||||
|
||||
|
||||
@@ -74,7 +74,9 @@
|
||||
#elif defined(CUSTOM_MENDEL_NAME)
|
||||
#error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration."
|
||||
#elif defined(HAS_AUTOMATIC_VERSIONING)
|
||||
#error "HAS_AUTOMATIC_VERSIONING is now USE_AUTOMATIC_VERSIONING. Please update your configuration."
|
||||
#error "HAS_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE. Please update your configuration."
|
||||
#elif defined(USE_AUTOMATIC_VERSIONING)
|
||||
#error "USE_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE. Please update your configuration."
|
||||
#elif defined(SDSLOW)
|
||||
#error "SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead."
|
||||
#elif defined(SDEXTRASLOW)
|
||||
@@ -310,7 +312,7 @@
|
||||
#error "LEVEL_BED_CORNERS requires a LEVEL_CORNERS_INSET value. Please update your Configuration.h."
|
||||
#elif defined(BEZIER_JERK_CONTROL)
|
||||
#error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION. Please update your configuration."
|
||||
#elif defined(JUNCTION_DEVIATION_FACTOR)
|
||||
#elif DISABLED(CLASSIC_JERK) && defined(JUNCTION_DEVIATION_FACTOR)
|
||||
#error "JUNCTION_DEVIATION_FACTOR is now JUNCTION_DEVIATION_MM. Please update your configuration."
|
||||
#elif defined(JUNCTION_ACCELERATION_FACTOR)
|
||||
#error "JUNCTION_ACCELERATION_FACTOR is obsolete. Delete it from Configuration_adv.h."
|
||||
@@ -404,6 +406,8 @@
|
||||
#error "(MIN|MAX)_PROBE_[XY] are now calculated at runtime. Please remove them from Configuration.h."
|
||||
#elif defined(Z_STEPPER_ALIGN_X) || defined(Z_STEPPER_ALIGN_X)
|
||||
#error "Z_STEPPER_ALIGN_X and Z_STEPPER_ALIGN_Y are now combined as Z_STEPPER_ALIGN_XY. Please update your Configuration_adv.h."
|
||||
#elif defined(JUNCTION_DEVIATION)
|
||||
#error "JUNCTION_DEVIATION is no longer required. (See CLASSIC_JERK). Please remove it from Configuration.h."
|
||||
#endif
|
||||
|
||||
#define BOARD_MKS_13 -1000
|
||||
@@ -413,6 +417,7 @@
|
||||
#define BOARD_BIQU_SKR_V1_1 -1004
|
||||
#define BOARD_STM32F1R -1005
|
||||
#define BOARD_STM32F103R -1006
|
||||
#define BOARD_ESP32 -1007
|
||||
#if MB(MKS_13)
|
||||
#error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
|
||||
#elif MB(TRIGORILLA)
|
||||
@@ -427,6 +432,8 @@
|
||||
#error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
|
||||
#elif MB(STM32F103R)
|
||||
#error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
|
||||
#elif MOTHERBOARD == BOARD_ESP32
|
||||
#error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
|
||||
#endif
|
||||
#undef BOARD_MKS_13
|
||||
#undef BOARD_TRIGORILLA
|
||||
@@ -435,6 +442,7 @@
|
||||
#undef BOARD_BIQU_SKR_V1_1
|
||||
#undef BOARD_STM32F1R
|
||||
#undef BOARD_STM32F103R
|
||||
#undef BOARD_ESP32
|
||||
|
||||
/**
|
||||
* Marlin release, version and default string
|
||||
@@ -1040,10 +1048,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Junction deviation is not compatible with kinematic systems.
|
||||
* Junction deviation is incompatible with kinematic systems.
|
||||
*/
|
||||
#if ENABLED(JUNCTION_DEVIATION) && IS_KINEMATIC
|
||||
#error "Junction deviation is only compatible with Cartesians."
|
||||
#if DISABLED(CLASSIC_JERK) && IS_KINEMATIC
|
||||
#error "CLASSIC_JERK is required for DELTA and SCARA."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1270,7 +1278,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
#if DISABLED(JUNCTION_DEVIATION)
|
||||
#if HAS_CLASSIC_JERK
|
||||
static_assert(DEFAULT_ZJERK > 0.1, "Low DEFAULT_ZJERK values are incompatible with mesh-based leveling.");
|
||||
#endif
|
||||
#elif ENABLED(G26_MESH_VALIDATION)
|
||||
@@ -2327,11 +2335,24 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
||||
#endif
|
||||
|
||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||
|
||||
#if !Z_MULTI_STEPPER_DRIVERS
|
||||
#error "Z_STEPPER_AUTO_ALIGN requires Z_DUAL_STEPPER_DRIVERS or Z_TRIPLE_STEPPER_DRIVERS."
|
||||
#elif !HAS_BED_PROBE
|
||||
#error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
|
||||
#endif
|
||||
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
#if DISABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#error "Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS requires Z_TRIPLE_STEPPER_DRIVERS."
|
||||
#endif
|
||||
constexpr float sanity_arr_screw_xy[][2] = Z_STEPPER_ALIGN_STEPPER_XY;
|
||||
static_assert(
|
||||
COUNT(sanity_arr_screw_xy) == Z_STEPPER_COUNT,
|
||||
"Z_STEPPER_ALIGN_STEPPER_XY requires three {X,Y} entries (one per Z stepper)."
|
||||
);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(PRINTCOUNTER) && DISABLED(EEPROM_SETTINGS)
|
||||
@@ -2509,3 +2530,11 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
||||
#endif
|
||||
#undef _PIN_CONFLICT
|
||||
#endif
|
||||
|
||||
#if !HAS_GRAPHICAL_LCD
|
||||
#if ENABLED(PRINT_PROGRESS_SHOW_DECIMALS)
|
||||
#error "PRINT_PROGRESS_SHOW_DECIMALS currently requires a Graphical LCD."
|
||||
#elif ENABLED(SHOW_REMAINING_TIME)
|
||||
#error "SHOW_REMAINING_TIME currently requires a Graphical LCD."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+86
-61
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -21,77 +21,102 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../core/macros.h" // for ENABLED
|
||||
/**
|
||||
* Release version. Leave the Marlin version or apply a custom scheme.
|
||||
*/
|
||||
#ifndef SHORT_BUILD_VERSION
|
||||
#define SHORT_BUILD_VERSION "bugfix-2.0.x"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This file is the standard Marlin version identifier file.
|
||||
* Use -DUSE_AUTOMATIC_VERSIONING=1 and a custom _Version.h
|
||||
* to override these values.
|
||||
* Verbose version identifier containing a unique identifier, such as the
|
||||
* vendor name, download location, GitHub account, etc.
|
||||
*/
|
||||
#ifndef DETAILED_BUILD_VERSION
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (GitHub)"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2019-10-18"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Minimum Configuration.h and Configuration_adv.h file versions.
|
||||
* Set based on the release version number. Used to catch an attempt to use
|
||||
* older configurations. Override these if using a custom versioning scheme
|
||||
* to alert users to major changes.
|
||||
*/
|
||||
|
||||
#if ENABLED(USE_AUTOMATIC_VERSIONING)
|
||||
#define MARLIN_HEX_VERSION 020000
|
||||
#ifndef REQUIRED_CONFIGURATION_H_VERSION
|
||||
#define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
|
||||
#endif
|
||||
#ifndef REQUIRED_CONFIGURATION_ADV_H_VERSION
|
||||
#define REQUIRED_CONFIGURATION_ADV_H_VERSION MARLIN_HEX_VERSION
|
||||
#endif
|
||||
|
||||
#include "_Version.h"
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
#define SHORT_BUILD_VERSION "2.0_DW4"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
* from where the binary was downloaded or the source code was compiled.
|
||||
*/
|
||||
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
|
||||
|
||||
/**
|
||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define STRING_DISTRIBUTION_DATE "2019-10-05"
|
||||
|
||||
/**
|
||||
* Required minimum Configuration.h and Configuration_adv.h file versions.
|
||||
*
|
||||
* You must increment this version number for every significant change such as,
|
||||
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
|
||||
* the configuration files.
|
||||
*/
|
||||
#define REQUIRED_CONFIGURATION_H_VERSION 020000
|
||||
#define REQUIRED_CONFIGURATION_ADV_H_VERSION 020000
|
||||
|
||||
/**
|
||||
* The protocol for communication to the host. Protocol indicates communication
|
||||
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
|
||||
* (Other behaviors are given by the firmware version and capabilities report.)
|
||||
*/
|
||||
/**
|
||||
* The protocol for communication to the host. Protocol indicates communication
|
||||
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
|
||||
* (Other behaviors are given by the firmware version and capabilities report.)
|
||||
*/
|
||||
#ifndef PROTOCOL_VERSION
|
||||
#define PROTOCOL_VERSION "1.0"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
#define MACHINE_NAME "TM3D Creality"
|
||||
/**
|
||||
* Define a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
#ifndef MACHINE_NAME
|
||||
#define MACHINE_NAME "3D Printer"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||
* Code which is installed on the device. In most cases —unless the manufacturer
|
||||
* has a distinct Github fork— the Source Code URL should just be the main
|
||||
* Marlin repository.
|
||||
*/
|
||||
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/Creality_Marlin2.0.x"
|
||||
/**
|
||||
* Website where users can find Marlin source code for the binary installed on the
|
||||
* device. Override this if you provide public source code download. (GPLv3 requires
|
||||
* providing the source code to your customers.)
|
||||
*/
|
||||
#ifndef SOURCE_CODE_URL
|
||||
#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Default generic printer UUID.
|
||||
*/
|
||||
/**
|
||||
* Default generic printer UUID.
|
||||
*/
|
||||
#ifndef DEFAULT_MACHINE_UUID
|
||||
#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The WEBSITE_URL is the location where users can get more information such as
|
||||
* documentation about a specific Marlin release.
|
||||
* documentation about a specific Marlin release. Displayed in the Info Menu.
|
||||
*/
|
||||
#define WEBSITE_URL "tinymachines3d.com"
|
||||
#ifndef WEBSITE_URL
|
||||
#define WEBSITE_URL "http://marlinfw.org"
|
||||
#endif
|
||||
|
||||
#endif // USE_AUTOMATIC_VERSIONING
|
||||
/**
|
||||
* Set the vendor info the serial USB interface, if changable
|
||||
* Currently only supported by DUE platform
|
||||
*/
|
||||
#ifndef USB_DEVICE_VENDOR_ID
|
||||
#define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */
|
||||
#endif
|
||||
#ifndef USB_DEVICE_PRODUCT_ID
|
||||
#define USB_DEVICE_PRODUCT_ID 0x2424 /* MSC / CDC */
|
||||
#endif
|
||||
//! USB Device string definitions (Optional)
|
||||
#ifndef USB_DEVICE_MANUFACTURE_NAME
|
||||
#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
||||
#endif
|
||||
#ifdef CUSTOM_MACHINE_NAME
|
||||
#define USB_DEVICE_PRODUCT_NAME CUSTOM_MACHINE_NAME
|
||||
#else
|
||||
#define USB_DEVICE_PRODUCT_NAME MACHINE_NAME
|
||||
#endif
|
||||
#define USB_DEVICE_SERIAL_NAME "123985739853"
|
||||
|
||||
@@ -484,9 +484,9 @@ void MarlinUI::draw_kill_screen() {
|
||||
lcd_put_u8str(0, 0, status_message);
|
||||
lcd_uint_t y = 2;
|
||||
#if LCD_HEIGHT >= 4
|
||||
lcd_put_u8str_P(0, y++, PSTR(MSG_HALTED));
|
||||
lcd_put_u8str_P(0, y++, GET_TEXT(MSG_HALTED));
|
||||
#endif
|
||||
lcd_put_u8str_P(0, y, PSTR(MSG_PLEASE_RESET));
|
||||
lcd_put_u8str_P(0, y, GET_TEXT(MSG_PLEASE_RESET));
|
||||
}
|
||||
|
||||
//
|
||||
@@ -566,7 +566,7 @@ FORCE_INLINE void _draw_bed_status(const bool blink) {
|
||||
#if HAS_PRINT_PROGRESS
|
||||
|
||||
FORCE_INLINE void _draw_print_progress() {
|
||||
const uint8_t progress = ui.get_progress();
|
||||
const uint8_t progress = ui.get_progress_percent();
|
||||
lcd_put_u8str_P(PSTR(
|
||||
#if ENABLED(SDSUPPORT)
|
||||
"SD"
|
||||
@@ -613,7 +613,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
// Draw the progress bar if the message has shown long enough
|
||||
// or if there is no message set.
|
||||
if (ELAPSED(millis(), progress_bar_ms + PROGRESS_BAR_MSG_TIME) || !has_status()) {
|
||||
const uint8_t progress = get_progress();
|
||||
const uint8_t progress = get_progress_percent();
|
||||
if (progress > 2) return draw_progress_bar(progress);
|
||||
}
|
||||
|
||||
@@ -861,7 +861,7 @@ void MarlinUI::draw_status_screen() {
|
||||
uint16_t per;
|
||||
#if HAS_FAN0
|
||||
if (true
|
||||
#if EXTRUDERS
|
||||
#if EXTRUDERS && ENABLED(ADAPTIVE_FAN_SLOWING)
|
||||
&& (blink || thermalManager.fan_speed_scaler[0] < 128)
|
||||
#endif
|
||||
) {
|
||||
@@ -977,7 +977,7 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
#endif // ADVANCED_PAUSE_FEATURE
|
||||
|
||||
void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_CENTER*/, const char * const valstr/*=nullptr*/) {
|
||||
void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
int8_t n = LCD_WIDTH;
|
||||
lcd_moveto(0, row);
|
||||
if ((style & SS_CENTER) && !valstr) {
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
/**
|
||||
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
|
||||
* Contents will be REPLACED by future processing!
|
||||
* Use genallfont.sh to generate font data for updated languages.
|
||||
*/
|
||||
#include <U8glib.h>
|
||||
|
||||
const u8g_fntpgm_uint8_t fontpage_97_161_164[61] U8G_FONT_SECTION("fontpage_97_161_164") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa1,0xa4,0x00,0x06,0x00,0x00,
|
||||
0x00,0x04,0x04,0x04,0x06,0x00,0x00,0xf0,0x10,0x60,0x40,0x05,0x06,0x06,0x06,0x00,
|
||||
0x00,0xf8,0x08,0x28,0x30,0x20,0x40,0x03,0x04,0x04,0x06,0x01,0x00,0x20,0x40,0xc0,
|
||||
0x40,0x04,0x06,0x06,0x06,0x00,0x00,0x10,0x20,0x60,0xa0,0x20,0x20};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_166_166[29] U8G_FONT_SECTION("fontpage_97_166_166") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x06,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x20,0xf8,0x88,0x08,0x10,0x20};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_168_168[28] U8G_FONT_SECTION("fontpage_97_168_168") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa8,0xa8,0x00,0x05,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0xf8,0x20,0x20,0x20,0xf8};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_170_181[167] U8G_FONT_SECTION("fontpage_97_170_181") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xaa,0xb5,0x00,0x08,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x10,0xf8,0x30,0x50,0x90,0x10,0x05,0x06,0x06,
|
||||
0x06,0x00,0x00,0x40,0xf8,0x48,0x48,0x48,0x90,0x05,0x08,0x08,0x06,0x00,0x00,0x28,
|
||||
0x00,0x40,0xf8,0x48,0x48,0x48,0x90,0x05,0x06,0x06,0x06,0x00,0x00,0x20,0xf8,0x20,
|
||||
0xf8,0x20,0x20,0x05,0x08,0x08,0x06,0x00,0x00,0x28,0x00,0x20,0xf8,0x20,0xf8,0x20,
|
||||
0x20,0x04,0x05,0x05,0x06,0x00,0x00,0x70,0x90,0x10,0x20,0xc0,0x05,0x07,0x07,0x06,
|
||||
0x00,0x00,0x28,0x00,0x70,0x90,0x10,0x20,0xc0,0x05,0x06,0x06,0x06,0x00,0x00,0x40,
|
||||
0x78,0x90,0x10,0x10,0x20,0x05,0x08,0x08,0x06,0x00,0x00,0x28,0x00,0x40,0x78,0x90,
|
||||
0x10,0x10,0x20,0x05,0x05,0x05,0x06,0x00,0x00,0xf8,0x08,0x08,0x08,0xf8,0x05,0x07,
|
||||
0x07,0x06,0x00,0x00,0x28,0x00,0xf8,0x08,0x08,0x08,0xf8,0x05,0x06,0x06,0x06,0x00,
|
||||
0x00,0x50,0xf8,0x50,0x10,0x20,0x40};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_183_187[77] U8G_FONT_SECTION("fontpage_97_183_187") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xb7,0xbb,0x00,0x07,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0xc0,0x08,0xc8,0x10,0xe0,0x05,0x07,0x07,0x06,
|
||||
0x00,0x00,0x28,0x00,0xc0,0x08,0xc8,0x10,0xe0,0x05,0x05,0x05,0x06,0x00,0x00,0xf8,
|
||||
0x10,0x20,0x50,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x28,0x00,0xf8,0x10,0x20,0x50,
|
||||
0x88,0x05,0x06,0x06,0x06,0x00,0x00,0x40,0xf8,0x48,0x50,0x40,0x38};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_189_193[77] U8G_FONT_SECTION("fontpage_97_189_193") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xbd,0xc1,0x00,0x07,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0x48,0x10,0x60,0x05,0x07,0x07,0x06,
|
||||
0x00,0x00,0x28,0x00,0x88,0x88,0x48,0x10,0x60,0x05,0x05,0x05,0x06,0x00,0x00,0x78,
|
||||
0x48,0xa8,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x28,0x00,0x78,0x48,0xa8,0x10,
|
||||
0x60,0x05,0x06,0x06,0x06,0x00,0x00,0x10,0xe0,0x20,0xf8,0x20,0x40};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_195_196[38] U8G_FONT_SECTION("fontpage_97_195_196") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc3,0xc4,0x00,0x05,0x00,0x00,
|
||||
0x00,0x05,0x04,0x04,0x06,0x00,0x00,0xa8,0xa8,0x08,0x30,0x05,0x05,0x05,0x06,0x00,
|
||||
0x00,0xa8,0xa8,0x08,0x10,0x20};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_198_211[190] U8G_FONT_SECTION("fontpage_97_198_211") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc6,0xd3,0x00,0x08,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x00,0xf8,0x20,0x20,0x40,0x05,0x08,0x08,
|
||||
0x06,0x00,0x00,0x28,0x00,0x70,0x00,0xf8,0x20,0x20,0x40,0x03,0x06,0x06,0x06,0x01,
|
||||
0x00,0x80,0x80,0xc0,0xa0,0x80,0x80,0x04,0x08,0x08,0x06,0x01,0x00,0x50,0x00,0x80,
|
||||
0x80,0xc0,0xa0,0x80,0x80,0x05,0x06,0x06,0x06,0x00,0x00,0x20,0xf8,0x20,0x20,0x40,
|
||||
0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x00,0x00,0x00,0xf8,0x05,0x05,0x05,0x06,
|
||||
0x00,0x00,0xf8,0x08,0x50,0x20,0xd0,0x05,0x06,0x06,0x06,0x00,0x00,0x20,0xf8,0x10,
|
||||
0x20,0x70,0xa8,0x03,0x06,0x06,0x06,0x01,0x00,0x20,0x20,0x20,0x20,0x40,0x80,0x05,
|
||||
0x05,0x05,0x06,0x00,0x00,0x10,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,
|
||||
0x28,0x00,0x10,0x88,0x88,0x88,0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x18,0x18,0x00,
|
||||
0x10,0x88,0x88,0x88,0x88,0x05,0x06,0x06,0x06,0x00,0x00,0x80,0x80,0xf8,0x80,0x80,
|
||||
0x78,0x05,0x07,0x07,0x06,0x00,0x00,0x28,0x80,0x80,0xf8,0x80,0x80,0x78};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_213_217[77] U8G_FONT_SECTION("fontpage_97_213_217") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd5,0xd9,0x00,0x08,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0xf8,0x08,0x08,0x10,0x60,0x05,0x07,0x07,0x06,
|
||||
0x00,0x00,0x28,0x00,0xf8,0x08,0x08,0x10,0x60,0x05,0x08,0x08,0x06,0x00,0x00,0x18,
|
||||
0x18,0x00,0xf8,0x08,0x08,0x10,0x60,0x05,0x04,0x04,0x06,0x00,0x01,0x40,0xa0,0x10,
|
||||
0x08,0x05,0x06,0x06,0x06,0x00,0x01,0x28,0x00,0x40,0xa0,0x10,0x08};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_219_220[43] U8G_FONT_SECTION("fontpage_97_219_220") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdb,0xdc,0x00,0x08,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x20,0xf8,0x20,0xa8,0xa8,0x20,0x05,0x08,0x08,
|
||||
0x06,0x00,0x00,0x28,0x00,0x20,0xf8,0x20,0xa8,0xa8,0x20};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_222_223[39] U8G_FONT_SECTION("fontpage_97_222_223") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xde,0xdf,0x00,0x05,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0xf8,0x08,0x50,0x20,0x10,0x04,0x05,0x05,0x06,
|
||||
0x01,0x00,0xe0,0x00,0xe0,0x00,0xf0};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_225_226[39] U8G_FONT_SECTION("fontpage_97_225_226") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe1,0xe2,0x00,0x05,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x08,0x28,0x10,0x28,0xc0,0x05,0x05,0x05,0x06,
|
||||
0x00,0x00,0xf8,0x40,0xf8,0x40,0x38};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_228_229[39] U8G_FONT_SECTION("fontpage_97_228_229") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe4,0xe5,0x00,0x06,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x40,0xf8,0x48,0x50,0x40,0x40,0x04,0x04,0x04,
|
||||
0x06,0x00,0x00,0x60,0x20,0x20,0xf0};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_231_237[96] U8G_FONT_SECTION("fontpage_97_231_237") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe7,0xed,0x00,0x06,0x00,0x00,
|
||||
0x00,0x04,0x05,0x05,0x06,0x00,0x00,0xf0,0x10,0xf0,0x10,0xf0,0x05,0x05,0x05,0x06,
|
||||
0x00,0x00,0xf8,0x08,0xf8,0x08,0xf8,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x00,0xf8,
|
||||
0x08,0x10,0x20,0x04,0x06,0x06,0x06,0x00,0x00,0x90,0x90,0x90,0x90,0x10,0x20,0x05,
|
||||
0x05,0x05,0x06,0x00,0x00,0x20,0xa0,0xa8,0xa8,0xb0,0x04,0x05,0x05,0x06,0x00,0x00,
|
||||
0x80,0x80,0x90,0xa0,0xc0,0x05,0x05,0x05,0x06,0x00,0x00,0xf8,0x88,0x88,0x88,0xf8
|
||||
};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_242_243[39] U8G_FONT_SECTION("fontpage_97_242_243") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xf2,0xf3,0x00,0x05,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0xf8,0x08,0xf8,0x08,0x30,0x05,0x05,0x05,0x06,
|
||||
0x00,0x00,0xc0,0x08,0x08,0x10,0xe0};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_252_252[24] U8G_FONT_SECTION("fontpage_97_252_252") = {
|
||||
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x03,0x00,0x00,
|
||||
0x00,0x05,0x01,0x01,0x06,0x00,0x02,0xf8};
|
||||
|
||||
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
|
||||
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
|
||||
FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ'
|
||||
FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ'
|
||||
FONTDATA_ITEM(97, 168, 168, fontpage_97_168_168), // 'エ' -- 'エ'
|
||||
FONTDATA_ITEM(97, 170, 181, fontpage_97_170_181), // 'オ' -- 'サ'
|
||||
FONTDATA_ITEM(97, 183, 187, fontpage_97_183_187), // 'シ' -- 'セ'
|
||||
FONTDATA_ITEM(97, 189, 193, fontpage_97_189_193), // 'ソ' -- 'チ'
|
||||
FONTDATA_ITEM(97, 195, 196, fontpage_97_195_196), // 'ッ' -- 'ツ'
|
||||
FONTDATA_ITEM(97, 198, 211, fontpage_97_198_211), // 'テ' -- 'ビ'
|
||||
FONTDATA_ITEM(97, 213, 217, fontpage_97_213_217), // 'フ' -- 'ベ'
|
||||
FONTDATA_ITEM(97, 219, 220, fontpage_97_219_220), // 'ホ' -- 'ボ'
|
||||
FONTDATA_ITEM(97, 222, 223, fontpage_97_222_223), // 'マ' -- 'ミ'
|
||||
FONTDATA_ITEM(97, 225, 226, fontpage_97_225_226), // 'メ' -- 'モ'
|
||||
FONTDATA_ITEM(97, 228, 229, fontpage_97_228_229), // 'ヤ' -- 'ュ'
|
||||
FONTDATA_ITEM(97, 231, 237, fontpage_97_231_237), // 'ョ' -- 'ロ'
|
||||
FONTDATA_ITEM(97, 242, 243, fontpage_97_242_243), // 'ヲ' -- 'ン'
|
||||
FONTDATA_ITEM(97, 252, 252, fontpage_97_252_252), // 'ー' -- 'ー'
|
||||
};
|
||||
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
|
||||
* Contents will be REPLACED by future processing!
|
||||
* Use genallfont.sh to generate font data for updated languages.
|
||||
*/
|
||||
#include <U8glib.h>
|
||||
|
||||
const u8g_fntpgm_uint8_t fontpage_97_161_164[65] U8G_FONT_SECTION("fontpage_97_161_164") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa1,0xa4,0x00,0x07,0x00,0x00,
|
||||
0x00,0x04,0x05,0x05,0x06,0x00,0x00,0xf0,0x10,0x60,0x40,0x80,0x05,0x07,0x07,0x06,
|
||||
0x00,0x00,0xf8,0x08,0x28,0x30,0x20,0x20,0x40,0x04,0x05,0x05,0x06,0x00,0x00,0x10,
|
||||
0x20,0x60,0xa0,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x08,0x10,0x20,0x60,0xa0,0x20,
|
||||
0x20};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_166_166[30] U8G_FONT_SECTION("fontpage_97_166_166") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x07,0x00,0x00,
|
||||
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0xf8,0x88,0x88,0x08,0x10,0x60};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_168_168[29] U8G_FONT_SECTION("fontpage_97_168_168") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa8,0xa8,0x00,0x06,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x20,0x20,0x20,0x20,0xf8};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_170_187[268] U8G_FONT_SECTION("fontpage_97_170_187") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xaa,0xbb,0x00,0x0d,0x00,0x00,
|
||||
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0xf8,0x10,0x30,0x50,0x90,0x10,0x05,0x07,
|
||||
0x07,0x06,0x00,0x00,0x40,0xf8,0x48,0x48,0x48,0x48,0x98,0x05,0x09,0x09,0x06,0x00,
|
||||
0x00,0x28,0x08,0x40,0xf8,0x48,0x48,0x48,0x48,0x98,0x05,0x07,0x07,0x06,0x00,0x00,
|
||||
0x20,0xf8,0x20,0x20,0xf8,0x10,0x10,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x20,
|
||||
0xf8,0x20,0x20,0xf8,0x10,0x10,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x78,0x48,0x88,
|
||||
0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x40,0x78,0x48,0x88,0x08,
|
||||
0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0xf8,0x90,0x90,0x10,0x10,0x20,0x05,
|
||||
0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x80,0xf8,0x90,0x90,0x10,0x10,0x20,0x05,0x06,
|
||||
0x06,0x06,0x00,0x00,0xf8,0x08,0x08,0x08,0x08,0xf8,0x05,0x09,0x09,0x06,0x00,0x00,
|
||||
0x28,0x28,0x00,0xf8,0x08,0x08,0x08,0x08,0xf8,0x05,0x07,0x07,0x06,0x00,0x00,0x50,
|
||||
0xf8,0x50,0x50,0x50,0x10,0x20,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x50,0xf8,
|
||||
0x50,0x50,0x50,0x10,0x20,0x05,0x06,0x06,0x06,0x00,0x00,0xc0,0x08,0xc8,0x08,0x10,
|
||||
0xe0,0x07,0x0d,0x0d,0x06,0x00,0x00,0x02,0x00,0x00,0x00,0x28,0x28,0x00,0xc0,0x08,
|
||||
0xc8,0x08,0x10,0xe0,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x10,0x10,0x20,0x50,0x88,
|
||||
0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x70,0x10,0x10,0x20,0x50,0x88,0x05,
|
||||
0x07,0x07,0x06,0x00,0x00,0x40,0x40,0xf8,0x48,0x50,0x40,0x38};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_189_193[85] U8G_FONT_SECTION("fontpage_97_189_193") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xbd,0xc1,0x00,0x09,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x88,0x48,0x48,0x10,0x10,0x20,0x05,0x09,0x09,
|
||||
0x06,0x00,0x00,0x28,0x28,0x00,0x88,0x48,0x48,0x10,0x10,0x20,0x05,0x07,0x07,0x06,
|
||||
0x00,0x00,0x40,0x78,0x48,0xa8,0x18,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,
|
||||
0x08,0x40,0x78,0x48,0xa8,0x18,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0x60,
|
||||
0x20,0xf8,0x20,0x20,0x40};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_195_211[241] U8G_FONT_SECTION("fontpage_97_195_211") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xc3,0xd3,0x00,0x09,0x00,0x00,
|
||||
0x00,0x05,0x04,0x04,0x06,0x00,0x00,0xa8,0xa8,0x08,0x30,0x05,0x06,0x06,0x06,0x00,
|
||||
0x00,0xa8,0xa8,0xa8,0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,
|
||||
0xa8,0xa8,0xa8,0x08,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x00,0xf8,0x20,
|
||||
0x20,0x20,0x40,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x70,0x00,0xf8,0x20,0x20,
|
||||
0x20,0x40,0x04,0x07,0x07,0x06,0x01,0x00,0x80,0x80,0xc0,0xa0,0x90,0x80,0x80,0x04,
|
||||
0x09,0x09,0x06,0x01,0x00,0x50,0x10,0x80,0x80,0xc0,0xa0,0x90,0x80,0x80,0x05,0x07,
|
||||
0x07,0x06,0x00,0x00,0x20,0x20,0xf8,0x20,0x20,0x40,0x80,0x05,0x06,0x06,0x06,0x00,
|
||||
0x00,0x70,0x00,0x00,0x00,0x00,0xf8,0x05,0x06,0x06,0x06,0x00,0x00,0x78,0x08,0x28,
|
||||
0x10,0x28,0xc0,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x70,0x10,0x20,0x70,0xa8,0x20,
|
||||
0x03,0x06,0x06,0x06,0x01,0x00,0x20,0x20,0x20,0x40,0x40,0x80,0x05,0x06,0x06,0x06,
|
||||
0x00,0x00,0x10,0x50,0x50,0x48,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,
|
||||
0x00,0x10,0x50,0x50,0x48,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0x00,0x18,0x18,0x00,
|
||||
0x10,0x50,0x50,0x48,0x88,0x88,0x04,0x06,0x06,0x06,0x00,0x00,0x80,0x90,0xe0,0x80,
|
||||
0x80,0x70,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x80,0x90,0xe0,0x80,0x80,
|
||||
0x70};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_213_217[84] U8G_FONT_SECTION("fontpage_97_213_217") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd5,0xd9,0x00,0x09,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x08,0x08,0x08,0x10,0x60,0x05,0x09,0x09,
|
||||
0x06,0x00,0x00,0x28,0x28,0x00,0xf8,0x08,0x08,0x08,0x10,0x60,0x05,0x09,0x09,0x06,
|
||||
0x00,0x00,0x18,0x18,0x00,0xf8,0x08,0x08,0x08,0x10,0x60,0x05,0x05,0x05,0x06,0x00,
|
||||
0x01,0x60,0xa0,0x10,0x10,0x08,0x05,0x08,0x08,0x06,0x00,0x01,0x28,0x28,0x00,0x60,
|
||||
0xa0,0x10,0x10,0x08};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_219_220[45] U8G_FONT_SECTION("fontpage_97_219_220") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdb,0xdc,0x00,0x09,0x00,0x00,
|
||||
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0xf8,0x20,0xa8,0xa8,0xa8,0x20,0x05,0x09,
|
||||
0x09,0x06,0x00,0x00,0x28,0x08,0x20,0xf8,0x20,0xa8,0xa8,0xa8,0x20};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_222_223[41] U8G_FONT_SECTION("fontpage_97_222_223") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xde,0xdf,0x00,0x06,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x08,0x08,0x50,0x20,0x10,0x04,0x06,0x06,
|
||||
0x06,0x01,0x00,0xe0,0x00,0xe0,0x00,0xc0,0x30};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_225_237[174] U8G_FONT_SECTION("fontpage_97_225_237") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xe1,0xed,0x00,0x07,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x08,0x48,0x30,0x10,0x28,0xc0,0x05,0x06,0x06,
|
||||
0x06,0x00,0x00,0xf0,0x40,0xf8,0x40,0x40,0x38,0x05,0x05,0x05,0x06,0x00,0x00,0x40,
|
||||
0xf8,0x48,0x50,0x40,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x40,0xf8,0x48,0x50,0x40,
|
||||
0x40,0x04,0x05,0x05,0x06,0x00,0x00,0x60,0x20,0x20,0x20,0xf0,0x05,0x06,0x06,0x06,
|
||||
0x00,0x00,0x70,0x10,0x10,0x10,0x10,0xf8,0x04,0x05,0x05,0x06,0x00,0x00,0xf0,0x10,
|
||||
0xf0,0x10,0xf0,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x08,0xf8,0x08,0x08,0xf8,0x05,
|
||||
0x07,0x07,0x06,0x00,0x00,0x70,0x00,0xf8,0x08,0x08,0x10,0x60,0x04,0x07,0x07,0x06,
|
||||
0x00,0x00,0x10,0x90,0x90,0x90,0x90,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x20,
|
||||
0x20,0xa0,0xa0,0xa8,0xa8,0xb0,0x05,0x06,0x06,0x06,0x00,0x00,0x80,0x80,0x80,0x88,
|
||||
0xb0,0xc0,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x88,0x88,0x88,0x88,0xf8};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_242_243[41] U8G_FONT_SECTION("fontpage_97_242_243") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xf2,0xf3,0x00,0x06,0x00,0x00,
|
||||
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x08,0xf8,0x08,0x10,0x60,0x05,0x06,0x06,
|
||||
0x06,0x00,0x00,0xc0,0x08,0x08,0x08,0x10,0xe0};
|
||||
const u8g_fntpgm_uint8_t fontpage_97_252_252[25] U8G_FONT_SECTION("fontpage_97_252_252") = {
|
||||
0x00,0x0c,0x0f,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x05,0x00,0x00,
|
||||
0x00,0x05,0x02,0x02,0x06,0x00,0x03,0x80,0x78};
|
||||
|
||||
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
|
||||
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
|
||||
FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ'
|
||||
FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ'
|
||||
FONTDATA_ITEM(97, 168, 168, fontpage_97_168_168), // 'エ' -- 'エ'
|
||||
FONTDATA_ITEM(97, 170, 187, fontpage_97_170_187), // 'オ' -- 'セ'
|
||||
FONTDATA_ITEM(97, 189, 193, fontpage_97_189_193), // 'ソ' -- 'チ'
|
||||
FONTDATA_ITEM(97, 195, 211, fontpage_97_195_211), // 'ッ' -- 'ビ'
|
||||
FONTDATA_ITEM(97, 213, 217, fontpage_97_213_217), // 'フ' -- 'ベ'
|
||||
FONTDATA_ITEM(97, 219, 220, fontpage_97_219_220), // 'ホ' -- 'ボ'
|
||||
FONTDATA_ITEM(97, 222, 223, fontpage_97_222_223), // 'マ' -- 'ミ'
|
||||
FONTDATA_ITEM(97, 225, 237, fontpage_97_225_237), // 'メ' -- 'ロ'
|
||||
FONTDATA_ITEM(97, 242, 243, fontpage_97_242_243), // 'ヲ' -- 'ン'
|
||||
FONTDATA_ITEM(97, 252, 252, fontpage_97_252_252), // 'ー' -- 'ー'
|
||||
};
|
||||
@@ -99,6 +99,9 @@
|
||||
|
||||
#define STATUS_HEATERS_BOT (STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)
|
||||
|
||||
#define PROGRESS_BAR_X 54
|
||||
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
|
||||
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
#define SHOW_ON_STATE READ(X_MIN_PIN)
|
||||
#else
|
||||
@@ -257,7 +260,7 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
|
||||
|
||||
FORCE_INLINE void _draw_chamber_status(const bool blink) {
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
const float temp = 10 + (millis() >> 8) % CHAMBER_MAXTEMP,
|
||||
const float temp = 10 + (millis() >> 8) % CHAMBER_MAXTEMP,
|
||||
target = CHAMBER_MAXTEMP;
|
||||
#else
|
||||
const float temp = thermalManager.degChamber();
|
||||
@@ -330,6 +333,26 @@ void MarlinUI::draw_status_screen() {
|
||||
static char wstring[5], mstring[4];
|
||||
#endif
|
||||
|
||||
#if HAS_PRINT_PROGRESS
|
||||
#if DISABLED(DOGM_SD_PERCENT)
|
||||
#define _SD_DURATION_X(len) (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH) / 2 - (len) * (MENU_FONT_WIDTH) / 2)
|
||||
#else
|
||||
#define _SD_DURATION_X(len) (LCD_PIXEL_WIDTH - (len) * (MENU_FONT_WIDTH))
|
||||
#endif
|
||||
|
||||
static uint8_t progress_bar_solid_width = 0, lastProgress = 0;
|
||||
#if ENABLED(DOGM_SD_PERCENT)
|
||||
static char progress_string[5];
|
||||
#endif
|
||||
static uint8_t lastElapsed = 0, elapsed_x_pos = 0;
|
||||
static char elapsed_string[16];
|
||||
#if ENABLED(SHOW_REMAINING_TIME)
|
||||
#define SHOW_REMAINING_TIME_PREFIX 'E'
|
||||
static uint8_t estimation_x_pos = 0;
|
||||
static char estimation_string[10];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// At the first page, generate new display values
|
||||
if (first_page) {
|
||||
#if ANIM_HBC
|
||||
@@ -353,6 +376,50 @@ void MarlinUI::draw_status_screen() {
|
||||
strcpy(wstring, ftostr12ns(filwidth.measured_mm));
|
||||
strcpy(mstring, i16tostr3(planner.volumetric_percent(parser.volumetric_enabled)));
|
||||
#endif
|
||||
|
||||
// Progress / elapsed / estimation updates and string formatting to avoid float math on each LCD draw
|
||||
#if HAS_PRINT_PROGRESS
|
||||
const progress_t progress =
|
||||
#if HAS_PRINT_PROGRESS_PERMYRIAD
|
||||
get_progress_permyriad()
|
||||
#else
|
||||
get_progress_percent()
|
||||
#endif
|
||||
;
|
||||
duration_t elapsed = print_job_timer.duration();
|
||||
const uint8_t p = progress & 0xFF, ev = elapsed.value & 0xFF;
|
||||
if (progress > 1 && p != lastProgress) {
|
||||
lastProgress = p;
|
||||
|
||||
progress_bar_solid_width = uint8_t((PROGRESS_BAR_WIDTH - 2) * progress / (PROGRESS_SCALE) * 0.01f);
|
||||
|
||||
#if ENABLED(DOGM_SD_PERCENT)
|
||||
strcpy(progress_string, (
|
||||
#if ENABLED(PRINT_PROGRESS_SHOW_DECIMALS)
|
||||
permyriadtostr4(progress)
|
||||
#else
|
||||
ui8tostr3(progress / (PROGRESS_SCALE))
|
||||
#endif
|
||||
));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ev != lastElapsed) {
|
||||
lastElapsed = ev;
|
||||
const bool has_days = (elapsed.value >= 60*60*24L);
|
||||
const uint8_t len = elapsed.toDigital(elapsed_string, has_days);
|
||||
elapsed_x_pos = _SD_DURATION_X(len);
|
||||
|
||||
#if ENABLED(SHOW_REMAINING_TIME)
|
||||
if (!(ev & 0x3)) {
|
||||
duration_t estimation = elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress;
|
||||
const bool has_days = (estimation.value >= 60*60*24L);
|
||||
const uint8_t len = estimation.toDigital(estimation_string, has_days);
|
||||
estimation_x_pos = _SD_DURATION_X(len + 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const bool blink = get_blink();
|
||||
@@ -485,55 +552,44 @@ void MarlinUI::draw_status_screen() {
|
||||
//
|
||||
// Progress bar frame
|
||||
//
|
||||
#define PROGRESS_BAR_X 54
|
||||
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
|
||||
|
||||
if (PAGE_CONTAINS(49, 52))
|
||||
u8g.drawFrame(PROGRESS_BAR_X, 49, PROGRESS_BAR_WIDTH, 4);
|
||||
|
||||
const uint8_t progress = get_progress();
|
||||
//
|
||||
// Progress bar solid part
|
||||
//
|
||||
|
||||
if (progress > 1) {
|
||||
if (PAGE_CONTAINS(50, 51)) // 50-51 (or just 50)
|
||||
u8g.drawBox(PROGRESS_BAR_X + 1, 50, progress_bar_solid_width, 2);
|
||||
|
||||
//
|
||||
// Progress bar solid part
|
||||
//
|
||||
//
|
||||
// SD Percent Complete
|
||||
//
|
||||
|
||||
if (PAGE_CONTAINS(50, 51)) // 50-51 (or just 50)
|
||||
u8g.drawBox(
|
||||
PROGRESS_BAR_X + 1, 50,
|
||||
(uint16_t)((PROGRESS_BAR_WIDTH - 2) * progress * 0.01), 2
|
||||
);
|
||||
|
||||
//
|
||||
// SD Percent Complete
|
||||
//
|
||||
|
||||
#if ENABLED(DOGM_SD_PERCENT)
|
||||
#if ENABLED(DOGM_SD_PERCENT)
|
||||
if (progress_string[0] != '\0')
|
||||
if (PAGE_CONTAINS(41, 48)) {
|
||||
// Percent complete
|
||||
lcd_put_u8str(55, 48, ui8tostr3(progress));
|
||||
lcd_put_u8str(55, 48, progress_string);
|
||||
lcd_put_wchar('%');
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Elapsed Time
|
||||
//
|
||||
|
||||
#if DISABLED(DOGM_SD_PERCENT)
|
||||
#define SD_DURATION_X (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH / 2) - len * (MENU_FONT_WIDTH / 2))
|
||||
#else
|
||||
#define SD_DURATION_X (LCD_PIXEL_WIDTH - len * MENU_FONT_WIDTH)
|
||||
#endif
|
||||
|
||||
if (PAGE_CONTAINS(EXTRAS_BASELINE - INFO_FONT_ASCENT, EXTRAS_BASELINE - 1)) {
|
||||
char buffer[13];
|
||||
duration_t elapsed = print_job_timer.duration();
|
||||
bool has_days = (elapsed.value >= 60*60*24L);
|
||||
uint8_t len = elapsed.toDigital(buffer, has_days);
|
||||
lcd_put_u8str(SD_DURATION_X, EXTRAS_BASELINE, buffer);
|
||||
|
||||
#if ENABLED(SHOW_REMAINING_TIME)
|
||||
if (blink && (estimation_string[0] != '\0')) {
|
||||
lcd_put_wchar(estimation_x_pos, EXTRAS_BASELINE, SHOW_REMAINING_TIME_PREFIX);
|
||||
lcd_put_u8str(estimation_string);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string);
|
||||
}
|
||||
|
||||
#endif // HAS_PRINT_PROGRESS
|
||||
|
||||
@@ -850,7 +850,7 @@ void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) {
|
||||
// when an update is actually necessary.
|
||||
|
||||
static uint8_t last_progress = 0;
|
||||
const uint8_t progress = ui.get_progress();
|
||||
const uint8_t progress = ui.get_progress_percent();
|
||||
if (forceUpdate || last_progress != progress) {
|
||||
last_progress = progress;
|
||||
draw_progress_bar(progress);
|
||||
|
||||
@@ -300,8 +300,8 @@ void MarlinUI::draw_kill_screen() {
|
||||
do {
|
||||
set_font(FONT_MENU);
|
||||
lcd_put_u8str(0, h4 * 1, status_message);
|
||||
lcd_put_u8str_P(0, h4 * 2, PSTR(MSG_HALTED));
|
||||
lcd_put_u8str_P(0, h4 * 3, PSTR(MSG_PLEASE_RESET));
|
||||
lcd_put_u8str_P(0, h4 * 2, GET_TEXT(MSG_HALTED));
|
||||
lcd_put_u8str_P(0, h4 * 3, GET_TEXT(MSG_PLEASE_RESET));
|
||||
} while (u8g.nextPage());
|
||||
}
|
||||
|
||||
@@ -363,9 +363,9 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
}
|
||||
|
||||
// Draw a static line of text in the same idiom as a menu item
|
||||
void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_CENTER*/, const char * const valstr/*=nullptr*/) {
|
||||
void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
|
||||
if (mark_as_selected(row, (style & SS_INVERT))) {
|
||||
if (mark_as_selected(row, style & SS_INVERT)) {
|
||||
|
||||
u8g_uint_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
// MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller
|
||||
|
||||
#define SMART_RAMPS (MB(RAMPS_SMART_EFB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_SMART_EFF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_SMART_SF))
|
||||
#define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF)
|
||||
#define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI)
|
||||
#if SMART_RAMPS || DOGLCD_SCK != SCK_PIN || DOGLCD_MOSI != MOSI_PIN
|
||||
#define FORCE_SOFT_SPI // SW-SPI
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
||||
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
|
||||
#define CPU_ST7920_DELAY_3 DELAY_NS(50)
|
||||
#elif MB(3DRAG) || MB(K8200) || MB(K8400) || MB(SILVER_GATE)
|
||||
#elif MB(3DRAG, K8200, K8400, SILVER_GATE)
|
||||
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
||||
#define CPU_ST7920_DELAY_2 DELAY_NS(188)
|
||||
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
|
||||
#elif MB(MINIRAMBO) || MB(EINSY_RAMBO) || MB(EINSY_RETRO)
|
||||
#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO)
|
||||
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
||||
#define CPU_ST7920_DELAY_2 DELAY_NS(250)
|
||||
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,177 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "string.h"
|
||||
#include <Arduino.h>
|
||||
#include "../ui_api.h"
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
namespace ExtUI {
|
||||
/*********************************/
|
||||
#define FHONE (0x5A)
|
||||
#define FHTWO (0xA5)
|
||||
#define TEXTBYTELEN 18
|
||||
#define MaxFileNumber 20// 16
|
||||
|
||||
#define CEIconGrap 12
|
||||
#define FileNum MaxFileNumber
|
||||
#define FileNameLen TEXTBYTELEN
|
||||
|
||||
#define SizeofDatabuf 26
|
||||
|
||||
/*************Register and Variable addr*****************/
|
||||
#define RegAddr_W 0x80
|
||||
#define RegAddr_R 0x81
|
||||
#define VarAddr_W 0x82
|
||||
#define VarAddr_R 0x83
|
||||
#define ExchangePageBase (unsigned long)0x5A010000 //the first page ID. other page = first page ID + relevant num;
|
||||
#define StartSoundSet ((unsigned long)0x060480A0) // 06,start-music; 04, 4 musics; 80, the volume value; 04, return value about music number.
|
||||
#define FONT_EEPROM 90
|
||||
#define AutoLeve_EEPROM 100
|
||||
#define FanOn 255
|
||||
#define FanOff 0
|
||||
|
||||
/*variable addr*/
|
||||
#define ExchangepageAddr 0x0084
|
||||
#define SoundAddr 0x00A0
|
||||
#define StartIcon 0x1000
|
||||
#define FeedrateDisplay 0x1006
|
||||
#define Stopprint 0x1008
|
||||
#define Pauseprint 0x100A
|
||||
#define Resumeprint 0x100C
|
||||
#define PrintscheduleIcon 0x100E
|
||||
#define Timehour 0x1010
|
||||
#define Timemin 0x1012
|
||||
#define IconPrintstatus 0x1014
|
||||
#define Percentage 0x1016
|
||||
#define FanKeyIcon 0x101E
|
||||
|
||||
#define HeatPercentIcon 0x1024
|
||||
|
||||
#define NzBdSet 0x1032
|
||||
#define NozzlePreheat 0x1034
|
||||
#define NozzleTemp 0x1036
|
||||
#define BedPreheat 0x103A
|
||||
#define Bedtemp 0x103C
|
||||
|
||||
#define AutoZeroIcon 0x1042
|
||||
#define AutoLevelIcon 0x1045
|
||||
#define AutoZero 0x1046
|
||||
#define DisplayXaxis 0x1048
|
||||
#define DisplayYaxis 0x104A
|
||||
#define DisplayZaxis 0x104C
|
||||
|
||||
#define FilementUnit1 0x1054
|
||||
#define Exchfilement 0x1056
|
||||
#define FilementUnit2 0x1058
|
||||
|
||||
#define MacVersion 0x1060
|
||||
#define SoftVersion 0x106A
|
||||
#define PrinterSize 0x1074
|
||||
#define CorpWebsite 0x107E
|
||||
#define VolumeIcon 0x108A
|
||||
#define SoundIcon 0x108C
|
||||
#define AutolevelIcon 0x108D
|
||||
#define ExchFlmntIcon 0x108E
|
||||
#define AutolevelVal 0x1100
|
||||
|
||||
#define FilenameIcon 0x1200
|
||||
#define FilenameIcon1 0x1220
|
||||
#define Printfilename 0x2000
|
||||
#define SDFILE_ADDR 0x200A
|
||||
#define FilenamePlay 0x20D2
|
||||
#define FilenameChs 0x20D3
|
||||
#define Choosefilename 0x20D4
|
||||
#define FilenameCount 0x20DE
|
||||
#define FilenameNature 0x6003
|
||||
/************struct**************/
|
||||
|
||||
typedef struct DataBuf
|
||||
{
|
||||
unsigned char len;
|
||||
unsigned char head[2];
|
||||
unsigned char command;
|
||||
unsigned long addr;
|
||||
unsigned long bytelen;
|
||||
unsigned short data[32];
|
||||
unsigned char reserv[4];
|
||||
} DB;
|
||||
|
||||
typedef struct CardRecord
|
||||
{
|
||||
char recordcount;
|
||||
int Filesum;
|
||||
unsigned long addr[FileNum];
|
||||
char Cardshowfilename[FileNum][FileNameLen];
|
||||
char Cardfilename[FileNum][FileNameLen];
|
||||
}CRec;
|
||||
|
||||
class RTSSHOW {
|
||||
public:
|
||||
RTSSHOW();
|
||||
int RTS_RecData();
|
||||
void RTS_SDCardInit(void);
|
||||
void RTS_SDCardUpate(bool, bool);
|
||||
int RTS_CheckFilement(int);
|
||||
void RTS_SndData(void);
|
||||
void RTS_SndData(const String &, unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(const char[], unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(char, unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(unsigned char*, unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(int, unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(float, unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(unsigned int,unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(long,unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SndData(unsigned long,unsigned long, unsigned char = VarAddr_W);
|
||||
void RTS_SDcard_Stop();
|
||||
void RTS_HandleData();
|
||||
void RTS_Init();
|
||||
|
||||
DB recdat;
|
||||
DB snddat;
|
||||
unsigned char databuf[SizeofDatabuf];
|
||||
};
|
||||
|
||||
static RTSSHOW rtscheck;
|
||||
|
||||
#define Addvalue 3
|
||||
#define PrintChoice_Value (0+Addvalue)
|
||||
#define Zoffset_Value (3+Addvalue)
|
||||
#define Setting_Value (8+Addvalue)
|
||||
#define XYZEaxis_Value (12+Addvalue)
|
||||
#define Filement_Value (15+Addvalue)
|
||||
#define Language_Value (18+Addvalue)
|
||||
#define Filename_Value (22+Addvalue)
|
||||
|
||||
enum PROC_COM {Printfile=0,Ajust,Feedrate,PrintChoice=PrintChoice_Value,Zoffset=Zoffset_Value,TempControl,ManualSetTemp,Setting=Setting_Value,
|
||||
ReturnBack,Bedlevel,Autohome,XYZEaxis=XYZEaxis_Value,Filement=Filement_Value,LanguageChoice=Language_Value,No_Filement,PwrOffNoF,Volume,Filename=Filename_Value};
|
||||
|
||||
const unsigned long Addrbuf[] = {0x1002, 0x1004, 0x1006, 0x1008, 0x100A, 0x100C, 0x1026, 0x1030, 0x1032, 0x1034, 0x103A,
|
||||
0x103E, 0x1040, 0x1044, 0x1046, 0x1048, 0x104A, 0x104C, 0x1054, 0x1056, 0x1058,
|
||||
0x105C, 0x105E, 0x105F, 0x1088, 0};
|
||||
|
||||
extern void RTSUpdate();
|
||||
extern void RTSInit();
|
||||
|
||||
extern char waitway;
|
||||
extern char CardCheckStatus[2];
|
||||
extern bool InforShowStatus;
|
||||
extern unsigned char AxisPagenum;
|
||||
extern bool AutohomeKey;
|
||||
extern bool TPShowStatus;
|
||||
extern int Update_Time_Value;
|
||||
extern bool PoweroffContinue;
|
||||
extern char FilementStatus[2];
|
||||
extern char commandbuf[30];
|
||||
|
||||
extern int temphot;
|
||||
extern int tempbed;
|
||||
extern float pause_z;
|
||||
extern char PrintStatue[2];
|
||||
extern char PrinterStatusKey[2];
|
||||
extern uint8_t progress_bar_percent;
|
||||
extruder_t original_extruder;
|
||||
float targetPos;
|
||||
}
|
||||
#ifndef USER_GCODE_1
|
||||
#define USER_GCODE_1 "G28"
|
||||
#endif
|
||||
#endif
|
||||
@@ -289,11 +289,11 @@ void DGUSScreenVariableHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable
|
||||
|
||||
// Don't let the user in the dark why there is no reaction.
|
||||
if (!ExtUI::isMediaInserted()) {
|
||||
setstatusmessagePGM(PSTR(MSG_NO_MEDIA));
|
||||
setstatusmessagePGM(GET_TEXT(MSG_NO_MEDIA));
|
||||
return;
|
||||
}
|
||||
if (card.flag.abort_sd_printing) {
|
||||
setstatusmessagePGM(PSTR(MSG_MEDIA_ABORTING));
|
||||
setstatusmessagePGM(GET_TEXT(MSG_MEDIA_ABORTING));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -472,13 +472,13 @@ void DGUSScreenVariableHandler::HandleTemperatureChanged(DGUS_VP_Variable &var,
|
||||
switch (var.VP) {
|
||||
default: return;
|
||||
#if HOTENDS >= 1
|
||||
case VP_T_E1_Set:
|
||||
case VP_T_E0_Set:
|
||||
thermalManager.setTargetHotend(newvalue, 0);
|
||||
acceptedvalue = thermalManager.temp_hotend[0].target;
|
||||
break;
|
||||
#endif
|
||||
#if HOTENDS >= 2
|
||||
case VP_T_E2_Set:
|
||||
case VP_T_E1_Set:
|
||||
thermalManager.setTargetHotend(newvalue, 1);
|
||||
acceptedvalue = thermalManager.temp_hotend[1].target;
|
||||
break;
|
||||
@@ -503,10 +503,10 @@ void DGUSScreenVariableHandler::HandleFlowRateChanged(DGUS_VP_Variable &var, voi
|
||||
switch (var.VP) {
|
||||
default: return;
|
||||
#if (HOTENDS >= 1)
|
||||
case VP_Flowrate_E1: target_extruder = 0; break;
|
||||
case VP_Flowrate_E0: target_extruder = 0; break;
|
||||
#endif
|
||||
#if (HOTENDS >= 2)
|
||||
case VP_Flowrate_E2: target_extruder = 1; break;
|
||||
case VP_Flowrate_E1: target_extruder = 1; break;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -526,11 +526,11 @@ void DGUSScreenVariableHandler::HandleManualExtrude(DGUS_VP_Variable &var, void
|
||||
ExtUI::extruder_t target_extruder;
|
||||
|
||||
switch (var.VP) {
|
||||
#if HOTENDS >=1
|
||||
case VP_MOVE_E1: target_extruder = ExtUI::extruder_t::E0; break;
|
||||
#if HOTENDS >= 1
|
||||
case VP_MOVE_E0: target_extruder = ExtUI::extruder_t::E0; break;
|
||||
#endif
|
||||
#if HOTENDS >=2
|
||||
case VP_MOVE_E2: target_extruder = ExtUI::extruder_t::E1; break
|
||||
#if HOTENDS >= 2
|
||||
case VP_MOVE_E1: target_extruder = ExtUI::extruder_t::E1; break
|
||||
#endif
|
||||
default: return;
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ const uint16_t VPList_Main[] PROGMEM = {
|
||||
|
||||
const uint16_t VPList_Temp[] PROGMEM = {
|
||||
#if HOTENDS >= 1
|
||||
VP_T_E1_Is, VP_T_E1_Set,
|
||||
VP_T_E0_Is, VP_T_E0_Set,
|
||||
#endif
|
||||
#if HOTENDS >= 2
|
||||
VP_T_E2_I, VP_T_E2_S,
|
||||
VP_T_E1_I, VP_T_E1_S,
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
VP_T_Bed_Is, VP_T_Bed_Set,
|
||||
@@ -60,10 +60,10 @@ const uint16_t VPList_Temp[] PROGMEM = {
|
||||
const uint16_t VPList_Status[] PROGMEM = {
|
||||
/* VP_M117, for completeness, but it cannot be auto-uploaded */
|
||||
#if HOTENDS >= 1
|
||||
VP_T_E1_Is, VP_T_E1_Set,
|
||||
VP_T_E0_Is, VP_T_E0_Set,
|
||||
#endif
|
||||
#if HOTENDS >= 2
|
||||
VP_T_E2_I, VP_T_E2_S,
|
||||
VP_T_E1_I, VP_T_E1_S,
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
VP_T_Bed_Is, VP_T_Bed_Set,
|
||||
@@ -81,10 +81,10 @@ const uint16_t VPList_Status[] PROGMEM = {
|
||||
const uint16_t VPList_Status2[] PROGMEM = {
|
||||
/* VP_M117, for completeness, but it cannot be auto-uploaded */
|
||||
#if HOTENDS >= 1
|
||||
VP_Flowrate_E1,
|
||||
VP_Flowrate_E0,
|
||||
#endif
|
||||
#if HOTENDS >= 2
|
||||
VP_Flowrate_E2,
|
||||
VP_Flowrate_E1,
|
||||
#endif
|
||||
VP_PrintProgress_Percentage,
|
||||
VP_PrintTime,
|
||||
@@ -107,7 +107,7 @@ const uint16_t VPList_FanAndFeedrate[] PROGMEM = {
|
||||
};
|
||||
|
||||
const uint16_t VPList_SD_FlowRates[] PROGMEM = {
|
||||
VP_Flowrate_E1, VP_Flowrate_E2,
|
||||
VP_Flowrate_E0, VP_Flowrate_E1,
|
||||
0x0000
|
||||
};
|
||||
|
||||
@@ -166,17 +166,17 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
|
||||
|
||||
// Temperature Data
|
||||
#if HOTENDS >= 1
|
||||
VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[0].celsius, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<0>),
|
||||
VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[0].target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_Flowrate_E1, nullptr, DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<0>),
|
||||
VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_Flowrate_E0, nullptr, DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_EPos, &destination.e, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>),
|
||||
VPHELPER(VP_MOVE_E1, nullptr, &DGUSScreenVariableHandler::HandleManualExtrude, nullptr),
|
||||
VPHELPER(VP_MOVE_E0, nullptr, &DGUSScreenVariableHandler::HandleManualExtrude, nullptr),
|
||||
#endif
|
||||
#if HOTENDS >= 2
|
||||
VPHELPER(VP_T_E2_I, &thermalManager.temp_hotend[1].celsius, nullptr, DGUSLCD_SendFloatAsLongValueToDisplay<0>),
|
||||
VPHELPER(VP_T_E2_S, &thermalManager.temp_hotend[1].target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_Flowrate_E2, nullptr, DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_MOVE_E2, nullptr, &DGUSScreenVariableHandler::HandleManualExtrude, nullptr),
|
||||
VPHELPER(VP_T_E1_I, &thermalManager.temp_hotend[1].celsius, nullptr, DGUSLCD_SendFloatAsLongValueToDisplay<0>),
|
||||
VPHELPER(VP_T_E1_S, &thermalManager.temp_hotend[1].target, DGUSScreenVariableHandler::HandleTemperatureChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_Flowrate_E1, nullptr, DGUSScreenVariableHandler::HandleFlowRateChanged, &DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay),
|
||||
VPHELPER(VP_MOVE_E1, nullptr, &DGUSScreenVariableHandler::HandleManualExtrude, nullptr),
|
||||
#endif
|
||||
#if HOTENDS >= 3
|
||||
#error More than 2 Hotends currently not implemented on the Display UI design.
|
||||
@@ -200,7 +200,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
|
||||
VPHELPER(VP_ZPos, ¤t_position.z, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendFloatAsLongValueToDisplay<2>),
|
||||
|
||||
// Print Progress.
|
||||
VPHELPER(VP_PrintProgress_Percentage, &ui.progress_bar_percent, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay ),
|
||||
VPHELPER(VP_PrintProgress_Percentage, &ui.progress_override, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendWordValueToDisplay ),
|
||||
|
||||
// Print Time
|
||||
VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, DGUSScreenVariableHandler::DGUSLCD_SendPrintTimeToDisplay ),
|
||||
|
||||
@@ -109,12 +109,12 @@ constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmati
|
||||
constexpr uint16_t VP_MOVE_X = 0x2100;
|
||||
constexpr uint16_t VP_MOVE_Y = 0x2102;
|
||||
constexpr uint16_t VP_MOVE_Z = 0x2104;
|
||||
constexpr uint16_t VP_MOVE_E1 = 0x2110;
|
||||
constexpr uint16_t VP_MOVE_E2 = 0x2112;
|
||||
//constexpr uint16_t VP_MOVE_E3 = 0x2114;
|
||||
//constexpr uint16_t VP_MOVE_E4 = 0x2116;
|
||||
//constexpr uint16_t VP_MOVE_E5 = 0x2118;
|
||||
//constexpr uint16_t VP_MOVE_E6 = 0x211A;
|
||||
constexpr uint16_t VP_MOVE_E0 = 0x2110;
|
||||
constexpr uint16_t VP_MOVE_E1 = 0x2112;
|
||||
//constexpr uint16_t VP_MOVE_E2 = 0x2114;
|
||||
//constexpr uint16_t VP_MOVE_E3 = 0x2116;
|
||||
//constexpr uint16_t VP_MOVE_E4 = 0x2118;
|
||||
//constexpr uint16_t VP_MOVE_E5 = 0x211A;
|
||||
constexpr uint16_t VP_HOME_ALL = 0x2120;
|
||||
|
||||
// Firmware version on the boot screen.
|
||||
@@ -126,34 +126,34 @@ constexpr uint16_t VP_M117 = 0x3020;
|
||||
constexpr uint8_t VP_M117_LEN = 0x20;
|
||||
|
||||
// Temperatures.
|
||||
constexpr uint16_t VP_T_E1_Is = 0x3060; // 4 Byte Integer
|
||||
constexpr uint16_t VP_T_E1_Set = 0x3062; // 2 Byte Integer
|
||||
constexpr uint16_t VP_T_E2_Is = 0x3064; // 4 Byte Integer
|
||||
constexpr uint16_t VP_T_E0_Is = 0x3060; // 4 Byte Integer
|
||||
constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
|
||||
constexpr uint16_t VP_T_E1_Is = 0x3064; // 4 Byte Integer
|
||||
|
||||
// reserved to support up to 6 Extruders:
|
||||
//constexpr uint16_t VP_T_E2_Set = 0x3066; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E3_Is = 0x3068; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E3_Set = 0x306A; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E4_Is = 0x306C; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E4_Set = 0x306E; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E5_Is = 0x3070; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E5_Set = 0x3072; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E5_Is = 0x3074; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E5_Set = 0x3076; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E6_Is = 0x3078; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E6_Set = 0x307A; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E2_Is = 0x3068; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E3_Is = 0x306C; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E4_Is = 0x3070; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E4_Is = 0x3074; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
|
||||
//constexpr uint16_t VP_T_E5_Is = 0x3078; // 4 Byte Integer
|
||||
//constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
|
||||
|
||||
constexpr uint16_t VP_T_Bed_Is = 0x3080; // 4 Byte Integer
|
||||
constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
|
||||
|
||||
constexpr uint16_t VP_Flowrate_E1 = 0x3090; // 2 Byte Integer
|
||||
constexpr uint16_t VP_Flowrate_E2 = 0x3092; // 2 Byte Integer
|
||||
constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
|
||||
constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
|
||||
|
||||
// reserved for up to 6 Extruders:
|
||||
//constexpr uint16_t VP_Flowrate_E3 = 0x3094;
|
||||
//constexpr uint16_t VP_Flowrate_E4 = 0x3096;
|
||||
//constexpr uint16_t VP_Flowrate_E5 = 0x3098;
|
||||
//constexpr uint16_t VP_Flowrate_E6 = 0x309A;
|
||||
//constexpr uint16_t VP_Flowrate_E2 = 0x3094;
|
||||
//constexpr uint16_t VP_Flowrate_E3 = 0x3096;
|
||||
//constexpr uint16_t VP_Flowrate_E4 = 0x3098;
|
||||
//constexpr uint16_t VP_Flowrate_E5 = 0x309A;
|
||||
|
||||
constexpr uint16_t VP_Fan_Percentage = 0x3100; // 2 Byte Integer (0..100)
|
||||
constexpr uint16_t VP_Feedrate_Percentage = 0x3102; // 2 Byte Integer (0..100)
|
||||
@@ -182,9 +182,9 @@ constexpr uint16_t VP_SD_FileName4 = 0x3280;
|
||||
// located at 0x5000 and up
|
||||
// Not used yet!
|
||||
// This can be used e.g to make controls / data display invisible
|
||||
constexpr uint16_t SP_T_E1_Is = 0x5000;
|
||||
constexpr uint16_t SP_T_E1_Set = 0x5010;
|
||||
constexpr uint16_t SP_T_E2_Is = 0x5020;
|
||||
constexpr uint16_t SP_T_E0_Is = 0x5000;
|
||||
constexpr uint16_t SP_T_E0_Set = 0x5010;
|
||||
constexpr uint16_t SP_T_E1_Is = 0x5020;
|
||||
constexpr uint16_t SP_T_Bed_Is = 0x5030;
|
||||
constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
||||
|
||||
|
||||
@@ -38,11 +38,6 @@
|
||||
// __MARLIN_FIRMWARE__ exists when compiled within Marlin.
|
||||
#include "pin_mappings.h"
|
||||
#else
|
||||
// Messages that are declared in Marlin
|
||||
#define WELCOME_MSG "Printer Ready"
|
||||
#define MSG_MEDIA_INSERTED "Media Inserted"
|
||||
#define MSG_MEDIA_REMOVED "Media Removed"
|
||||
|
||||
namespace UI {
|
||||
static inline uint32_t safe_millis() {return millis();};
|
||||
static inline void yield() {};
|
||||
|
||||
@@ -310,7 +310,9 @@ class CommandProcessor : public CLCD::CommandFifo {
|
||||
int8_t apply_fit_text(int16_t w, int16_t h, T text) {
|
||||
using namespace FTDI;
|
||||
int8_t font = _font;
|
||||
const bool is_utf8 = has_utf8_chars(text);
|
||||
#ifdef TOUCH_UI_USE_UTF8
|
||||
const bool is_utf8 = has_utf8_chars(text);
|
||||
#endif
|
||||
for (;font >= 26;) {
|
||||
int16_t width, height;
|
||||
#ifdef TOUCH_UI_USE_UTF8
|
||||
|
||||
@@ -21,6 +21,46 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Implementation of hsl_to_rgb as constexpr functions based on:
|
||||
*
|
||||
* https://www.rapidtables.com/convert/color/hsl-to-rgb.html
|
||||
*/
|
||||
|
||||
constexpr float _hsl_fmod(float x, float y) {
|
||||
return x - int(x/y)*y;
|
||||
}
|
||||
|
||||
constexpr float _hsl_c(int, float S, float L) {
|
||||
return (1.0f - fabs(2*L-1.0f)) * S;
|
||||
}
|
||||
|
||||
constexpr float _hsl_x(int H, float S, float L) {
|
||||
return _hsl_c(H,S,L) * (1.0f - fabs(_hsl_fmod(float(H)/60, 2) - 1));
|
||||
}
|
||||
|
||||
constexpr float _hsl_m(int H, float S, float L) {
|
||||
return L - _hsl_c(H,S,L)/2;
|
||||
}
|
||||
|
||||
constexpr float _hsl_rgb(int H, float S, float L, float r, float g, float b) {
|
||||
return ((uint32_t((r + _hsl_m(H,S,L))*255+0.5) << 16) |
|
||||
(uint32_t((g + _hsl_m(H,S,L))*255+0.5) << 8) |
|
||||
(uint32_t((b + _hsl_m(H,S,L))*255+0.5) << 0));
|
||||
}
|
||||
|
||||
constexpr uint32_t hsl_to_rgb(int H, float S, float L) {
|
||||
return (H < 60) ? _hsl_rgb(H,S,L,_hsl_c(H,S,L), _hsl_x(H,S,L), 0) :
|
||||
(H < 120) ? _hsl_rgb(H,S,L,_hsl_x(H,S,L), _hsl_c(H,S,L), 0) :
|
||||
(H < 180) ? _hsl_rgb(H,S,L, 0, _hsl_c(H,S,L), _hsl_x(H,S,L)) :
|
||||
(H < 240) ? _hsl_rgb(H,S,L, 0, _hsl_x(H,S,L), _hsl_c(H,S,L)) :
|
||||
(H < 300) ? _hsl_rgb(H,S,L,_hsl_x(H,S,L), 0, _hsl_c(H,S,L)) :
|
||||
_hsl_rgb(H,S,L,_hsl_c(H,S,L), 0, _hsl_x(H,S,L));
|
||||
}
|
||||
|
||||
/**
|
||||
* Structure for RGB colors
|
||||
*/
|
||||
struct rgb_t {
|
||||
union {
|
||||
struct {
|
||||
|
||||
@@ -20,70 +20,6 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
typedef const char Language_Str[];
|
||||
|
||||
// Count how many languages are defined.
|
||||
|
||||
#if defined(LCD_LANGUAGE_5)
|
||||
#define NUM_LANGUAGES 5
|
||||
#elif defined(LCD_LANGUAGE_4)
|
||||
#define NUM_LANGUAGES 4
|
||||
#elif defined(LCD_LANGUAGE_3)
|
||||
#define NUM_LANGUAGES 3
|
||||
#elif defined(LCD_LANGUAGE_2)
|
||||
#define NUM_LANGUAGES 2
|
||||
#else
|
||||
#define NUM_LANGUAGES 1
|
||||
#endif
|
||||
|
||||
// Set undefined languages equal to the last and
|
||||
// let the compiler optimize out the duplicates
|
||||
|
||||
#ifndef LCD_LANGUAGE_1
|
||||
#define LCD_LANGUAGE_1 LCD_LANGUAGE
|
||||
#endif
|
||||
|
||||
#ifndef LCD_LANGUAGE_2
|
||||
#define LCD_LANGUAGE_2 LCD_LANGUAGE_1
|
||||
#endif
|
||||
|
||||
#ifndef LCD_LANGUAGE_3
|
||||
#define LCD_LANGUAGE_3 LCD_LANGUAGE_2
|
||||
#endif
|
||||
|
||||
#ifndef LCD_LANGUAGE_4
|
||||
#define LCD_LANGUAGE_4 LCD_LANGUAGE_3
|
||||
#endif
|
||||
|
||||
#ifndef LCD_LANGUAGE_5
|
||||
#define LCD_LANGUAGE_5 LCD_LANGUAGE_4
|
||||
#endif
|
||||
|
||||
// Indirection required to paste together the namespace name
|
||||
|
||||
#define _GET_LANG(LANG) Language_##LANG
|
||||
#define GET_LANG(LANG) _GET_LANG(LANG)
|
||||
|
||||
#if NUM_LANGUAGES > 1
|
||||
extern uint8_t lang;
|
||||
// The compiler does a good job of "flattening" out this
|
||||
// if statement when there are fewer than five languages.
|
||||
#define GET_TEXT(MSG) ( \
|
||||
lang == 0 ? GET_LANG(LCD_LANGUAGE_1)::MSG : \
|
||||
lang == 1 ? GET_LANG(LCD_LANGUAGE_2)::MSG : \
|
||||
lang == 2 ? GET_LANG(LCD_LANGUAGE_3)::MSG : \
|
||||
lang == 3 ? GET_LANG(LCD_LANGUAGE_4)::MSG : \
|
||||
GET_LANG(LCD_LANGUAGE_5)::MSG \
|
||||
)
|
||||
#else
|
||||
#define GET_TEXT(MSG) GET_LANG(LCD_LANGUAGE_1)::MSG
|
||||
#endif
|
||||
#define GET_TEXTF(MSG) reinterpret_cast<const __FlashStringHelper *>(GET_TEXT(MSG))
|
||||
|
||||
#define GET_LANGUAGE_NAME(N) GET_LANG(LCD_LANGUAGE_##N)::LANGUAGE
|
||||
|
||||
// All the language tables go here
|
||||
|
||||
#include "language_en.h"
|
||||
#include "language_de.h"
|
||||
#include "language_fr.h"
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
namespace Language_de {
|
||||
using namespace Language_en; // Inherit undefined strings from English
|
||||
|
||||
PROGMEM Language_Str LANGUAGE = u8"Deutsche";
|
||||
|
||||
PROGMEM Language_Str YES = u8"JA";
|
||||
PROGMEM Language_Str NO = u8"NEIN";
|
||||
PROGMEM Language_Str BACK = u8"Zurück";
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#include "language.h"
|
||||
|
||||
namespace Language_en {
|
||||
PROGMEM Language_Str LANGUAGE = u8"English";
|
||||
|
||||
PROGMEM Language_Str YES = u8"Yes";
|
||||
PROGMEM Language_Str NO = u8"No";
|
||||
PROGMEM Language_Str BACK = u8"Back";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user