Add thermocouple with AD8495 support
This commit is contained in:
committed by
Scott Lahteine
parent
00e86f1c2d
commit
e911635fb1
@ -972,7 +972,11 @@ float Temperature::analog2temp(const int raw, const uint8_t e) {
|
||||
|
||||
return celsius;
|
||||
}
|
||||
#if defined(HEATER_USES_AD8495)
|
||||
return ((raw * (660.0 / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD8495_GAIN)) + TEMP_SENSOR_AD8495_OFFSET;
|
||||
#else
|
||||
return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
@ -1002,6 +1006,10 @@ float Temperature::analog2temp(const int raw, const uint8_t e) {
|
||||
|
||||
return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET;
|
||||
|
||||
#elif defined(BED_USES_AD8495)
|
||||
|
||||
return ((raw * (660.0 / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD8495_GAIN)) + TEMP_SENSOR_AD8495_OFFSET;
|
||||
|
||||
#else
|
||||
|
||||
UNUSED(raw);
|
||||
@ -1038,6 +1046,10 @@ float Temperature::analog2temp(const int raw, const uint8_t e) {
|
||||
|
||||
return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET;
|
||||
|
||||
#elif defined(CHAMBER_USES_AD8495)
|
||||
|
||||
return ((raw * (660.0 / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD8495_GAIN)) + TEMP_SENSOR_AD8495_OFFSET;
|
||||
|
||||
#else
|
||||
|
||||
UNUSED(raw);
|
||||
|
Reference in New Issue
Block a user