Commit 0950f794 authored by Jan Wagemakers's avatar Jan Wagemakers

YYMMDDhhmm check return value

parent 89eb018a
......@@ -108,38 +108,32 @@ public class StartupRunner implements CommandLineRunner {
if (SERIAL.open()) {
// set current outside temp / YY / MM / DD / hh / mm
if (oldOT != outsideTemp) {
oldOT = outsideTemp;
SERIAL.setOT(outsideTemp);
if (SERIAL.setOT(outsideTemp)) oldOT = outsideTemp;
}
int YY=rightNow.get(Calendar.YEAR)-2000;
if (oldYY != YY) {
oldYY = YY;
SERIAL.setYY(YY);
if (SERIAL.setYY(YY)) oldYY = YY;
}
int MM=rightNow.get(Calendar.MONTH) + 1;
if (oldMM != MM) {
oldMM = MM;
SERIAL.setMM(MM);
if (SERIAL.setMM(MM)) oldMM = MM;
}
int DD=rightNow.get(Calendar.DAY_OF_MONTH);
if (oldDD != DD) {
oldDD = DD;
SERIAL.setDD(DD);
if (SERIAL.setDD(DD)) oldDD = DD;
}
int hh=rightNow.get(Calendar.HOUR_OF_DAY);
if (oldhh != hh) {
oldhh = hh;
SERIAL.sethh(hh);
if (SERIAL.sethh(hh)) oldhh = hh;
}
int mm=rightNow.get(Calendar.MINUTE);
if (oldmm != mm) {
oldmm = mm;
SERIAL.setmm(mm);
if (SERIAL.setmm(mm)) oldmm = mm;
}
// get status of thermostats relais (OutPut)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment