My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

chiron_tft_defs.h 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * lcd/extui/anycubic_chiron/chiron_defs.h
  24. *
  25. * Extensible_UI implementation for Anycubic Chiron
  26. * Written By Nick Wells, 2020 [https://github.com/SwiftNick]
  27. * (not affiliated with Anycubic, Ltd.)
  28. */
  29. #pragma once
  30. #include "../../../inc/MarlinConfigPre.h"
  31. //#define ACDEBUGLEVEL 4
  32. #if ACDEBUGLEVEL
  33. // Bit-masks for selective debug:
  34. enum ACDebugMask : uint8_t {
  35. AC_INFO = 1,
  36. AC_ACTION = 2,
  37. AC_FILE = 4,
  38. AC_PANEL = 8,
  39. AC_MARLIN = 16,
  40. AC_SOME = 32,
  41. AC_ALL = 64
  42. };
  43. #define ACDEBUG(mask) ( ((mask) & ACDEBUGLEVEL) == mask ) // Debug flag macro
  44. #else
  45. #define ACDEBUG(mask) false
  46. #endif
  47. #define TFTSer LCD_SERIAL // Serial interface for TFT panel now uses marlinserial
  48. #define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path
  49. #define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command
  50. #define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path
  51. #define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault
  52. #define AC_LOWEST_MESHPOINT_VAL -10 // The lowest value you can set for a single mesh point offset
  53. // TFT panel commands
  54. #define AC_msg_sd_card_inserted PSTR("J00")
  55. #define AC_msg_sd_card_removed PSTR("J01")
  56. #define AC_msg_no_sd_card PSTR("J02")
  57. #define AC_msg_usb_connected PSTR("J03")
  58. #define AC_msg_print_from_sd_card PSTR("J04")
  59. #define AC_msg_pause PSTR("J05")
  60. #define AC_msg_nozzle_heating PSTR("J06")
  61. #define AC_msg_nozzle_heating_done PSTR("J07")
  62. #define AC_msg_bed_heating PSTR("J08")
  63. #define AC_msg_bed_heating_done PSTR("J09")
  64. #define AC_msg_nozzle_temp_abnormal PSTR("J10")
  65. #define AC_msg_kill_lcd PSTR("J11")
  66. #define AC_msg_ready PSTR("J12")
  67. #define AC_msg_low_nozzle_temp PSTR("J13")
  68. #define AC_msg_print_complete PSTR("J14")
  69. #define AC_msg_filament_out_alert PSTR("J15")
  70. #define AC_msg_stop PSTR("J16")
  71. #define AC_msg_main_board_has_reset PSTR("J17")
  72. #define AC_msg_paused PSTR("J18")
  73. #define AC_msg_j19_unknown PSTR("J19")
  74. #define AC_msg_sd_file_open_success PSTR("J20")
  75. #define AC_msg_sd_file_open_failed PSTR("J21")
  76. #define AC_msg_level_monitor_finished PSTR("J22")
  77. #define AC_msg_filament_out_block PSTR("J23")
  78. #define AC_msg_probing_not_allowed PSTR("J24")
  79. #define AC_msg_probing_complete PSTR("J25")
  80. #define AC_msg_start_probing PSTR("J26")
  81. #define AC_msg_version PSTR("J27")
  82. #define AC_msg_mesh_changes_abandoned PSTR("Mesh changes abandoned, previous mesh restored.")
  83. #define AC_msg_mesh_changes_saved PSTR("Mesh changes saved.")
  84. #define AC_msg_old_panel_detected PSTR("Standard TFT panel detected!")
  85. #define AC_msg_new_panel_detected PSTR("New TFT panel detected!")
  86. #define AC_msg_powerloss_recovery PSTR("Resuming from power outage! select the same SD file then press resume")
  87. // Error messages must not contain spaces
  88. #define AC_msg_error_bed_temp PSTR("Abnormal_bed_temp")
  89. #define AC_msg_error_hotend_temp PSTR("Abnormal_hotend_temp")
  90. #define AC_msg_error_sd_card PSTR("SD_card_error")
  91. #define AC_msg_filament_out PSTR("Filament_runout")
  92. #define AC_msg_power_loss PSTR("Power_failure")
  93. #define AC_msg_eeprom_version PSTR("EEPROM_ver_wrong")
  94. #define MARLIN_msg_start_probing PSTR("Probing Point 1/25")
  95. #define MARLIN_msg_probing_failed PSTR("Probing Failed")
  96. #define MARLIN_msg_ready PSTR(" Ready.")
  97. #define MARLIN_msg_print_paused PSTR("Print Paused")
  98. #define MARLIN_msg_print_aborted PSTR("Print Aborted")
  99. #define MARLIN_msg_extruder_heating PSTR("E Heating...")
  100. #define MARLIN_msg_bed_heating PSTR("Bed Heating...")
  101. #define MARLIN_msg_EEPROM_version PSTR("EEPROM Version Error")
  102. #define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked")
  103. #define MARLIN_msg_heater_timeout PSTR("Heater Timeout")
  104. #define MARLIN_msg_reheating PSTR("Reheating...")
  105. #define MARLIN_msg_reheat_done PSTR("Reheat finished.")
  106. #define MARLIN_msg_filament_purging PSTR("Filament Purging...")
  107. #define MARLIN_msg_special_pause PSTR("PB")
  108. #define AC_cmnd_auto_unload_filament PSTR("M701") // Use Marlin unload routine
  109. #define AC_cmnd_auto_load_filament PSTR("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle
  110. #define AC_cmnd_manual_load_filament PSTR("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster
  111. #define AC_cmnd_manual_unload_filament PSTR("M83\nG1 E-50 F1200\nM82")
  112. #define AC_cmnd_enable_leveling PSTR("M420SV")
  113. #define AC_cmnd_power_loss_recovery PSTR("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position
  114. #define AC_Test_for_OldPanel PSTR("SIZE") // An old panel will respond with 'SXY 480 320' a new panel wont respond.
  115. #define AC_Test_for_NewPanel PSTR("J200") // A new panel will respond with '[0]=0 [1]=0' to '[19]=0 ' an old panel wont respond
  116. namespace Anycubic {
  117. enum heater_state_t : uint8_t {
  118. AC_heater_off,
  119. AC_heater_temp_set,
  120. AC_heater_temp_reached
  121. };
  122. enum paused_state_t : uint8_t {
  123. AC_paused_heater_timed_out,
  124. AC_paused_purging_filament,
  125. AC_paused_idle
  126. };
  127. enum printer_state_t : uint8_t {
  128. AC_printer_booting,
  129. AC_printer_idle,
  130. AC_printer_probing,
  131. AC_printer_printing,
  132. AC_printer_pausing,
  133. AC_printer_paused,
  134. AC_printer_stopping,
  135. AC_printer_resuming_from_power_outage
  136. };
  137. enum timer_event_t : uint8_t {
  138. AC_timer_started,
  139. AC_timer_paused,
  140. AC_timer_stopped
  141. };
  142. enum media_event_t : uint8_t {
  143. AC_media_inserted,
  144. AC_media_removed,
  145. AC_media_error
  146. };
  147. enum file_menu_t : uint8_t {
  148. AC_menu_file,
  149. AC_menu_command,
  150. AC_menu_change_to_file,
  151. AC_menu_change_to_command
  152. };
  153. enum panel_type_t : uint8_t {
  154. AC_panel_unknown,
  155. AC_panel_standard,
  156. AC_panel_new
  157. };
  158. enum last_error_t : uint8_t {
  159. AC_error_none,
  160. AC_error_abnormal_temp_t0,
  161. AC_error_abnormal_temp_bed,
  162. AC_error_noSD,
  163. AC_error_powerloss,
  164. AC_error_filament_runout,
  165. AC_error_EEPROM
  166. };
  167. } // Anycubic namespace