Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vcoman/ces demo #6

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion agriculture/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ var stationValves = {};
var controllerWind = null;
var controllerWindDir = null;
var controllerRain = null;
var controllerRainDiff = null;
var controllerRadiation = null;
var controllerLuminosity = null;
var controllerTemperature = null;
Expand Down Expand Up @@ -550,6 +551,7 @@ function updateWeatherStation(response) {
controllerWindDirInfowElement.innerText = weatherStationStatus[ID_WIND_DIR];

// Update the rain value.
controllerRainDiff = weatherStationStatus[ID_RAIN];
controllerRain = weatherStationStatus[ID_RAIN_ACC];
let controllerRainElement = document.getElementById(ID_RAIN_ACC);
if (controllerRainElement != null)
Expand Down Expand Up @@ -956,7 +958,8 @@ function updateCurrentWeather() {
currentWeatherIcon = SUN_GREEN;
currentWeatherStatus = "sunny";

rain = document.getElementById("rain_acc").innerText;
//rain = document.getElementById("rain_acc").innerText;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

rain = controllerRainDiff
rain = parseInt(rain)
luminosity = document.getElementById("luminosity").innerText;
luminosity = parseInt(luminosity)
Expand Down