FYSETC BLTouch config and more (#14668)

This commit is contained in:
Scott Lahteine 2019-07-18 05:54:50 -05:00 committed by GitHub
parent 92e513e76e
commit 1ea9a36d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 4820 additions and 67 deletions

View File

@ -37,9 +37,12 @@
uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn
uint8_t u8g_com_arduino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn
//#define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn
#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
uint8_t u8g_com_arduino_st7920_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
//#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_std_sw_spi_fn
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn
#elif defined(ARDUINO_ARCH_STM32)
uint8_t u8g_com_arduino_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_std_sw_spi_fn

View File

@ -42,11 +42,17 @@
// Optimize this code with -O3
#pragma GCC optimize (3)
#define ST7920_SND_BIT \
WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \
WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \
WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \
val <<= 1
#ifdef ARDUINO_ARCH_STM32F1
#define ST7920_DAT(V) !!((V) & 0x80)
#else
#define ST7920_DAT(V) ((V) & 0x80)
#endif
#define ST7920_SND_BIT do{ \
WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \
WRITE(ST7920_DAT_PIN, ST7920_DAT(val)); ST7920_DELAY_2; \
WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \
val <<= 1; }while(0)
// Optimize this code with -O3
#pragma GCC optimize (3)

View File

@ -28,6 +28,8 @@
#define BOARD_NAME "FYSETC AIO II"
#define BOARD_WEBSITE_URL "https://fysetc.com"
#define DISABLE_JTAG
#define pins_v2_20190128 // geo-f:add for new pins define
// Ignore temp readings during development.
@ -77,11 +79,11 @@
//
// X:PA2 Y:PA3 Z:PB12 E:PB13 // changed for test
#define MOTOR_CURRENT_PWM_XY_PIN PA3
#define MOTOR_CURRENT_PWM_Z_PIN PA2 // PB12
//#define MOTOR_CURRENT_PWM_XY_PIN PA3
//#define MOTOR_CURRENT_PWM_Z_PIN PA2 // PB12
//#define MOTOR_CURRENT_PWM_XY_PIN PB6
//#define MOTOR_CURRENT_PWM_Z_PIN PB7 // PB12
#define MOTOR_CURRENT_PWM_E_PIN -1 // PB13
//#define MOTOR_CURRENT_PWM_E_PIN -1 // PB13
// Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
#ifndef MOTOR_CURRENT_PWM_RANGE
#define MOTOR_CURRENT_PWM_RANGE 1500 // geo-f:old 2000

View File

@ -33,6 +33,8 @@
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#define DISABLE_JTAG
//
// Servos
//
@ -69,7 +71,7 @@
#define E0_DIR_PIN PC14
#define E0_ENABLE_PIN PC13
#define X_HARDWARE_SERIAL MSerial2 // Port correct?
#define X_HARDWARE_SERIAL MSerial2
#define Y_HARDWARE_SERIAL MSerial2
#define Z_HARDWARE_SERIAL MSerial2
#define E0_HARDWARE_SERIAL MSerial2

View File

