Apply #pragma once, misc cleanup (#12322)

* Apply #pragma once in headers
* Adjust some thermistors formatting
* Misc cleanup and formatting
This commit is contained in:
Scott Lahteine
2018-11-04 02:25:55 -06:00
committed by GitHub
parent 8696f882a9
commit f5eab912ed
179 changed files with 710 additions and 1343 deletions

View File

@ -22,17 +22,17 @@
// Pt1000 with 1k0 pullup
const short temptable_1010[][2] PROGMEM = {
PtLine( 0, 1000, 1000)
PtLine( 25, 1000, 1000)
PtLine( 50, 1000, 1000)
PtLine( 75, 1000, 1000)
PtLine(100, 1000, 1000)
PtLine(125, 1000, 1000)
PtLine(150, 1000, 1000)
PtLine(175, 1000, 1000)
PtLine(200, 1000, 1000)
PtLine(225, 1000, 1000)
PtLine(250, 1000, 1000)
PtLine(275, 1000, 1000)
PtLine( 0, 1000, 1000),
PtLine( 25, 1000, 1000),
PtLine( 50, 1000, 1000),
PtLine( 75, 1000, 1000),
PtLine(100, 1000, 1000),
PtLine(125, 1000, 1000),
PtLine(150, 1000, 1000),
PtLine(175, 1000, 1000),
PtLine(200, 1000, 1000),
PtLine(225, 1000, 1000),
PtLine(250, 1000, 1000),
PtLine(275, 1000, 1000),
PtLine(300, 1000, 1000)
};

View File

@ -23,11 +23,11 @@
// Pt1000 with 4k7 pullup
const short temptable_1047[][2] PROGMEM = {
// only a few values are needed as the curve is very flat
PtLine( 0, 1000, 4700)
PtLine( 50, 1000, 4700)
PtLine(100, 1000, 4700)
PtLine(150, 1000, 4700)
PtLine(200, 1000, 4700)
PtLine(250, 1000, 4700)
PtLine( 0, 1000, 4700),
PtLine( 50, 1000, 4700),
PtLine(100, 1000, 4700),
PtLine(150, 1000, 4700),
PtLine(200, 1000, 4700),
PtLine(250, 1000, 4700),
PtLine(300, 1000, 4700)
};

View File

@ -23,11 +23,11 @@
// Pt100 with 1k0 pullup
const short temptable_110[][2] PROGMEM = {
// only a few values are needed as the curve is very flat
PtLine( 0, 100, 1000)
PtLine( 50, 100, 1000)
PtLine(100, 100, 1000)
PtLine(150, 100, 1000)
PtLine(200, 100, 1000)
PtLine(250, 100, 1000)
PtLine( 0, 100, 1000),
PtLine( 50, 100, 1000),
PtLine(100, 100, 1000),
PtLine(150, 100, 1000),
PtLine(200, 100, 1000),
PtLine(250, 100, 1000),
PtLine(300, 100, 1000)
};

View File

@ -23,11 +23,11 @@
// Pt100 with 4k7 pullup
const short temptable_147[][2] PROGMEM = {
// only a few values are needed as the curve is very flat
PtLine( 0, 100, 4700)
PtLine( 50, 100, 4700)
PtLine(100, 100, 4700)
PtLine(150, 100, 4700)
PtLine(200, 100, 4700)
PtLine(250, 100, 4700)
PtLine( 0, 100, 4700),
PtLine( 50, 100, 4700),
PtLine(100, 100, 4700),
PtLine(150, 100, 4700),
PtLine(200, 100, 4700),
PtLine(250, 100, 4700),
PtLine(300, 100, 4700)
};

View File

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef THERMISTORS_H_
#define THERMISTORS_H_
#pragma once
#include "../../inc/MarlinConfig.h"
@ -36,9 +34,9 @@
// a=3.9083E-3, b=-5.775E-7
#define PtA 3.9083E-3
#define PtB -5.775E-7
#define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T)))
#define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1))
#define PtLine(T,R0,Rup) { OV(PtAdVal(T,R0,Rup)), T },
#define PtRt(T,R0) ((R0) * (1.0 + (PtA) * (T) + (PtB) * (T) * (T)))
#define PtAdVal(T,R0,Rup) (short)(1024 / (Rup / PtRt(T, R0) + 1))
#define PtLine(T,R0,Rup) { OV(PtAdVal(T, R0, Rup)), T }
#if ANY_THERMISTOR_IS(1) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "EPCOS"
#include "thermistor_1.h"
@ -276,5 +274,3 @@ static_assert(HEATER_0_TEMPTABLE_LEN < 256 && HEATER_1_TEMPTABLE_LEN < 256 && HE
#define HEATER_CHAMBER_RAW_LO_TEMP 0
#endif
#endif
#endif // THERMISTORS_H_