Crop type affects the output
This commit is contained in:
parent
d8ac8c32a5
commit
3dc1bcf466
13
index.html
13
index.html
@ -90,7 +90,20 @@
|
|||||||
draw_image_and_boxes(file, boxes);
|
draw_image_and_boxes(file, boxes);
|
||||||
|
|
||||||
const location = locationInput.value;
|
const location = locationInput.value;
|
||||||
|
|
||||||
|
if (cropTypeInput.value == "external") {
|
||||||
getWeather(location);
|
getWeather(location);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
const randomTips = [
|
||||||
|
"water your tomatoes every day.",
|
||||||
|
"keep the temperature between 20-25 degrees Celsius.",
|
||||||
|
"place the tomatoes in sunlight."];
|
||||||
|
|
||||||
|
const randomTip = randomTips[Math.floor(Math.random() * randomTips.length)];
|
||||||
|
document.getElementById("weatherInfo").innerText = "TIP! To maximalize your yields " + randomTip;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function draw_image_and_boxes(file, boxes) {
|
function draw_image_and_boxes(file, boxes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user