1
0
forked from me/IronOS

Functioning MVP tester

This commit is contained in:
Ben V. Brown
2019-10-07 19:09:21 +11:00
parent 1cf88b2cd6
commit 64f8ca5c53
5 changed files with 27 additions and 12 deletions

View File

@@ -126,7 +126,6 @@ void startPIDTask(void const *argument __unused) {
if (ulTaskNotifyTake(pdTRUE, 2000)) {
// This is a call to block this thread until the ADC does its samples
uint16_t rawTemp = getTipRawTemp(1); // get instantaneous reading
if (currentTempTargetDegC) {
// Cap the max set point to 450C
if (currentTempTargetDegC > (450)) {
@@ -134,9 +133,7 @@ void startPIDTask(void const *argument __unused) {
currentTempTargetDegC = (450);
}
// Convert the current tip to degree's C
uint32_t currentTipTempInC =
TipThermoModel::convertTipRawADCToDegC(rawTemp);
currentTipTempInC += getHandleTemperature() / 10; //Add handle offset
uint32_t currentTipTempInC = TipThermoModel::getTipInC(true);
// As we get close to our target, temp noise causes the system
// to be unstable. Use a rolling average to dampen it.