refactor: Improve style and code for log controller
This commit is contained in:
@@ -232,7 +232,7 @@
|
||||
if (!self.calibrazione) {
|
||||
if (!self.inCalibrazione) {
|
||||
if(timer > TEMPO_LATENZA_CALIBRAZIONE){
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": @"Avvio Calibrazione"}];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:EQNDebugLogWillUpdateNotification object:nil userInfo:@{@"messaggio": @"Avvio Calibrazione"}];
|
||||
|
||||
NSLog(@"Avvio Calibrazione");
|
||||
self.inCalibrazione = YES;
|
||||
@@ -267,7 +267,7 @@
|
||||
withObject:nil
|
||||
waitUntilDone:YES];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"Media %f stato %li", cal.media, (long)cal.stato ]}];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:EQNDebugLogWillUpdateNotification object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"Media %f stato %li", cal.media, (long)cal.stato ]}];
|
||||
|
||||
|
||||
if (self.calibrazione.stato == nonCalibrato){
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
NSLog(@"Rilevamento data %@ stato %li deviaizone %f ", ril.timestamp, (long)ril.rilievo, ril.deviazione);
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"Rilevamento data %@ stato %li deviaizone %f deviazione calibrazione %f", ril.timestamp, (long)ril.rilievo, ril.deviazione, self.calibrazione.deviazione]}];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:EQNDebugLogWillUpdateNotification object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"Rilevamento data %@ stato %li deviaizone %f deviazione calibrazione %f", ril.timestamp, (long)ril.rilievo, ril.deviazione, self.calibrazione.deviazione]}];
|
||||
|
||||
if (ril == NULL){
|
||||
[self performSelectorOnMainThread:@selector(avviaCalibrazione)
|
||||
@@ -353,10 +353,10 @@
|
||||
|
||||
[[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlMessagioStatoSmartPhone:anCalibrazione rilevamento:anRilevamento] richiesta:tipo success:^(id result) {
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"invio informazione al server tipo %ld inviato ", (long)tipo]}];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:EQNDebugLogWillUpdateNotification object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"invio informazione al server tipo %ld inviato ", (long)tipo]}];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"invio informazione al server tipo %ld fallito ", (long)tipo]}];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:EQNDebugLogWillUpdateNotification object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"invio informazione al server tipo %ld fallito ", (long)tipo]}];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user