@ -26,9 +26,10 @@ env.AddPostAction(
#)
# In-line command with arguments
#env.Replace(
# UPLOADCMD="executable -arg1 -arg2 $SOURCE"
#)
env.Replace(
UPLOADCMD="stm32flash -v -i rts,-dtr,dtr " + '$UPLOAD_PORT' + " -R -w $BUILD_DIR/${PROGNAME}.hex"
)
# Python callback
#def on_upload(source, target, env):

View File

@ -104,7 +104,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 1 // fzl:由于libmaple 0 用的是USB1才是串口 old:0
#define SERIAL_PORT 1 // libmaple 0 for USB ,1 for serial
/**
* Select a secondary serial port on the board to use for communication with the host.
@ -148,7 +148,7 @@
#define EXTRUDERS 1
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
// For Cyclops or any "multi-extruder" that shares a single nozzle.
//#define SINGLENOZZLE
@ -466,10 +466,15 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Makerlab J-head
#define DEFAULT_Kp 21.73
#define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55
// Ultimaker
#define DEFAULT_Kp 22.2
#define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114
//#define DEFAULT_Kp 22.2
//#define DEFAULT_Ki 1.08
//#define DEFAULT_Kd 114
// MakerGear
//#define DEFAULT_Kp 7.0
@ -629,9 +634,9 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
@ -971,10 +976,10 @@
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{ 0:'Low', 1:'High' }
#define X_ENABLE_ON 1
#define Y_ENABLE_ON 1
#define Z_ENABLE_ON 1
#define E_ENABLE_ON 1 // For all extruders
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders
// Disables axis stepper immediately when it's not being used.
// WARNING: When motors turn off there is a chance of losing position accuracy!
@ -993,14 +998,14 @@
// @section machine
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
#define INVERT_X_DIR true
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
#define INVERT_E0_DIR false
#define INVERT_E0_DIR true
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
@ -1025,8 +1030,8 @@
// @section machine
// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200
#define X_BED_SIZE 235
#define Y_BED_SIZE 235
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
@ -1034,7 +1039,7 @@
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200
#define Z_MAX_POS 260
/**
* Software Endstops
@ -1393,7 +1398,7 @@
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/
//#define EEPROM_SETTINGS // Persistent storage with M500 and M501
#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#if ENABLED(EEPROM_SETTINGS)
@ -1922,7 +1927,7 @@
//
//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight
#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight
//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight
//
@ -2117,14 +2122,14 @@
* LED Type. Enable only one of the following two options.
*
*/
//#define RGB_LED
#define RGB_LED
//#define RGBW_LED
#if EITHER(RGB_LED, RGBW_LED)
//#define RGB_LED_R_PIN 34
//#define RGB_LED_G_PIN 43
//#define RGB_LED_B_PIN 35
//#define RGB_LED_W_PIN -1
#define RGB_LED_R_PIN PB0
#define RGB_LED_G_PIN PB6
#define RGB_LED_B_PIN PB7
#define RGB_LED_W_PIN -1
#endif
// Support for Adafruit Neopixel LED driver
@ -2181,3 +2186,9 @@
// Allow servo angle to be edited and saved to EEPROM
//#define EDITABLE_SERVO_ANGLES
/**
* Sometimes after inserting the SD card settings get lost.
* This option reloads settings when the SD card is inserted.
*/
#define SD_RELOAD_SETTINGS

View File

@ -879,7 +879,7 @@
* LED Control Menu
* Enable this feature to add LED Control to the LCD menu
*/
//#define LED_CONTROL_MENU
#define LED_CONTROL_MENU
#if ENABLED(LED_CONTROL_MENU)
#define LED_COLOR_PRESETS // Enable the Preset Color menu option
#if ENABLED(LED_COLOR_PRESETS)
@ -912,7 +912,7 @@
//#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")
#define EVENT_GCODE_SD_STOP "M21" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
/**
* Continue after Power-Loss (Creality3D)
@ -966,8 +966,8 @@
#define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
#define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting.
#define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
#define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
#define SDSORT_DYNAMIC_RAM true // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
#define SDSORT_CACHE_NAMES true // Keep sorted items in RAM longer for speedy performance. Most expensive option.
#define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
#define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#endif
@ -1636,7 +1636,7 @@
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
#if AXIS_IS_TMC(X)
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_CURRENT 700 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#define X_RSENSE 0.11
#endif
@ -1648,7 +1648,7 @@
#endif
#if AXIS_IS_TMC(Y)
#define Y_CURRENT 800
#define Y_CURRENT 650
#define Y_MICROSTEPS 16
#define Y_RSENSE 0.11
#endif
@ -1678,7 +1678,7 @@
#endif
#if AXIS_IS_TMC(E0)
#define E0_CURRENT 800
#define E0_CURRENT 650
#define E0_MICROSTEPS 16
#define E0_RSENSE 0.11
#endif
@ -1751,13 +1751,13 @@
* 3 | HIGH | HIGH
*/
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 1
#define Z_SLAVE_ADDRESS 2
#define X2_SLAVE_ADDRESS 0
#define Y2_SLAVE_ADDRESS 0
#define Z2_SLAVE_ADDRESS 0
#define Z3_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 3
#define E1_SLAVE_ADDRESS 0
#define E2_SLAVE_ADDRESS 0
#define E3_SLAVE_ADDRESS 0
@ -1808,7 +1808,7 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG)
*/
//#define MONITOR_DRIVER_STATUS
#define MONITOR_DRIVER_STATUS
#if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN 50 // [mA]

File diff suppressed because it is too large Load Diff

View File

@ -906,13 +906,13 @@
// 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.
#define SDCARD_RATHERRECENTFIRST
//#define SDCARD_RATHERRECENTFIRST
#define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing
//#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")
#define EVENT_GCODE_SD_STOP "M21" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
/**
* Continue after Power-Loss (Creality3D)
@ -1636,7 +1636,7 @@
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
#if AXIS_IS_TMC(X)
#define X_CURRENT 650 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_CURRENT 700 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#define X_RSENSE 0.11
#endif
@ -1648,7 +1648,7 @@
#endif
#if AXIS_IS_TMC(Y)
#define Y_CURRENT 650
#define Y_CURRENT 500
#define Y_MICROSTEPS 16
#define Y_RSENSE 0.11
#endif

View File

@ -104,7 +104,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 1 // libmaple USB 1, old:0
#define SERIAL_PORT 1 // libmaple 0 for USB ,1 for serial
/**
* Select a secondary serial port on the board to use for communication with the host.
@ -148,7 +148,7 @@
#define EXTRUDERS 1
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
// For Cyclops or any "multi-extruder" that shares a single nozzle.
//#define SINGLENOZZLE
@ -466,10 +466,15 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
//PID for Makerlab J-head
#define DEFAULT_Kp 21.73
#define DEFAULT_Ki 1.54
#define DEFAULT_Kd 76.55
// Ultimaker
#define DEFAULT_Kp 22.2
#define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114
//#define DEFAULT_Kp 22.2
//#define DEFAULT_Ki 1.08
//#define DEFAULT_Kd 114
// MakerGear
//#define DEFAULT_Kp 7.0
@ -716,7 +721,7 @@
* Override with M203
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
#define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 }
/**
* Default Max Acceleration (change/s) change = mm/s
@ -724,7 +729,7 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 5000 }
/**
* Default Acceleration (change/s) change = mm/s
@ -734,9 +739,9 @@
* M204 R Retract Acceleration
* M204 T Travel Acceleration
*/
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves
//
// Use Junction Deviation instead of traditional Jerk Limiting
@ -1034,7 +1039,7 @@
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 250
#define Z_MAX_POS 260
/**
* Software Endstops
@ -1393,7 +1398,7 @@
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/
//#define EEPROM_SETTINGS // Persistent storage with M500 and M501
#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#if ENABLED(EEPROM_SETTINGS)
@ -2181,3 +2186,9 @@
// Allow servo angle to be edited and saved to EEPROM
//#define EDITABLE_SERVO_ANGLES
/**
* Sometimes after inserting the SD card settings get lost.
* This option reloads settings when the SD card is inserted.
*/
#define SD_RELOAD_SETTINGS

File diff suppressed because it is too large Load Diff