Sensor Motion application: cannot find where sensor data is read

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PaYe_4603801
Level 4
Level 4
5 likes given Welcome! 25 replies posted

Hello,

In the mesh_sensor_publish_timer_callback there is following instruction:

meshmesh_sensor_current_value = mesh_sensor_get_current_value();

Here is definition of mesh_sensor_get_current_value function:

int32_t mesh_sensor_get_current_value(void)

{

    return presence_detected;

}

But I didn't find where presence_detected is assigned ???

Any comments ?

Thanks

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

It is assigned and the value will be changed at various points in the program depending upon the conditions.

#181 wiced_bool_t  presence_detected = WICED_FALSE;

Thanks,

-Dheeraj

View solution in original post

3 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

It is assigned and the value will be changed at various points in the program depending upon the conditions.

#181 wiced_bool_t  presence_detected = WICED_FALSE;

Thanks,

-Dheeraj

But it happens that the presence is detected, then, the variable presence_detected should be assigned with the value TRUE.

Where such an assignment is made ?

0 Likes

Hi,

Please see the function definition of e93196_int_proc()  and mesh_sensor_presence_detected_timer_callback().

presence_detected value is getting changed in  these.

Thanks,

-Dheeraj