package com.benjaminpiouffle.podfler;

import java.io.Serializable;

/**
 * Created by piouffb on 08/01/16.
 */
public class PlantWatcher implements Serializable {
    private final String name;
    private final String ip;
    private double airTemperature;
    private double airHumidity;
    private double groundHumidity;
    private double luminosity;

    public PlantWatcher(String name, String ip) {
        this.name = name;
        this.ip = ip;
        this.airTemperature = 0.0;
        this.airHumidity = 0.0;
        this.groundHumidity = 0.0;
        this.luminosity = 0.0;
    }

    public double getAirTemperature() {
        return airTemperature;
    }

    public void setAirTemperature(double airTemperature) {
        this.airTemperature = airTemperature;
    }

    public double getAirHumidity() {
        return airHumidity;
    }

    public void setAirHumidity(double airHumidity) {
        this.airHumidity = airHumidity;
    }

    public double getGroundHumidity() {
        return groundHumidity;
    }

    public void setGroundHumidity(double groundHumidity) {
        this.groundHumidity = groundHumidity;
    }

    public double getLuminosity() {
        return luminosity;
    }

    public void setLuminosity(double luminosity) {
        this.luminosity = luminosity;
    }

    public String getName() {
        return name;
    }

    public String getIp() {
        return ip;
    }
}

@@ -604,32 +604,30 @@
 lic 
-double getAirTemperature
+boolean requestNewData
 () %7B
@@ -642,29 +642,20 @@
  return 
-airTemperatur
+fals
 e;%0A    %7D
@@ -671,39 +671,19 @@
 lic 
-void setAirTemperature(
 double 
-a
+getA
 irTe
@@ -691,16 +691,17 @@
 perature
+(
 ) %7B%0A    
@@ -704,37 +704,22 @@
         
-this.airTemperature =
+return
  airTemp
@@ -726,32 +726,33 @@
 erature;%0A    %7D%0A%0A
+%0A
     public doubl
@@ -811,444 +811,138 @@
  %7D%0A%0A
-    public void setAirHumidity(double airHumidity) %7B%0A        this.airHumidity = airHumidity;%0A    %7D%0A%0A    public double getGroundHumidity() %7B%0A        return groundHumidity;%0A    %7D%0A%0A    public void setGroundHumidity(double groundHumidity) %7B%0A        this.groundHumidity = groundHumidity;%0A    %7D%0A%0A    public double getLuminosity() %7B%0A        return luminosity;%0A    %7D%0A%0A    public void setLuminosity(double luminosity) %7B%0A        this.luminosity =
+%0A    public double getGroundHumidity() %7B%0A        return groundHumidity;%0A    %7D%0A%0A%0A    public double getLuminosity() %7B%0A        return
  lum

Update PlantWatcher model