fixed bug display on before running and remove console
This commit is contained in:
parent
fcf1173ced
commit
cad5e9d287
|
@ -329,6 +329,7 @@ void loop(){
|
||||||
if (tickDiffSecond == (order / 4.0 * 4)) {
|
if (tickDiffSecond == (order / 4.0 * 4)) {
|
||||||
lcd.clear();
|
lcd.clear();
|
||||||
lcd.setCursor(cursorPositions[i][0], cursorPositions[i][1]);
|
lcd.setCursor(cursorPositions[i][0], cursorPositions[i][1]);
|
||||||
|
lcd.print("Aku siap!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,16 +478,18 @@ void runFermentasi() {
|
||||||
int waktuAkhirHistori = dataHistori[0]["waktu_akhir"];
|
int waktuAkhirHistori = dataHistori[0]["waktu_akhir"];
|
||||||
int waktuAwal = dataPengujianAwal["created_time"];
|
int waktuAwal = dataPengujianAwal["created_time"];
|
||||||
|
|
||||||
if (waktuAwal <= waktuAkhirHistori) {
|
if (dataPengujian.length() > 0) {
|
||||||
bool historiTerakhirBerhasil = (bool) dataHistori[0]["berhasil"];
|
if (waktuAwal <= waktuAkhirHistori) {
|
||||||
|
bool historiTerakhirBerhasil = (bool) dataHistori[0]["berhasil"];
|
||||||
|
|
||||||
if (historiTerakhirBerhasil) {
|
if (historiTerakhirBerhasil) {
|
||||||
status = "Matang";
|
status = "Matang";
|
||||||
|
} else {
|
||||||
|
status = "Gagal";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
status = "Gagal";
|
cekKematangan();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
cekKematangan();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
insertKondisiTapai();
|
insertKondisiTapai();
|
||||||
|
|
|
@ -139,8 +139,6 @@ export default function (props: JSX.HTMLAttributes<HTMLDivElement>) {
|
||||||
// .order("created_time", { ascending: false })
|
// .order("created_time", { ascending: false })
|
||||||
// .limit(1);
|
// .limit(1);
|
||||||
|
|
||||||
console.log(lastData1![0], lastData2![0]);
|
|
||||||
|
|
||||||
if (lastData1![0] == lastData2![0]) {
|
if (lastData1![0] == lastData2![0]) {
|
||||||
alert("Device offline!");
|
alert("Device offline!");
|
||||||
} else if (lastData1![0].created_time == lastData2![0].created_time) {
|
} else if (lastData1![0].created_time == lastData2![0].created_time) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default function () {
|
||||||
|
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
setKadarGas((val) => {
|
setKadarGas((val) => {
|
||||||
val.push(item.kadar_gas.toString().slice(0, 4));
|
val.push(item.kadar_gas);
|
||||||
return val;
|
return val;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ export default function () {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
callbacks: {
|
callbacks: {
|
||||||
label(tooltipItem) {
|
label(tooltipItem) {
|
||||||
return "Kadar Gas: " + tooltipItem.parsed.y + "%";
|
return "Kadar Gas: " + tooltipItem.parsed.y.toFixed(2) + "%";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue