Prusa MINI Firmware overview
Conditionals_adv.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 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 <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 /**
25  * Conditionals_adv.h
26  * Defines that depend on advanced configuration.
27  */
28 
29 #if EXTRUDERS == 0
30  #define NO_VOLUMETRICS
31  #undef TEMP_SENSOR_0
32  #undef TEMP_SENSOR_1
33  #undef TEMP_SENSOR_2
34  #undef TEMP_SENSOR_3
35  #undef TEMP_SENSOR_4
36  #undef TEMP_SENSOR_5
37  #undef FWRETRACT
38  #undef PIDTEMP
39  #undef AUTOTEMP
40  #undef PID_EXTRUSION_SCALING
41  #undef LIN_ADVANCE
42  #undef FILAMENT_RUNOUT_SENSOR
43  #undef ADVANCED_PAUSE_FEATURE
44  #undef FILAMENT_RUNOUT_DISTANCE_MM
45  #undef FILAMENT_LOAD_UNLOAD_GCODES
46  #undef DISABLE_INACTIVE_EXTRUDER
47  #undef FILAMENT_LOAD_UNLOAD_GCODES
48  #undef EXTRUDER_RUNOUT_PREVENT
49  #undef PREVENT_COLD_EXTRUSION
50  #undef PREVENT_LENGTHY_EXTRUDE
51  #undef THERMAL_PROTECTION_HOTENDS
52  #undef THERMAL_PROTECTION_PERIOD
53  #undef WATCH_TEMP_PERIOD
54  #undef SHOW_TEMP_ADC_VALUES
55 #endif
56 
57 #define HAS_CUTTER EITHER(SPINDLE_FEATURE, LASER_FEATURE)
58 
59 #if !defined(__AVR__) || !defined(USBCON)
60  // Define constants and variables for buffering serial data.
61  // Use only 0 or powers of 2 greater than 1
62  // : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
63  #ifndef RX_BUFFER_SIZE
64  #define RX_BUFFER_SIZE 128
65  #endif
66  // 256 is the max TX buffer limit due to uint8_t head and tail
67  // : [0, 4, 8, 16, 32, 64, 128, 256]
68  #ifndef TX_BUFFER_SIZE
69  #define TX_BUFFER_SIZE 32
70  #endif
71 #else
72  // SERIAL_XON_XOFF not supported on USB-native devices
73  #undef SERIAL_XON_XOFF
74 #endif
75 
76 #if ENABLED(HOST_ACTION_COMMANDS)
77  #ifndef ACTION_ON_PAUSE
78  #define ACTION_ON_PAUSE "pause"
79  #endif
80  #ifndef ACTION_ON_PAUSED
81  #define ACTION_ON_PAUSED "paused"
82  #endif
83  #ifndef ACTION_ON_RESUME
84  #define ACTION_ON_RESUME "resume"
85  #endif
86  #ifndef ACTION_ON_RESUMED
87  #define ACTION_ON_RESUMED "resumed"
88  #endif
89  #ifndef ACTION_ON_CANCEL
90  #define ACTION_ON_CANCEL "cancel"
91  #endif
92  #ifndef ACTION_ON_KILL
93  #define ACTION_ON_KILL "poweroff"
94  #endif
95  #ifndef ACTION_ON_SAFETY_TIMER_EXPIRED
96  #define ACTION_ON_SAFETY_TIMER_EXPIRED "safety_timer_expired"
97  #endif
98  #if HAS_FILAMENT_SENSOR
99  #ifndef ACTION_ON_FILAMENT_RUNOUT
100  #define ACTION_ON_FILAMENT_RUNOUT "filament_runout"
101  #endif
102  #ifndef ACTION_REASON_ON_FILAMENT_RUNOUT
103  #define ACTION_REASON_ON_FILAMENT_RUNOUT "filament_runout"
104  #endif
105  #endif
106  #if ENABLED(G29_RETRY_AND_RECOVER)
107  #ifndef ACTION_ON_G29_RECOVER
108  #define ACTION_ON_G29_RECOVER "probe_rewipe"
109  #endif
110  #ifndef ACTION_ON_G29_FAILURE
111  #define ACTION_ON_G29_FAILURE "probe_failed"
112  #endif
113  #endif
114 #endif
115 
116 #if ENABLED(FYSETC_MINI_12864_2_1)
117  #define LED_CONTROL_MENU
118  #define LED_USER_PRESET_STARTUP
119  #define LED_COLOR_PRESETS
120  #ifndef LED_USER_PRESET_RED
121  #define LED_USER_PRESET_RED 255
122  #endif
123  #ifndef LED_USER_PRESET_GREEN
124  #define LED_USER_PRESET_GREEN 128
125  #endif
126  #ifndef LED_USER_PRESET_BLUE
127  #define LED_USER_PRESET_BLUE 0
128  #endif
129  #ifndef LED_USER_PRESET_BRIGHTNESS
130  #define LED_USER_PRESET_BRIGHTNESS 255
131  #endif
132 #endif
133 
134 // Extensible UI pin mapping for RepRapDiscount
135 #define TOUCH_UI_ULTIPANEL ENABLED(LULZBOT_TOUCH_UI) && ANY(AO_EXP1_PINMAP, AO_EXP2_PINMAP, CR10_TFT_PINMAP)
136 
137 // Poll-based jogging for joystick and other devices
138 #if ENABLED(JOYSTICK)
139  #define POLL_JOG
140 #endif