mirror of
https://github.com/arwidcool/Solder-Plate.git
synced 2025-02-17 19:09:23 +01:00
Fixed glitch where the PID would randomly start again
This commit is contained in:
parent
d79bf1025f
commit
9b6040a98a
@ -13,7 +13,7 @@ PidController::PidController(double *input, double *output, double *setpoint)
|
||||
controller.setSampleTime(20);
|
||||
controller.setWindUpLimits(-100, 185);
|
||||
|
||||
controller.start();
|
||||
|
||||
}
|
||||
|
||||
double *PidController::compute()
|
||||
@ -51,4 +51,10 @@ void PidController::stop()
|
||||
{
|
||||
|
||||
controller.stop();
|
||||
controller.reset();
|
||||
}
|
||||
|
||||
void PidController::start()
|
||||
{
|
||||
controller.start();
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
void debug();
|
||||
void debug2(const char* extraText);
|
||||
void stop();
|
||||
void start();
|
||||
|
||||
boolean started = false;
|
||||
|
||||
|
12
src/main.cpp
12
src/main.cpp
@ -57,11 +57,11 @@ LEDS leds = LEDS();
|
||||
|
||||
|
||||
ReflowProfile profile = ReflowProfile(new ReflowStep[5]{
|
||||
ReflowStep(ReflowProcessState::PREHEAT, 2, 100),
|
||||
ReflowStep(ReflowProcessState::SOAK, 2, 140),
|
||||
ReflowStep(ReflowProcessState::REFLOW, 2, 160, EASE_IN_OUT),
|
||||
ReflowStep(ReflowProcessState::COOL, 2, 20),
|
||||
ReflowStep(ReflowProcessState::DONE, 0, 0)},
|
||||
ReflowStep(ReflowProcessState::PREHEAT, 2, 50),
|
||||
ReflowStep(ReflowProcessState::SOAK, 2, 70),
|
||||
ReflowStep(ReflowProcessState::REFLOW, 2, 85),
|
||||
ReflowStep(ReflowProcessState::COOL, 2, 20),
|
||||
ReflowStep(ReflowProcessState::DONE, 0, 0)},
|
||||
"meow\0");
|
||||
|
||||
// Reflowprofile profile = Reflowprofile(new ReflowStep[5]{
|
||||
@ -108,6 +108,8 @@ void setup()
|
||||
}
|
||||
reflowProcessState = USER_INPUT;
|
||||
profile.start();
|
||||
|
||||
controller.start();
|
||||
}
|
||||
|
||||
void loop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user