void _uam_ppm_deinit(void);
-unsigned int _uam_pm_get_avaliable_sensors(void);
-
gboolean _uam_ppm_is_ready();
int _uam_ppm_handler_init(void);
UAM_DBG("Light: %s", type == UAS_PRESENCE ? "PRESENCE" : "ABSENCE");
+ if (UAS_PRESENCE == type) {
+ UAM_DBG("Presence detected by light sensor");
+ _uam_core_handle_presence_detected(UAM_SENSOR_BITMASK_LIGHT, 0, NULL);
+ } else {
+ UAM_DBG("Absence detected by light sensor");
+ _uam_core_handle_absence_detected(UAM_SENSOR_BITMASK_LIGHT, 0, NULL);
+ }
+
FUNC_EXIT;
}
UAM_DBG("Motion: %s", type == UAS_PRESENCE ? "PRESENCE" : "ABSENCE");
+ if (UAS_PRESENCE == type) {
+ UAM_DBG("Presence detected by motion sensor");
+ _uam_core_handle_presence_detected(UAM_SENSOR_BITMASK_MOTION, 0, NULL);
+ } else {
+ UAM_DBG("Absence detected by motion sensor");
+ _uam_core_handle_absence_detected(UAM_SENSOR_BITMASK_MOTION, 0, NULL);
+ }
+
FUNC_EXIT;
}
presence_cb cb; /**< presence_cb */
} _uam_req_cb_s;
-static GList *ppm_reqs = NULL; /**< list of requests from power plugin */
+static GSList *ppm_reqs = NULL; /**< list of requests from power plugin */
static void __uam_clear_ppm_reqs(void)
{
con->tid = TIMER_OFF;
ppm_reqs = g_list_remove(ppm_reqs, con);
- g_free(con);
+ free(con);
con = NULL;
UAM_DBG("[%d] request canceled", ids);