mirror of
https://github.com/arwidcool/Solder-Plate.git
synced 2025-02-21 12:49:44 +01:00
commit
7357a157b9
21
src/main.cpp
21
src/main.cpp
@ -29,7 +29,10 @@ LEDS leds = LEDS();
|
|||||||
ArduPID PID;
|
ArduPID PID;
|
||||||
OledDisplay oled = OledDisplay();
|
OledDisplay oled = OledDisplay();
|
||||||
|
|
||||||
TemperatureController temperatureController ;
|
TFT_Display tftDisplay ;
|
||||||
|
|
||||||
|
|
||||||
|
TemperatureController temperatureController;
|
||||||
|
|
||||||
TFT_Display tftDisplay ;
|
TFT_Display tftDisplay ;
|
||||||
|
|
||||||
@ -91,7 +94,7 @@ void loop()
|
|||||||
{
|
{
|
||||||
Serial.println("State changed from " + String(STATE_STR(state)) + " to " + String(STATE_STR(newState)));
|
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)
|
// 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);
|
tftDisplay.init(&chosenReflowProfile);
|
||||||
chosenReflowProfile.start();
|
chosenReflowProfile.start();
|
||||||
@ -112,20 +115,12 @@ void loop()
|
|||||||
if (step.state != newState)
|
if (step.state != newState)
|
||||||
{
|
{
|
||||||
reflowProcessState.set(step.state);
|
reflowProcessState.set(step.state);
|
||||||
}
|
if (step.state == ReflowProcessState::DONE)
|
||||||
}
|
|
||||||
|
|
||||||
if (state == DONE)
|
|
||||||
{
|
{
|
||||||
// TODO: BUZZER
|
|
||||||
pidController.stop();
|
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();
|
uint32_t elapsedMS = timer.elapsed();
|
||||||
uint16_t startTimeMS = startTimes[STEPINDEX(reflowStep())] * 1000;
|
uint16_t startTimeMS = startTimes[STEPINDEX(reflowStep())] * 1000;
|
||||||
return (elapsedMS - startTimeMS) / 1000;
|
return (elapsedMS - startTimeMS) / 1000;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void toBuffer(uint8_t *b)
|
void toBuffer(uint8_t *b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user