fix: Default value to 0.0F instead of null

This commit is contained in:
Jean-Remy Hok 2022-01-11 15:43:36 +01:00
parent 9c04f6c9fd
commit 9c20191206
4 changed files with 4 additions and 4 deletions

View file

@ -29,7 +29,7 @@ public class Co2SensorController {
@PostMapping("/") @PostMapping("/")
public int addSensor() { public int addSensor() {
sensorValues.put(currentMaxId, null); sensorValues.put(currentMaxId, 0.0F);
return currentMaxId++; return currentMaxId++;
} }

View file

@ -29,7 +29,7 @@ public class GazSensorController {
@PostMapping("/") @PostMapping("/")
public int addSensor() { public int addSensor() {
sensorValues.put(currentMaxId, null); sensorValues.put(currentMaxId, 0.0F);
return currentMaxId++; return currentMaxId++;
} }

View file

@ -29,7 +29,7 @@ public class LightSensorController {
@PostMapping("/") @PostMapping("/")
public int addSensor() { public int addSensor() {
sensorValues.put(currentMaxId, null); sensorValues.put(currentMaxId, 0.0F);
return currentMaxId++; return currentMaxId++;
} }

View file

@ -29,7 +29,7 @@ public class TemperatureSensorController {
@PostMapping("/") @PostMapping("/")
public int addSensor() { public int addSensor() {
sensorValues.put(currentMaxId, null); sensorValues.put(currentMaxId, 0.0F);
return currentMaxId++; return currentMaxId++;
} }