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 <MD_REncoder.h>
|
||||
#include <Adafruit_MAX31865.h>
|
||||
//#include <EEPROM-Storage.h>
|
||||
#include <EEPROM-Storage.h>
|
||||
|
||||
// My Includes
|
||||
#include "config.h"
|
||||
#include "src/button/button.h"
|
||||
#include "src/slowPWM/slowPWM.h"
|
||||
#include "src/thermoControl/thermoControl.h"
|
||||
//#include "src/Arduino-PID-Library/PID_v1.h"
|
||||
//#include "src/thermoControl/thermoControl.h"
|
||||
#include "src/Arduino-PID-Library/PID_v1.h"
|
||||
|
||||
double KettleDuty = 0;
|
||||
double KettleSetpoint = 70;
|
||||
@ -32,7 +32,7 @@ slowPWM boilPWM;
|
||||
MD_REncoder rotary = MD_REncoder(encoderDT, encoderCLK);
|
||||
LiquidCrystal_I2C lcd(0x27, 20, 4);
|
||||
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
|
||||
// On/Off state of the kettle.
|
||||
@ -154,9 +154,9 @@ void run_tuning() {
|
||||
// Initial setup
|
||||
if(!tuning) {
|
||||
KettleDuty=50;
|
||||
Controller.SetNoiseBand(0.5);
|
||||
Controller.SetOutputStep(30);
|
||||
Controller.SetLookbackSec(20);
|
||||
Controller.NoiseBand(0.5);
|
||||
Controller.OutputStep(30);
|
||||
Controller.LookbackSec(20);
|
||||
Controller.Mode(AUTOMATIC);
|
||||
tuning=true;
|
||||
}
|
||||
@ -188,7 +188,6 @@ void loop() {
|
||||
if (!tuning) {
|
||||
run_kettle();
|
||||
} else {
|
||||
startAutoTune();
|
||||
run_tuning();
|
||||
}
|
||||
|
||||
@ -209,9 +208,9 @@ void loop() {
|
||||
}
|
||||
|
||||
void SaveTunings() {
|
||||
eepromKp = Controller.GetKp();
|
||||
eepromKi = Controller.GetKi();
|
||||
eepromKd = Controller.GetKd();
|
||||
eepromKp = Controller.Kp();
|
||||
eepromKi = Controller.Ki();
|
||||
eepromKd = Controller.Kd();
|
||||
}
|
||||
|
||||
void SerialSend()
|
||||
@ -222,9 +221,9 @@ void SerialSend()
|
||||
if(tuning){
|
||||
Serial.println("tuning mode");
|
||||
} else {
|
||||
Serial.print("kp: ");Serial.print(Controller.GetKp());Serial.print(" ");
|
||||
Serial.print("ki: ");Serial.print(Controller.GetKi());Serial.print(" ");
|
||||
Serial.print("kd: ");Serial.print(Controller.GetKd());Serial.println();
|
||||
Serial.print("kp: ");Serial.print(Controller.Kp());Serial.print(" ");
|
||||
Serial.print("ki: ");Serial.print(Controller.Ki());Serial.print(" ");
|
||||
Serial.print("kd: ");Serial.print(Controller.Kd());Serial.println();
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,7 +234,7 @@ void SerialReceive()
|
||||
myinput = Serial.readString();
|
||||
myinput.trim();
|
||||
if(myinput=="tune"){
|
||||
startAutoTune();
|
||||
tuning=true;
|
||||
} else if(myinput=="save") {
|
||||
SaveTunings();
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit b3255d94d45c7a24acf39312f85c8fb69ef7278a
|
||||
Subproject commit d565cded53094ac01a63078cd4c0f1295aad67b4
|
Loading…
Reference in New Issue
Block a user