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.

thermistors.h 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  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. #pragma once
  23. #include "../../inc/MarlinConfig.h"
  24. #define THERMISTOR_TABLE_ADC_RESOLUTION 10
  25. #define THERMISTOR_TABLE_SCALE (HAL_ADC_RANGE / _BV(THERMISTOR_TABLE_ADC_RESOLUTION))
  26. #if ENABLED(HAL_ADC_FILTERED)
  27. #define OVERSAMPLENR 1
  28. #else
  29. #define OVERSAMPLENR 16
  30. #endif
  31. #define MAX_RAW_THERMISTOR_VALUE (HAL_ADC_RANGE * (OVERSAMPLENR) - 1)
  32. // Currently Marlin stores all oversampled ADC values as int16_t, make sure the HAL settings do not overflow 15bit
  33. #if MAX_RAW_THERMISTOR_VALUE > ((1 << 15) - 1)
  34. #error "MAX_RAW_THERMISTOR_VALUE is too large for int16_t. Reduce OVERSAMPLENR or HAL_ADC_RESOLUTION."
  35. #endif
  36. #define OV_SCALE(N) (N)
  37. #define OV(N) int16_t(OV_SCALE(N) * (OVERSAMPLENR) * (THERMISTOR_TABLE_SCALE))
  38. #define ANY_THERMISTOR_IS(n) (THERMISTOR_HEATER_0 == n || THERMISTOR_HEATER_1 == n || THERMISTOR_HEATER_2 == n || THERMISTOR_HEATER_3 == n || THERMISTOR_HEATER_4 == n || THERMISTOR_HEATER_5 == n || THERMISTOR_HEATER_6 == n || THERMISTOR_HEATER_7 == n || THERMISTORBED == n || THERMISTORCHAMBER == n || THERMISTORPROBE == n)
  39. typedef struct { int16_t value, celsius; } temp_entry_t;
  40. // Pt1000 and Pt100 handling
  41. //
  42. // Rt=R0*(1+a*T+b*T*T) [for T>0]
  43. // a=3.9083E-3, b=-5.775E-7
  44. #define PtA 3.9083E-3
  45. #define PtB -5.775E-7
  46. #define PtRt(T,R0) ((R0) * (1.0 + (PtA) * (T) + (PtB) * (T) * (T)))
  47. #define PtAdVal(T,R0,Rup) (short)(1024 / (Rup / PtRt(T, R0) + 1))
  48. #define PtLine(T,R0,Rup) { OV(PtAdVal(T, R0, Rup)), T }
  49. #if ANY_THERMISTOR_IS(1) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "EPCOS"
  50. #include "thermistor_1.h"
  51. #endif
  52. #if ANY_THERMISTOR_IS(2) // 4338 K, R25 = 200 kOhm, Pull-up = 4.7 kOhm, "ATC Semitec 204GT-2"
  53. #include "thermistor_2.h"
  54. #endif
  55. #if ANY_THERMISTOR_IS(3) // beta25 = 4120 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Mendel-parts"
  56. #include "thermistor_3.h"
  57. #endif
  58. #if ANY_THERMISTOR_IS(4) // beta25 = 3950 K, R25 = 10 kOhm, Pull-up = 4.7 kOhm, "Generic"
  59. #include "thermistor_4.h"
  60. #endif
  61. #if ANY_THERMISTOR_IS(5) // beta25 = 4267 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "ParCan, ATC 104GT-2"
  62. #include "thermistor_5.h"
  63. #endif
  64. #if ANY_THERMISTOR_IS(501) // 100K Zonestar thermistor
  65. #include "thermistor_501.h"
  66. #endif
  67. #if ANY_THERMISTOR_IS(502) // Unknown thermistor used by the Zonestar Průša P802M hot bed
  68. #include "thermistor_502.h"
  69. #endif
  70. #if ANY_THERMISTOR_IS(512) // 100k thermistor in RPW-Ultra hotend, Pull-up = 4.7 kOhm, "unknown model"
  71. #include "thermistor_512.h"
  72. #endif
  73. #if ANY_THERMISTOR_IS(6) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 8.2 kOhm, "EPCOS ?"
  74. #include "thermistor_6.h"
  75. #endif
  76. #if ANY_THERMISTOR_IS(7) // beta25 = 3974 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Honeywell 135-104LAG-J01"
  77. #include "thermistor_7.h"
  78. #endif
  79. #if ANY_THERMISTOR_IS(71) // beta25 = 3974 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Honeywell 135-104LAF-J01"
  80. #include "thermistor_71.h"
  81. #endif
  82. #if ANY_THERMISTOR_IS(8) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 10 kOhm, "Vishay E3104FHT"
  83. #include "thermistor_8.h"
  84. #endif
  85. #if ANY_THERMISTOR_IS(9) // beta25 = 3960 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "GE Sensing AL03006-58.2K-97-G1"
  86. #include "thermistor_9.h"
  87. #endif
  88. #if ANY_THERMISTOR_IS(10) // beta25 = 3960 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "RS 198-961"
  89. #include "thermistor_10.h"
  90. #endif
  91. #if ANY_THERMISTOR_IS(11) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "QU-BD silicone bed, QWG-104F-3950"
  92. #include "thermistor_11.h"
  93. #endif
  94. #if ANY_THERMISTOR_IS(13) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Hisens"
  95. #include "thermistor_13.h"
  96. #endif
  97. #if ANY_THERMISTOR_IS(15) // JGAurora A5 thermistor calibration
  98. #include "thermistor_15.h"
  99. #endif
  100. #if ANY_THERMISTOR_IS(18) // ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
  101. #include "thermistor_18.h"
  102. #endif
  103. #if ANY_THERMISTOR_IS(20) // Pt100 with INA826 amp on Ultimaker v2.0 electronics
  104. #include "thermistor_20.h"
  105. #endif
  106. #if ANY_THERMISTOR_IS(21) // Pt100 with INA826 amp with 3.3v excitation based on "Pt100 with INA826 amp on Ultimaker v2.0 electronics"
  107. #include "thermistor_21.h"
  108. #endif
  109. #if ANY_THERMISTOR_IS(22) // Thermistor in a Rostock 301 hot end, calibrated with a multimeter
  110. #include "thermistor_22.h"
  111. #endif
  112. #if ANY_THERMISTOR_IS(23) // By AluOne #12622. Formerly 22 above. May need calibration/checking.
  113. #include "thermistor_23.h"
  114. #endif
  115. #if ANY_THERMISTOR_IS(30) // Kis3d Silicone mat 24V 200W/300W with 6mm Precision cast plate (EN AW 5083)
  116. #include "thermistor_30.h"
  117. #endif
  118. #if ANY_THERMISTOR_IS(51) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "EPCOS"
  119. #include "thermistor_51.h"
  120. #endif
  121. #if ANY_THERMISTOR_IS(52) // beta25 = 4338 K, R25 = 200 kOhm, Pull-up = 1 kOhm, "ATC Semitec 204GT-2"
  122. #include "thermistor_52.h"
  123. #endif
  124. #if ANY_THERMISTOR_IS(55) // beta25 = 4267 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "ATC Semitec 104GT-2 (Used on ParCan)"
  125. #include "thermistor_55.h"
  126. #endif
  127. #if ANY_THERMISTOR_IS(60) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Maker's Tool Works Kapton Bed"
  128. #include "thermistor_60.h"
  129. #endif
  130. #if ANY_THERMISTOR_IS(61) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Formbot 350°C Thermistor"
  131. #include "thermistor_61.h"
  132. #endif
  133. #if ANY_THERMISTOR_IS(66) // beta25 = 4500 K, R25 = 2.5 MOhm, Pull-up = 4.7 kOhm, "DyzeDesign 500 °C Thermistor"
  134. #include "thermistor_66.h"
  135. #endif
  136. #if ANY_THERMISTOR_IS(67) // R25 = 500 KOhm, beta25 = 3800 K, 4.7 kOhm pull-up, SliceEngineering 450 °C Thermistor
  137. #include "thermistor_67.h"
  138. #endif
  139. #if ANY_THERMISTOR_IS(12) // beta25 = 4700 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Personal calibration for Makibox hot bed"
  140. #include "thermistor_12.h"
  141. #endif
  142. #if ANY_THERMISTOR_IS(70) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Hephestos 2, bqh2 stock thermistor"
  143. #include "thermistor_70.h"
  144. #endif
  145. #if ANY_THERMISTOR_IS(75) // beta25 = 4100 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "MGB18-104F39050L32 thermistor"
  146. #include "thermistor_75.h"
  147. #endif
  148. #if ANY_THERMISTOR_IS(99) // 100k bed thermistor with a 10K pull-up resistor (on some Wanhao i3 models)
  149. #include "thermistor_99.h"
  150. #endif
  151. #if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup
  152. #include "thermistor_110.h"
  153. #endif
  154. #if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup
  155. #include "thermistor_147.h"
  156. #endif
  157. #if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord
  158. #include "thermistor_201.h"
  159. #endif
  160. #if ANY_THERMISTOR_IS(202) // 200K thermistor in Copymaker3D hotend
  161. #include "thermistor_202.h"
  162. #endif
  163. #if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage for MEGA
  164. #include "thermistor_331.h"
  165. #endif
  166. #if ANY_THERMISTOR_IS(332) // Like table 1, but with 3V3 as input voltage for DUE
  167. #include "thermistor_332.h"
  168. #endif
  169. #if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pull-up = 10 kOhm, "Unidentified 200K NTC thermistor (Einstart S)"
  170. #include "thermistor_666.h"
  171. #endif
  172. #if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup
  173. #include "thermistor_1010.h"
  174. #endif
  175. #if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup
  176. #include "thermistor_1047.h"
  177. #endif
  178. #if ANY_THERMISTOR_IS(998) // User-defined table 1
  179. #include "thermistor_998.h"
  180. #endif
  181. #if ANY_THERMISTOR_IS(999) // User-defined table 2
  182. #include "thermistor_999.h"
  183. #endif
  184. #if ANY_THERMISTOR_IS(1000) // Custom
  185. const temp_entry_t temptable_1000[] PROGMEM = { { 0, 0 } };
  186. #endif
  187. #define _TT_NAME(_N) temptable_ ## _N
  188. #define TT_NAME(_N) _TT_NAME(_N)
  189. #if THERMISTOR_HEATER_0
  190. #define HEATER_0_TEMPTABLE TT_NAME(THERMISTOR_HEATER_0)
  191. #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE)
  192. #elif defined(HEATER_0_USES_THERMISTOR)
  193. #error "No heater 0 thermistor table specified"
  194. #else
  195. #define HEATER_0_TEMPTABLE nullptr
  196. #define HEATER_0_TEMPTABLE_LEN 0
  197. #endif
  198. #if THERMISTOR_HEATER_1
  199. #define HEATER_1_TEMPTABLE TT_NAME(THERMISTOR_HEATER_1)
  200. #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE)
  201. #elif defined(HEATER_1_USES_THERMISTOR)
  202. #error "No heater 1 thermistor table specified"
  203. #else
  204. #define HEATER_1_TEMPTABLE nullptr
  205. #define HEATER_1_TEMPTABLE_LEN 0
  206. #endif
  207. #if THERMISTOR_HEATER_2
  208. #define HEATER_2_TEMPTABLE TT_NAME(THERMISTOR_HEATER_2)
  209. #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE)
  210. #elif defined(HEATER_2_USES_THERMISTOR)
  211. #error "No heater 2 thermistor table specified"
  212. #else
  213. #define HEATER_2_TEMPTABLE nullptr
  214. #define HEATER_2_TEMPTABLE_LEN 0
  215. #endif
  216. #if THERMISTOR_HEATER_3
  217. #define HEATER_3_TEMPTABLE TT_NAME(THERMISTOR_HEATER_3)
  218. #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE)
  219. #elif defined(HEATER_3_USES_THERMISTOR)
  220. #error "No heater 3 thermistor table specified"
  221. #else
  222. #define HEATER_3_TEMPTABLE nullptr
  223. #define HEATER_3_TEMPTABLE_LEN 0
  224. #endif
  225. #if THERMISTOR_HEATER_4
  226. #define HEATER_4_TEMPTABLE TT_NAME(THERMISTOR_HEATER_4)
  227. #define HEATER_4_TEMPTABLE_LEN COUNT(HEATER_4_TEMPTABLE)
  228. #elif defined(HEATER_4_USES_THERMISTOR)
  229. #error "No heater 4 thermistor table specified"
  230. #else
  231. #define HEATER_4_TEMPTABLE nullptr
  232. #define HEATER_4_TEMPTABLE_LEN 0
  233. #endif
  234. #if THERMISTOR_HEATER_5
  235. #define HEATER_5_TEMPTABLE TT_NAME(THERMISTOR_HEATER_5)
  236. #define HEATER_5_TEMPTABLE_LEN COUNT(HEATER_5_TEMPTABLE)
  237. #elif defined(HEATER_5_USES_THERMISTOR)
  238. #error "No heater 5 thermistor table specified"
  239. #else
  240. #define HEATER_5_TEMPTABLE nullptr
  241. #define HEATER_5_TEMPTABLE_LEN 0
  242. #endif
  243. #if THERMISTOR_HEATER_6
  244. #define HEATER_6_TEMPTABLE TT_NAME(THERMISTOR_HEATER_6)
  245. #define HEATER_6_TEMPTABLE_LEN COUNT(HEATER_6_TEMPTABLE)
  246. #elif defined(HEATER_6_USES_THERMISTOR)
  247. #error "No heater 6 thermistor table specified"
  248. #else
  249. #define HEATER_6_TEMPTABLE nullptr
  250. #define HEATER_6_TEMPTABLE_LEN 0
  251. #endif
  252. #if THERMISTOR_HEATER_7
  253. #define HEATER_7_TEMPTABLE TT_NAME(THERMISTOR_HEATER_7)
  254. #define HEATER_7_TEMPTABLE_LEN COUNT(HEATER_7_TEMPTABLE)
  255. #elif defined(HEATER_7_USES_THERMISTOR)
  256. #error "No heater 7 thermistor table specified"
  257. #else
  258. #define HEATER_7_TEMPTABLE nullptr
  259. #define HEATER_7_TEMPTABLE_LEN 0
  260. #endif
  261. #ifdef THERMISTORBED
  262. #define BED_TEMPTABLE TT_NAME(THERMISTORBED)
  263. #define BED_TEMPTABLE_LEN COUNT(BED_TEMPTABLE)
  264. #elif defined(HEATER_BED_USES_THERMISTOR)
  265. #error "No bed thermistor table specified"
  266. #else
  267. #define BED_TEMPTABLE_LEN 0
  268. #endif
  269. #ifdef THERMISTORCHAMBER
  270. #define CHAMBER_TEMPTABLE TT_NAME(THERMISTORCHAMBER)
  271. #define CHAMBER_TEMPTABLE_LEN COUNT(CHAMBER_TEMPTABLE)
  272. #elif defined(HEATER_CHAMBER_USES_THERMISTOR)
  273. #error "No chamber thermistor table specified"
  274. #else
  275. #define CHAMBER_TEMPTABLE_LEN 0
  276. #endif
  277. #ifdef THERMISTORPROBE
  278. #define PROBE_TEMPTABLE TT_NAME(THERMISTORPROBE)
  279. #define PROBE_TEMPTABLE_LEN COUNT(PROBE_TEMPTABLE)
  280. #elif defined(HEATER_PROBE_USES_THERMISTOR)
  281. #error "No probe thermistor table specified"
  282. #else
  283. #define PROBE_TEMPTABLE_LEN 0
  284. #endif
  285. // The SCAN_THERMISTOR_TABLE macro needs alteration?
  286. static_assert(
  287. HEATER_0_TEMPTABLE_LEN < 256 && HEATER_1_TEMPTABLE_LEN < 256
  288. && HEATER_2_TEMPTABLE_LEN < 256 && HEATER_3_TEMPTABLE_LEN < 256
  289. && HEATER_4_TEMPTABLE_LEN < 256 && HEATER_5_TEMPTABLE_LEN < 256
  290. && HEATER_6_TEMPTABLE_LEN < 256 && HEATER_7_TEMPTABLE_LEN < 256
  291. && BED_TEMPTABLE_LEN < 256 && CHAMBER_TEMPTABLE_LEN < 256
  292. && PROBE_TEMPTABLE_LEN < 256,
  293. "Temperature conversion tables over 255 entries need special consideration."
  294. );
  295. // Set the high and low raw values for the heaters
  296. // For thermistors the highest temperature results in the lowest ADC value
  297. // For thermocouples the highest temperature results in the highest ADC value
  298. #define _TT_REV(N) REVERSE_TEMP_SENSOR_RANGE_##N
  299. #define TT_REV(N) _TT_REV(N)
  300. #ifdef HEATER_0_TEMPTABLE
  301. #if TT_REV(THERMISTOR_HEATER_0)
  302. #define HEATER_0_SENSOR_MINTEMP_IND 0
  303. #define HEATER_0_SENSOR_MAXTEMP_IND HEATER_0_TEMPTABLE_LEN - 1
  304. #else
  305. #define HEATER_0_SENSOR_MINTEMP_IND HEATER_0_TEMPTABLE_LEN - 1
  306. #define HEATER_0_SENSOR_MAXTEMP_IND 0
  307. #endif
  308. #endif
  309. #ifdef HEATER_1_TEMPTABLE
  310. #if TT_REV(THERMISTOR_HEATER_1)
  311. #define HEATER_1_SENSOR_MINTEMP_IND 0
  312. #define HEATER_1_SENSOR_MAXTEMP_IND HEATER_1_TEMPTABLE_LEN - 1
  313. #else
  314. #define HEATER_1_SENSOR_MINTEMP_IND HEATER_1_TEMPTABLE_LEN - 1
  315. #define HEATER_1_SENSOR_MAXTEMP_IND 0
  316. #endif
  317. #endif
  318. #ifdef HEATER_2_TEMPTABLE
  319. #if TT_REV(THERMISTOR_HEATER_2)
  320. #define HEATER_2_SENSOR_MINTEMP_IND 0
  321. #define HEATER_2_SENSOR_MAXTEMP_IND HEATER_2_TEMPTABLE_LEN - 1
  322. #else
  323. #define HEATER_2_SENSOR_MINTEMP_IND HEATER_2_TEMPTABLE_LEN - 1
  324. #define HEATER_2_SENSOR_MAXTEMP_IND 0
  325. #endif
  326. #endif
  327. #ifdef HEATER_3_TEMPTABLE
  328. #if TT_REV(THERMISTOR_HEATER_3)
  329. #define HEATER_3_SENSOR_MINTEMP_IND 0
  330. #define HEATER_3_SENSOR_MAXTEMP_IND HEATER_3_TEMPTABLE_LEN - 1
  331. #else
  332. #define HEATER_3_SENSOR_MINTEMP_IND HEATER_3_TEMPTABLE_LEN - 1
  333. #define HEATER_3_SENSOR_MAXTEMP_IND 0
  334. #endif
  335. #endif
  336. #ifdef HEATER_4_TEMPTABLE
  337. #if TT_REV(THERMISTOR_HEATER_4)
  338. #define HEATER_4_SENSOR_MINTEMP_IND 0
  339. #define HEATER_4_SENSOR_MAXTEMP_IND HEATER_4_TEMPTABLE_LEN - 1
  340. #else
  341. #define HEATER_4_SENSOR_MINTEMP_IND HEATER_4_TEMPTABLE_LEN - 1
  342. #define HEATER_4_SENSOR_MAXTEMP_IND 0
  343. #endif
  344. #endif
  345. #ifdef HEATER_5_TEMPTABLE
  346. #if TT_REV(THERMISTOR_HEATER_5)
  347. #define HEATER_5_SENSOR_MINTEMP_IND 0
  348. #define HEATER_5_SENSOR_MAXTEMP_IND HEATER_5_TEMPTABLE_LEN - 1
  349. #else
  350. #define HEATER_5_SENSOR_MINTEMP_IND HEATER_5_TEMPTABLE_LEN - 1
  351. #define HEATER_5_SENSOR_MAXTEMP_IND 0
  352. #endif
  353. #endif
  354. #ifdef HEATER_6_TEMPTABLE
  355. #if TT_REV(THERMISTOR_HEATER_6)
  356. #define HEATER_6_SENSOR_MINTEMP_IND 0
  357. #define HEATER_6_SENSOR_MAXTEMP_IND HEATER_6_TEMPTABLE_LEN - 1
  358. #else
  359. #define HEATER_6_SENSOR_MINTEMP_IND HEATER_6_TEMPTABLE_LEN - 1
  360. #define HEATER_6_SENSOR_MAXTEMP_IND 0
  361. #endif
  362. #endif
  363. #ifdef HEATER_7_TEMPTABLE
  364. #if TT_REV(THERMISTOR_HEATER_7)
  365. #define HEATER_7_SENSOR_MINTEMP_IND 0
  366. #define HEATER_7_SENSOR_MAXTEMP_IND HEATER_7_TEMPTABLE_LEN - 1
  367. #else
  368. #define HEATER_7_SENSOR_MINTEMP_IND HEATER_7_TEMPTABLE_LEN - 1
  369. #define HEATER_7_SENSOR_MAXTEMP_IND 0
  370. #endif
  371. #endif
  372. #ifndef HEATER_0_RAW_HI_TEMP
  373. #if TT_REV(THERMISTOR_HEATER_0) || !defined(HEATER_0_USES_THERMISTOR)
  374. #define HEATER_0_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  375. #define HEATER_0_RAW_LO_TEMP 0
  376. #else
  377. #define HEATER_0_RAW_HI_TEMP 0
  378. #define HEATER_0_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  379. #endif
  380. #endif
  381. #ifndef HEATER_1_RAW_HI_TEMP
  382. #if TT_REV(THERMISTOR_HEATER_1) || !defined(HEATER_1_USES_THERMISTOR)
  383. #define HEATER_1_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  384. #define HEATER_1_RAW_LO_TEMP 0
  385. #else
  386. #define HEATER_1_RAW_HI_TEMP 0
  387. #define HEATER_1_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  388. #endif
  389. #endif
  390. #ifndef HEATER_2_RAW_HI_TEMP
  391. #if TT_REV(THERMISTOR_HEATER_2) || !defined(HEATER_2_USES_THERMISTOR)
  392. #define HEATER_2_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  393. #define HEATER_2_RAW_LO_TEMP 0
  394. #else
  395. #define HEATER_2_RAW_HI_TEMP 0
  396. #define HEATER_2_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  397. #endif
  398. #endif
  399. #ifndef HEATER_3_RAW_HI_TEMP
  400. #if TT_REV(THERMISTOR_HEATER_3) || !defined(HEATER_3_USES_THERMISTOR)
  401. #define HEATER_3_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  402. #define HEATER_3_RAW_LO_TEMP 0
  403. #else
  404. #define HEATER_3_RAW_HI_TEMP 0
  405. #define HEATER_3_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  406. #endif
  407. #endif
  408. #ifndef HEATER_4_RAW_HI_TEMP
  409. #if TT_REV(THERMISTOR_HEATER_4) || !defined(HEATER_4_USES_THERMISTOR)
  410. #define HEATER_4_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  411. #define HEATER_4_RAW_LO_TEMP 0
  412. #else
  413. #define HEATER_4_RAW_HI_TEMP 0
  414. #define HEATER_4_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  415. #endif
  416. #endif
  417. #ifndef HEATER_5_RAW_HI_TEMP
  418. #if TT_REV(THERMISTOR_HEATER_5) || !defined(HEATER_5_USES_THERMISTOR)
  419. #define HEATER_5_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  420. #define HEATER_5_RAW_LO_TEMP 0
  421. #else
  422. #define HEATER_5_RAW_HI_TEMP 0
  423. #define HEATER_5_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  424. #endif
  425. #endif
  426. #ifndef HEATER_6_RAW_HI_TEMP
  427. #if TT_REV(THERMISTOR_HEATER_6) || !defined(HEATER_6_USES_THERMISTOR)
  428. #define HEATER_6_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  429. #define HEATER_6_RAW_LO_TEMP 0
  430. #else
  431. #define HEATER_6_RAW_HI_TEMP 0
  432. #define HEATER_6_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  433. #endif
  434. #endif
  435. #ifndef HEATER_7_RAW_HI_TEMP
  436. #if TT_REV(THERMISTOR_HEATER_7) || !defined(HEATER_7_USES_THERMISTOR)
  437. #define HEATER_7_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  438. #define HEATER_7_RAW_LO_TEMP 0
  439. #else
  440. #define HEATER_7_RAW_HI_TEMP 0
  441. #define HEATER_7_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  442. #endif
  443. #endif
  444. #ifndef HEATER_BED_RAW_HI_TEMP
  445. #if TT_REV(THERMISTORBED) || !defined(HEATER_BED_USES_THERMISTOR)
  446. #define HEATER_BED_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  447. #define HEATER_BED_RAW_LO_TEMP 0
  448. #else
  449. #define HEATER_BED_RAW_HI_TEMP 0
  450. #define HEATER_BED_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  451. #endif
  452. #endif
  453. #ifndef HEATER_CHAMBER_RAW_HI_TEMP
  454. #if TT_REV(THERMISTORCHAMBER) || !defined(HEATER_CHAMBER_USES_THERMISTOR)
  455. #define HEATER_CHAMBER_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  456. #define HEATER_CHAMBER_RAW_LO_TEMP 0
  457. #else
  458. #define HEATER_CHAMBER_RAW_HI_TEMP 0
  459. #define HEATER_CHAMBER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  460. #endif
  461. #endif
  462. #ifndef HEATER_PROBE_RAW_HI_TEMP
  463. #if TT_REV(THERMISTORPROBE) || !defined(HEATER_PROBE_USES_THERMISTOR)
  464. #define HEATER_PROBE_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
  465. #define HEATER_PROBE_RAW_LO_TEMP 0
  466. #else
  467. #define HEATER_PROBE_RAW_HI_TEMP 0
  468. #define HEATER_PROBE_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
  469. #endif
  470. #endif
  471. #undef _TT_REV
  472. #undef TT_REV