Skip to content

Commit

Permalink
Fixed method definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
pid1 committed Apr 27, 2015
1 parent 380858c commit 5486946
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/InputOutput/ServerThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

public class ServerThermo extends server implements Initializable,Serializable {

public ServerThermo() throws Exception {
super();
}

/**
*
*/
Expand Down
8 changes: 4 additions & 4 deletions src/thermostat/ThermostatDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ public ThermostatDevice(Integer updateIntervalInSeconds){
public void sensorUpdateEvent(Sensorable sensor) {
DataObject <String> value = sensor.getValue();
//System.out.println("New Sensor Event: "+ String.valueOf(value.getValue().intValue()));
this.updateServer(sensor.getValue());
this.updateServer(sensor.getValue(), serverIP);
}

private void updateServer(DataObject<String> dataReading){
//this.sendIP("192.168.1.2");
private void updateServer(DataObject<String> dataReading, String serverIP){
try {
this.sendCurrentTemp(dataReading.getValue(), serverIP);
//this.sendSerialNumber(this.serialNumber);
//this.sendIP("192.168.1.2");
} catch(Exception e){
System.out.println("Error sending to server");
}
//this.sendSerialNumber(this.serialNumber);
}

public static void main(String[] args){
Expand Down

0 comments on commit 5486946

Please sign in to comment.