mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Unit - Fahrenheit support in language translations
°F Fahrenheit - You will find the default Fahrenheit configuration in the translation_xx.json If tempUnitFahrenheit is set to: true - you can switch in menu settings to Fahrenheit or Celsius. false - you see only Celsius. All settings are then is in Celsius only.
This commit is contained in:
@@ -52,9 +52,11 @@ uint32_t TipThermoModel::convertTipRawADCTouV(uint16_t rawADC) {
|
||||
uint32_t TipThermoModel::convertTipRawADCToDegC(uint16_t rawADC) {
|
||||
return convertuVToDegC(convertTipRawADCTouV(rawADC));
|
||||
}
|
||||
#ifdef ENABLED_FAHRENHEIT_SUPPORT
|
||||
uint32_t TipThermoModel::convertTipRawADCToDegF(uint16_t rawADC) {
|
||||
return convertuVToDegF(convertTipRawADCTouV(rawADC));
|
||||
}
|
||||
#endif
|
||||
|
||||
//Table that is designed to be walked to find the best sample for the lookup
|
||||
|
||||
@@ -76,6 +78,7 @@ uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) {
|
||||
return tipuVDelta;
|
||||
}
|
||||
|
||||
#ifdef ENABLED_FAHRENHEIT_SUPPORT
|
||||
uint32_t TipThermoModel::convertuVToDegF(uint32_t tipuVDelta) {
|
||||
tipuVDelta *= TIP_GAIN;
|
||||
tipuVDelta /= 1000;
|
||||
@@ -94,6 +97,7 @@ uint32_t TipThermoModel::convertFtoC(uint32_t degF) {
|
||||
return 0;
|
||||
return ((degF - 32) * 5) / 9;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t TipThermoModel::getTipInC(bool sampleNow) {
|
||||
uint32_t currentTipTempInC = TipThermoModel::convertTipRawADCToDegC(
|
||||
@@ -101,13 +105,14 @@ uint32_t TipThermoModel::getTipInC(bool sampleNow) {
|
||||
currentTipTempInC += getHandleTemperature() / 10; //Add handle offset
|
||||
return currentTipTempInC;
|
||||
}
|
||||
|
||||
#ifdef ENABLED_FAHRENHEIT_SUPPORT
|
||||
uint32_t TipThermoModel::getTipInF(bool sampleNow) {
|
||||
uint32_t currentTipTempInF = TipThermoModel::convertTipRawADCToDegF(
|
||||
getTipRawTemp(sampleNow));
|
||||
currentTipTempInF += convertCtoF(getHandleTemperature() / 10); //Add handle offset
|
||||
return currentTipTempInF;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t TipThermoModel::getTipMaxInC() {
|
||||
uint32_t maximumTipTemp = TipThermoModel::convertTipRawADCToDegC(
|
||||
|
||||
Reference in New Issue
Block a user