mirror of
https://github.com/arwidcool/Solder-Plate.git
synced 2025-02-17 19:09:23 +01:00
commit
7357a157b9
25
src/main.cpp
25
src/main.cpp
@ -29,7 +29,10 @@ LEDS leds = LEDS();
|
||||
ArduPID PID;
|
||||
OledDisplay oled = OledDisplay();
|
||||
|
||||
TemperatureController temperatureController ;
|
||||
TFT_Display tftDisplay ;
|
||||
|
||||
|
||||
TemperatureController temperatureController;
|
||||
|
||||
TFT_Display tftDisplay ;
|
||||
|
||||
@ -91,7 +94,7 @@ void loop()
|
||||
{
|
||||
Serial.println("State changed from " + String(STATE_STR(state)) + " to " + String(STATE_STR(newState)));
|
||||
// State changed from state to newState (user input or wifi input needs to be above here)
|
||||
if (newState == PREHEAT) {
|
||||
if (newState == ReflowProcessState::PREHEAT) {
|
||||
|
||||
tftDisplay.init(&chosenReflowProfile);
|
||||
chosenReflowProfile.start();
|
||||
@ -112,20 +115,12 @@ void loop()
|
||||
if (step.state != newState)
|
||||
{
|
||||
reflowProcessState.set(step.state);
|
||||
if (step.state == ReflowProcessState::DONE)
|
||||
{
|
||||
pidController.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (state == DONE)
|
||||
{
|
||||
// TODO: BUZZER
|
||||
pidController.stop();
|
||||
reflowProcessState.set(USER_INPUT);
|
||||
}
|
||||
|
||||
|
||||
// if (step.state == ReflowProcessState::DONE) {
|
||||
// profile.start();
|
||||
// return;
|
||||
// }
|
||||
// Serial.print(String(STATE_STR(step.state)) + " " + String(step.duration) + " " + String(step.targetTempAtEnd) + " " + String(profile.getTargetTemp())+"\r");
|
||||
}
|
||||
|
@ -187,6 +187,7 @@ public:
|
||||
uint32_t elapsedMS = timer.elapsed();
|
||||
uint16_t startTimeMS = startTimes[STEPINDEX(reflowStep())] * 1000;
|
||||
return (elapsedMS - startTimeMS) / 1000;
|
||||
|
||||
}
|
||||
|
||||
void toBuffer(uint8_t *b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user