@@ -502,21 +502,27 @@ public function SaveGeoloc($geoloc) {
502502 $ cmdgeoloc ->save ();
503503 }
504504
505- public function DelGeoloc ($ geoloc ) {
505+ public function delGeoloc ($ geoloc ) {
506+ log::add ('mobile ' , 'debug ' , 'Geoloc lancement DEL du mobile > ' .$ geoloc ['Iq ' ].' pour ' .$ geoloc ['id ' ]);
506507 $ eqLogicMobile = eqLogic::byLogicalId ($ geoloc ['Iq ' ], 'mobile ' );
507508 $ cmdgeoloc = cmd::byEqLogicIdAndLogicalId ($ eqLogicMobile ->getId (), 'geoId_ ' . $ geoloc ['id ' ]);
508- if (isset ($ cmdgeoloc )) {
509+ if (isset ($ cmdgeoloc )) {
509510 $ cmdgeoloc ->remove ();
510511 }
511512 }
512513
513514 public function EventGeoloc ($ geoloc ) {
515+ log::add ('mobile ' , 'debug ' , 'Geoloc Event du mobile > ' .$ geoloc ['Iq ' ].' pour ' .$ geoloc ['id ' ]);
514516 $ eqLogicMobile = eqLogic::byLogicalId ($ geoloc ['Iq ' ], 'mobile ' );
515517 $ cmdgeoloc = cmd::byEqLogicIdAndLogicalId ($ eqLogicMobile ->getId (), 'geoId_ ' . $ geoloc ['id ' ]);
516518 if (isset ($ cmdgeoloc )) {
517- if (geoloc['value ' ] != $ cmdgeoloc ->execCmd ()){
519+ log::add ('mobile ' , 'debug ' , 'commande trouvé ' );
520+ if (geoloc['value ' ] !== $ cmdgeoloc ->execCmd ()){
521+ log::add ('mobile ' , 'debug ' , 'Valeur non pareil. ' );
518522 $ cmdgeoloc ->event ($ geoloc ['value ' ]);
519- }
523+ }else {
524+ log::add ('mobile ' , 'debug ' , 'Valeur pareil. > ' .geoloc['value ' ].' / ' .$ cmdgeoloc ->execCmd ());
525+ }
520526 }
521527 }
522528
@@ -598,3 +604,4 @@ public function execute($_options = array()) {
598604}
599605
600606?>
607+
0 commit comments