make variable names more specific.
It's possible multiple vessels will need to be controlled in the future.
This commit is contained in:
parent
455d5cc89f
commit
23f5c79cf3
@ -22,9 +22,9 @@ double KettleSetpoint = 70;
|
||||
double CurrentTemp;
|
||||
bool tuning = false;
|
||||
|
||||
EEPROMStorage<double> eepromKp(0, 2.0); // 9 bytes for doubles 8 + 1 for checksum
|
||||
EEPROMStorage<double> eepromKi(9, 5.0);
|
||||
EEPROMStorage<double> eepromKd(18, 1.0);
|
||||
EEPROMStorage<double> kettleKp(0, 2.0); // 9 bytes for doubles 8 + 1 for checksum
|
||||
EEPROMStorage<double> kettleKi(9, 5.0);
|
||||
EEPROMStorage<double> kettleKd(18, 1.0);
|
||||
|
||||
// User I/O objects.
|
||||
Button Enter;
|
||||
@ -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);
|
||||
PID Controller(&CurrentTemp, &KettleDuty, &KettleSetpoint, eepromKp, eepromKi, eepromKd, P_ON_M, DIRECT);
|
||||
PID Controller(&CurrentTemp, &KettleDuty, &KettleSetpoint, kettleKp, kettleKi, kettleKd, P_ON_M, DIRECT);
|
||||
|
||||
// Return a character array to represent the
|
||||
// On/Off state of the kettle.
|
||||
@ -208,9 +208,9 @@ void loop() {
|
||||
}
|
||||
|
||||
void SaveTunings() {
|
||||
eepromKp = Controller.Kp();
|
||||
eepromKi = Controller.Ki();
|
||||
eepromKd = Controller.Kd();
|
||||
kettleKp = Controller.Kp();
|
||||
kettleKi = Controller.Ki();
|
||||
kettleKd = Controller.Kd();
|
||||
}
|
||||
|
||||
void SerialSend()
|
||||
|
Loading…
Reference in New Issue
Block a user