Database revolution

- added in fitbitData an interface for keeping track of date
- removed annoying IOException, now will write a LOG
- same thing in sensor
- fixed main and adapted to new Database system
- Database now has Local or Remote (to implement)
This commit is contained in:
2018-09-10 21:32:09 +02:00
parent 662fb40df3
commit a4c6c095c6
13 changed files with 399 additions and 312 deletions

View File

@@ -92,16 +92,17 @@ public class Sensor {
/**
* Fa in modo di forzare l'aggiornamento dei dispositivi
* @param timeout fa aspettare un tot di tempo prima di provare a forzare e dopo l'aggiornameto
* @throws InterruptedException nel caso che succeda qualcosa
*/
synchronized public void update(int timeout) throws InterruptedException {
wait(timeout);
for (Device device : devices.getAllDevices())
try {
device.update();
} catch (Exception e) {}
synchronized public void update(int timeout) {
try {
wait(timeout / 2);
for (Device device : devices.getAllDevices())
try {
device.update();
} catch (Exception e) { }
wait(timeout);
wait(timeout / 2);
} catch (InterruptedException e) { }
}
/*
public boolean IsLowLuminescence(int Luminescence) {