Tracking down compile errors.
This commit is contained in:
parent
ac157d2acb
commit
455d5cc89f
@ -8,14 +8,14 @@
|
|||||||
#include <LiquidMenu.h> // LiquidMenu_config.h needs to be modified to use I2C.
|
#include <LiquidMenu.h> // LiquidMenu_config.h needs to be modified to use I2C.
|
||||||
#include <MD_REncoder.h>
|
#include <MD_REncoder.h>
|
||||||
#include <Adafruit_MAX31865.h>
|
#include <Adafruit_MAX31865.h>
|
||||||
//#include <EEPROM-Storage.h>
|
#include <EEPROM-Storage.h>
|
||||||
|
|
||||||
// My Includes
|
// My Includes
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "src/button/button.h"
|
#include "src/button/button.h"
|
||||||
#include "src/slowPWM/slowPWM.h"
|
#include "src/slowPWM/slowPWM.h"
|
||||||
#include "src/thermoControl/thermoControl.h"
|
//#include "src/thermoControl/thermoControl.h"
|
||||||
//#include "src/Arduino-PID-Library/PID_v1.h"
|
#include "src/Arduino-PID-Library/PID_v1.h"
|
||||||
|
|
||||||
double KettleDuty = 0;
|
double KettleDuty = 0;
|
||||||
double KettleSetpoint = 70;
|
double KettleSetpoint = 70;
|
||||||
@ -32,7 +32,7 @@ slowPWM boilPWM;
|
|||||||
MD_REncoder rotary = MD_REncoder(encoderDT, encoderCLK);
|
MD_REncoder rotary = MD_REncoder(encoderDT, encoderCLK);
|
||||||
LiquidCrystal_I2C lcd(0x27, 20, 4);
|
LiquidCrystal_I2C lcd(0x27, 20, 4);
|
||||||
Adafruit_MAX31865 thermoRTD = Adafruit_MAX31865(KettleRTD);
|
Adafruit_MAX31865 thermoRTD = Adafruit_MAX31865(KettleRTD);
|
||||||
Controller(&CurrentTemp, &KettleDuty, &KettleSetpoint, eepromKp, eepromKi, eepromKd, P_ON_M, DIRECT);
|
PID Controller(&CurrentTemp, &KettleDuty, &KettleSetpoint, eepromKp, eepromKi, eepromKd, P_ON_M, DIRECT);
|
||||||
|
|
||||||
// Return a character array to represent the
|
// Return a character array to represent the
|
||||||
// On/Off state of the kettle.
|
// On/Off state of the kettle.
|
||||||
@ -154,9 +154,9 @@ void run_tuning() {
|
|||||||
// Initial setup
|
// Initial setup
|
||||||
if(!tuning) {
|
if(!tuning) {
|
||||||
KettleDuty=50;
|
KettleDuty=50;
|
||||||
Controller.SetNoiseBand(0.5);
|
Controller.NoiseBand(0.5);
|
||||||
Controller.SetOutputStep(30);
|
Controller.OutputStep(30);
|
||||||
Controller.SetLookbackSec(20);
|
Controller.LookbackSec(20);
|
||||||
Controller.Mode(AUTOMATIC);
|
Controller.Mode(AUTOMATIC);
|
||||||
tuning=true;
|
tuning=true;
|
||||||
}
|
}
|
||||||
@ -188,7 +188,6 @@ void loop() {
|
|||||||
if (!tuning) {
|
if (!tuning) {
|
||||||
run_kettle();
|
run_kettle();
|
||||||
} else {
|
} else {
|
||||||
startAutoTune();
|
|
||||||
run_tuning();
|
run_tuning();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,9 +208,9 @@ void loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SaveTunings() {
|
void SaveTunings() {
|
||||||
eepromKp = Controller.GetKp();
|
eepromKp = Controller.Kp();
|
||||||
eepromKi = Controller.GetKi();
|
eepromKi = Controller.Ki();
|
||||||
eepromKd = Controller.GetKd();
|
eepromKd = Controller.Kd();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialSend()
|
void SerialSend()
|
||||||
@ -222,9 +221,9 @@ void SerialSend()
|
|||||||
if(tuning){
|
if(tuning){
|
||||||
Serial.println("tuning mode");
|
Serial.println("tuning mode");
|
||||||
} else {
|
} else {
|
||||||
Serial.print("kp: ");Serial.print(Controller.GetKp());Serial.print(" ");
|
Serial.print("kp: ");Serial.print(Controller.Kp());Serial.print(" ");
|
||||||
Serial.print("ki: ");Serial.print(Controller.GetKi());Serial.print(" ");
|
Serial.print("ki: ");Serial.print(Controller.Ki());Serial.print(" ");
|
||||||
Serial.print("kd: ");Serial.print(Controller.GetKd());Serial.println();
|
Serial.print("kd: ");Serial.print(Controller.Kd());Serial.println();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +234,7 @@ void SerialReceive()
|
|||||||
myinput = Serial.readString();
|
myinput = Serial.readString();
|
||||||
myinput.trim();
|
myinput.trim();
|
||||||
if(myinput=="tune"){
|
if(myinput=="tune"){
|
||||||
startAutoTune();
|
tuning=true;
|
||||||
} else if(myinput=="save") {
|
} else if(myinput=="save") {
|
||||||
SaveTunings();
|
SaveTunings();
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b3255d94d45c7a24acf39312f85c8fb69ef7278a
|
Subproject commit d565cded53094ac01a63078cd4c0f1295aad67b4
|
Loading…
Reference in New Issue
Block a user