Skip to content

Commit

Permalink
Add support for settings update through config file, switch unified &…
Browse files Browse the repository at this point in the history
… classic menu through config file & other minor changes (bigtreetech#526)

- Add support for updating settings through a config file without need to recompile firmware.
- Move lcd colors to selerate file.
- Increase firmware version to 25.4
- changeable long text strings are save to spi flash.
- long text like custom gcodes and print gcodes are loaded from
 spi flash only when needed.
- Move NumPad to seperate file & fix colors in in numpad
  • Loading branch information
guruathwal authored May 8, 2020
1 parent f765f2e commit 522911e
Show file tree
Hide file tree
Showing 111 changed files with 4,376 additions and 1,319 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ charset = utf-8
[{*.c,*.cpp,*.h,Makefile}]
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
end_of_line = crlf
indent_style = space
indent_size = 2

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### From version 26.1 the firmware for classic Menu and Unified Menu is merged.

**Now Classic Menu or Unified Menu can be enabled using the config.ini file without the need to update the firmware**
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,359 @@
#### Default Config file for BigTreeTech TFT Controllers
#
# BIGTREE_TFT35_V1_1 / BIGTREE_TFT35_V1_2 / BIGTREE_TFT35_V2_0
# BIGTREE_TFT35_V3_0 / BIGTREE_TFT35_E3_V3_0 / BIGTREE_TFT28_V1_0
# BIGTREE_TFT28_V3_0 / BIGTREE_TFT24_V1_1 / MKS_32_V1_4
#
# Firmware Source: https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware
#
#--------------------------------------------------------------------
# General Settings
#--------------------------------------------------------------------

#### UNIFIED MENU / CLASSIC MENU
# Select a UI Menu flavour
# Options: [Unified Menu: 1, Classic Menu: 0]
unified_menu:1

#### Baudrate
# Options: [0: 2400, 1: 9600, 2: 19200, 3: 38400, 4: 57600, 5: 115200, 6: 250000, 7: 500000,8: 1000000 ]
baudrate:5

#### Default Touch Mode Language
# Select the language to display on the LCD while in Touch Mode.
# Options: [0: ENGLISH, 1: CHINESE, 2: RUSSIAN, 3: JAPANESE, 4: ARMENIAN,
# 5: GERMAN, 6: CZECH, 7: SPAIN, 8: FRENCH, 9: PORTUGUESE,
# 10: ITALIAN,11: POLISH, 12: SLOVAK, 13: DUTCH, 14: HUNGARY]
language:0

#### Default Touch Mode Color Options
# Options: [ WHITE: 0, BLACK: 1, RED: 2, GREEN: 3, BLUE: 4, CYAN: 5, MAGENTA: 6, YELLOW: 7,
# ORANGE: 8, PURPLE: 9, LIME: 10, BROWN: 11, DARKBLUE: 12, DARKGREEN: 13, GRAY: 14, DARKGRAY: 15 ]

# Title background color
title_back_color:1

#Background color
background_color:1

#Font foreground color
font_color:0

#Reminder font color, such as: "No print attached", "Busy processing", etc.
reminder_color:5

#Volume status/reminder font color, such as: "Card inserted", "Card removed"
volume_status_color:5

#Backgroud color for X Y Z position display in Status Screen.
status_xyz_bg_color:15

#List View Border Color
list_border_color:15

#List View button background color
list_button_bg_color:15

#Backgroud color for X Y Z position display in Status Screen.
status_xyz_bg_color:15

#List View Border Color
list_border_color:15

#List View button background color
list_button_bg_color:15

#### Rotate UI 180 degrees
# Options: [enable: 1, disable: 0]
rotate_ui:0

#### Show or hide Temperature ACK in Gcode Terminal
# Options: [Show: 1, Hide: 0]
terminal_ack:0

#### invert X axis button function in Move menu to match move buttons to actual axis
# Options: [enable: 1, disable: 0]
# Invert Axis format [ X<option> Y<option> Z<option> E<option>]
invert_axis: X0 Y0 Z0

#### Persistent temperature info
# show persistent temperature info on all menu screens
# Options: [enable: 1, disable: 0]
persistent_info:0

#### File List Mode
# show file as list
# Options: [enable: 1, disable: 0]
files_list_mode:1


#--------------------------------------------------------------------
# Marlin Mode Settings (Only for TFT35_V3.0/ TFT24_V1.1/ TFT28V3.0)
#--------------------------------------------------------------------

#### Default Mode
# Options: [0:Touch Mode, 1: Marlin Mode]
default_mode:0

#### Default Marlin Mode Background & Font Color Options
# Options: [ WHITE: 0, BLACK: 1, RED: 2, GREEN: 3, BLUE: 4, CYAN: 5, MAGENTA: 6, YELLOW: 7,
# ORANGE: 8, PURPLE: 9, LIME: 10, BROWN: 11, DARKBLUE: 12, DARKGREEN: 13, GRAY: 14, DARKGRAY: 15 ]
marlin_bg_color:1
marlin_fn_color:8

#### Marlin Mode show title
# Options:[1:enable, 0: disable]
marlin_show_title:1

# Run Marlin Mode in Fullscreen
# Options:[1:enable, 0: disable] [Disabled. RECOMMENDED FOR TFT24]
marlin_fullscreen:0

#### Text displayed at the top of the TFT in Marlin Mode.
marlin_title:LCD12864 Simulator


#--------------------------------------------------------------------
# Printer / Machine Settings
#--------------------------------------------------------------------

#### Hotend Count
# Options: [1 to 6]
ext_count:1

#### Extruder Count
# Options: [1 to 6]
ext_count:1

#### Fan Count
# Options: [1 to 6]
fan_count:1

#### Bed / Extruder Maximum Temperatures
# format [max_temp: BED:<max temp> T0:<max temp> T1:<max temp> T2:<max temp> T3:<max temp> T4:<max temp> T5:<max temp>]
max_temp: BED:150 T0:275 T1:275 T2:275 T3:275 T4:275 T5:275

#### Cold Extrusion Minimum Temperature
min_temp:180

#### Fan Maximum PWM speed (0 to 255)
fan_max:255

#### Machine Size / Build Area (mm)
# Options: [X Axis: X, Y Axis: Y, Z Axis: Z]
# minimum possible value: 0, maximum possible value: 2000
# minimum size limit format [size_min: X<minimum distance> Y<minimum distance> Z<minimum distance>]
# maximum size limit format [size_max: X<maximum distance> Y<maximum distance> Z<maximum distance>]
size_min: X0 Y0 Z0
size_max: X235 Y235 Z250

#### default Move Speeds (mm/min)
# Options: [Slow: S, Normal: N, Fast: F]
# format [move_speed: S<feedrate mm/min> N<feedrate mm/min> F<feedrate mm/min>]
move_speed: S1000 N3000 F5000

#### default Extruder Speeds (mm/min)
# Options: [Slow: S, Normal: N, Fast: F]
# format [ext_speed: S<feedrate mm/min> N<feedrate mm/min> F<feedrate mm/min>]
ext_speed: S60 N600 F1200

####Auto Save Load Leveling Data
# The TFT will auto-detect if Auto Bed Level is available.
# Enable this will send "M500" after "G29" to store leveling value
# and send "M420 S1" to enable leveling state after startup
# Options:[1:enable, 0: disable]
auto_load_leveling:1

#### Onboard / Printer SD Card Support (enable if the printer has an Onboard SDcard
#Options: [enable: 1, disable: 0]
onboard_sd_support:1

#### M27 / Printing status refresh time (this will be used if SD_AUTOREPORT is not detected by the TFT)
M27_refresh_time:3

#### M27 always active - keep polling M27 even if not printing
# Options: [enable: 1, disable: 0]
M27_always_active:1

#### Show Fan Speed as Percentage
# Options: [enable: 1, disable: 0]
fan_speed_percent:1

#### Pause Settings
# position & Lengths in mm, Feedrates in mm/min
# minimum possible value: 0, maximum possible value: 2000
# Pause retract distance format [pause_retract: R<retract length> P<Resume Purge length>]
# Pause XY position format [pause_pos: X<position in mm> Y<position in mm>]
# Pause Z raise format [pause_z_raise: Z<distance in mm>]
# Pause feed Rate # format [ X<feedrate mm/min> Y<feedrate mm/min> Z<feedrate mm/min> E<feedrate mm/min>]
pause_retract: R15 P16
pause_pos:X10 Y10
pause_z_raise:20
pause_feedrate: X6000 Y6000 Z6000 E600

### Manual Level Points Edge distance (mm)
# distance in mm, Feedrates in mm/min
# Leveling Edge distance format [pause_pos: X<distance in mm> Y<distance in mm>]
# Leveling Z Position format [level_z_pos: Z<position in mm>]
# Leveling Z raise format [level_z_raise: Z<distance in mm>]
# Leveling feed Rate format [ X<feedrate mm/min> Y<feedrate mm/min> Z<feedrate mm/min>]
level_edge_distance: X20 Y20
level_z_pos:0.2
level_z_raise:10
level_feedrate: X6000 Y6000 Z6000

#### Preheat Temperature
# Maximum Filament name length 7 characters
# If default names are changed, make sure to change Icons to match the names
#format [T<hotend temp> B<bed temp>]
preheat_name1:PLA
preheat_temp1:T200 B60

preheat_name2:PETG
preheat_temp2:T200 B60

preheat_name3:ABS
preheat_temp3:T230 B90

#--------------------------------------------------------------------
# Power Supply Settings (if connected to TFT Controller)
#--------------------------------------------------------------------

#### Default Power Supply Mode
# Options: [OFF: 0, ON: 1: Auto:2]
ps_on:0

#### Power Supply Active HIGH Settings
# Options:[HIGH: 1, LOW: 0]
ps_on_active_high:1

#### Maximum hot-end temperature of automatic shut down after printing (only if auto power is enabled)
# wait for the hot-end temperature to be lower than this value, then turn off the power automatically
auto_shutdown_temp:50

#--------------------------------------------------------------------
# Filament Runout Settings (if connected to TFT Controller)
#--------------------------------------------------------------------

#### Default FIlament Sensor
# Options:[NONE: 0, Normal: 1, SMART: 2]
fil_runout:0

#### Filament runout inverting - invert the logic of the sensor.
# Options: [true: 1, false: 0]
fil_runout_inverting:1

#### filament noise threshold - Pause print when filament runout is detected for this time period in (ms).
# time duration in ms
fil_noise_threshold:100

#### Smart filament runout detection
# For use with an encoder disc that toggles runout pin as filament moves
fil_runout_distance:7

#--------------------------------------------------------------------
# Power Loss Recovery & BTT UPS Settings (if connected to TFT Controller)
#--------------------------------------------------------------------
#### Home before Power Loss recovery
# Options: [enable: 1, disable: 0]
pl_recovery_home:0

#### Power Loss Z raise (mm)
# Raise Z axis on resume (on power loss with UPS)
pl_z_raise:0

#### Enable BTT UPS
# Options: [enable: 1, disable: 0]
btt_mini_ups:0


#--------------------------------------------------------------------
# Other device-specific settings
#--------------------------------------------------------------------

#### Buzzer / sound
# Options: [enable: 1, disable: 0]
buzzer:1

#### Knob Led Color (only for TFT35 E3.0)
#Options: [ 0: LED_OFF, 1: LED_WHITE, 2: LED_RED, 3: LED_ORANGE, 4: LED_YELLOW, 5: LED_GREEN, 6: LED_BLUE, 7: LED_INDIGO, 8: LED_VIOLET]
knob_led_color:0

#### Default LCD Brightness levels (only for TFT35v3.0 & TFT28v3.0)
# Options: [(low) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (full)]
lcd_brightness:10
lcd_idle_brightness:5

####Default LCD idle time (only for TFT35v3.0 & TFT28v3.0)
# Options [0: Off, 1: 5Sec, 2: 10Sec , 3: 30sec, 4: 1min, 5: 2min, 6: 5min, 7: 10min]
lcd_idle_delay:4


#--------------------------------------------------------------------
# Custom G-Code Commands (up to 15 custom G-code)
#--------------------------------------------------------------------

#### To enable a custom Command:
# Remove '#' at the begining custom commands label & gcode.

#### To disable a custom Command:
# Add '#' at the begining custom commands label & gcode.

# if the values are left blank then default name and G-code will be used

# Options: [Label maximum length: 24 characters, G-code Maximum length 70 characters]

custom_label_1:Disable steppers
custom_gcode_1:M84\n
custom_label_2:Init sd card
custom_gcode_2:G28\nG29\nG0\n
custom_label_3:Release sd card
custom_gcode_3:M22\n
custom_label_4:restore leveling
custom_gcode_4:M420 S1\n
custom_label_5:Save to EEPROM
custom_gcode_5:M500\n
custom_label_6:restore from EEPROM
custom_gcode_6:M501\n
custom_label_7:EEPROM defaults
custom_gcode_7:M502\n
#custom_label_8:custom8
#custom_gcode_8:M105\n
#custom_label_9:custom9
#custom_gcode_9:M105\n
#custom_label_10:custom10
#custom_gcode_10:M105\n
#custom_label_11:custom11
#custom_gcode_11:M105\n
#custom_label_12:custom12
#custom_gcode_12:M105\n
#custom_label_13:custom13
#custom_gcode_13:M105\n
#custom_label_14:custom14
#custom_gcode_14:M105\n
#custom_label_15:custom15
#custom_gcode_15:M105\n

#--------------------------------------------------------------------
# Start, End & Cancel G-codes
#--------------------------------------------------------------------

#### Default Start Gcode Status
# Options: [enable: 1, disable: 0]
start_gcode_enabled:0

#### Default End Gcode Status
# Options: [enable: 1, disable: 0]
end_gcode_enabled:0

#### Start G-code - run this G-code before starting print
# maximum length 50 characters
start_gcode:G28 XY R20\n

#### End G-code - run this G-code after finishing print
# maximum length 50 characters
end_gcode:G90\nG1 E-4\nG92 E0\nM18\n

#### Cancel G-code - run this G-code after canceling print
# maximum length 50 characters
cancel_gcode:G28 XY R10\n
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions Copy to SD Card root directory to update/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### From version 26.1 the firmware for Classic Menu and Unified Menu is merged.

**Now Classic Menu or Unified menu can be enabled using the config.ini file without the need to update the firmware**
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 522911e

Please sign in to comment.