This commit is contained in:
Matthew Kennedy 2020-10-31 18:44:09 -07:00
parent 139a5fef81
commit 85b0c4b6b4
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ static HeaterState GetNextState(HeaterState state, float sensorEsr)
return state;
}
static Pid heaterPid(0.05f, 0.15f, HEATER_CONTROL_PERIOD);
static Pid heaterPid(0.01f, 0.05f, HEATER_CONTROL_PERIOD);
static float GetDutyForState(HeaterState state, float heaterEsr)
{

View File

@ -7,7 +7,7 @@
#include "ch.h"
static Pid pumpPid(0, 0.01f, 2);
static Pid pumpPid(50.0f, 300.0f, 2);
static THD_WORKING_AREA(waPumpThread, 256);
static void PumpThread(void*)
@ -22,7 +22,7 @@ static void PumpThread(void*)
float result = pumpPid.GetOutput(NERNST_TARGET, nernstVoltage);
// result is in mA
SetPumpCurrentTarget(result / 1000.0f);
SetPumpCurrentTarget(result * 1000);
}
// Run at 500hz