mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
* Enable PD Options * Make PDNegTimeout configureable * Add default value for PDNegTimeout, also for S60 and S60P * Add basic DC detection / correct debug readings while powered via DC * Add basic ThermoModel for C245 Tips * Modify op-amp gain
19 lines
724 B
C++
19 lines
724 B
C++
/*
|
|
* ThermoModel.cpp
|
|
*
|
|
* Created on: 1 May 2021
|
|
* Author: Ralim
|
|
*/
|
|
#include "TipThermoModel.h"
|
|
#include "Utils.h"
|
|
#include "configuration.h"
|
|
|
|
#if defined(TEMP_uV_LOOKUP_S60)
|
|
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return (tipuVDelta * 50) / 485; }
|
|
#elif defined(TEMP_uV_LOOKUP_S99)
|
|
// 42.85 uV / K -> 1/42.85 K/uV = 20/857
|
|
// TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return (tipuVDelta * 20) / 857; }
|
|
// Measurement is probably with heating element in series, thats why the reading differs from the approx 42.85 uV/K
|
|
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return (tipuVDelta * 1) / 30; }
|
|
#endif
|