Skip to content

Commit

Permalink
Merge pull request #107 from drolsen/development
Browse files Browse the repository at this point in the history
Rolls pump delay config into more universal system settings
  • Loading branch information
drolsen authored Aug 20, 2017
2 parents 7445d19 + 1c2ddee commit 70e554e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions Crops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ void cropBuild(){
SD.mkdir("dromatic/" + cropName + "/Sys/PHDly");
SD.mkdir("dromatic/" + cropName + "/Sys/PHAmnt");
SD.mkdir("dromatic/" + cropName + "/Sys/PumpCal");
SD.mkdir("dromatic/" + cropName + "/Sys/PumpDly");

//Crop Settings
SD.mkdir("dromatic/" + cropName + "/Crop");
Expand Down
5 changes: 2 additions & 3 deletions Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ const char _startend[9] PROGMEM = "STARTEND";
const char _weeks[6] PROGMEM = "WEEKS";
const char _flowcal[8] PROGMEM = "FLOWCAL";
const char _manFlush[9] PROGMEM = "MANFLUSH";

const char _delay[6] PROGMEM = "DELAY";
const char _pumpDelay[8] PROGMEM = "PUMPDLY";


//Consolidated Repeating Displays Words
Expand Down Expand Up @@ -190,7 +189,7 @@ const char* const screenNames[menusBufferSize][3] PROGMEM = {
{ _regimens, NumberOf, RegimensDoses },
{ _weeks, NumberOf, Weeks },
{ _amt, RegimensML, Configuration },
{ _delay, PumpDose, DelayConfig },
{ _pumpDelay, PumpDose, DelayConfig },
{ _pumpCal, Pump, Calib },
{ _flowcal, FlowMeters, Calib },
{ _manFlush, Manual, Flush },
Expand Down
13 changes: 11 additions & 2 deletions Pumps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,18 @@ void printPumpDelay(int dir = 0){
if (tmpInts[0] <= 0){
tmpInts[0] = 1;
}
if (tmpInts[0] >= 100){
tmpInts[0] = 100;
}
}
lcd.clear();
if (tmpInts[0] >= 10){
lcd.print("0");
}else{
lcd.print("00");
}
lcd.print(String(tmpInts[0] * 60000) + F(" Min(s) Delay"));
lcd.print(tmpInts[0]);
lcd.print(F(" Min(s) Delay"));
lcd.setCursor(0, 2);
lcd.print(F("<back> <ok>"));
cursorX = 2;
Expand Down Expand Up @@ -109,7 +119,6 @@ void pumpCreate(String path, byte pumpIndex, int totalRegimens, JsonObject& regi
SD.mkdir(path + "/Prime");
if (pumpIndex <= 7){
SD.mkdir(path + "/Amount");
SD.mkdir(path + "/Delay");
for (byte j = 1; j <= totalRegimens; j++){
makeNewFile(path + "/pmpse" + j + ".dro", regimenData);
Serial.flush();
Expand Down

0 comments on commit 70e554e

Please sign in to comment.