void SampleApp_SendPeriodicMessage( void )
{
char temp_buf[7];
char humi_buf[7];
char i;
char buf[14];
float humi,temp;
if(GetHumiAndTemp(&humi,&temp) == 0)
{
sprintf(humi_buf, (char *)"%f", humi);
sprintf(temp_buf, (char *)"%f", temp);
for(i=0; ihdr.event )
{
// Received when a key is pressed
case KEY_CHANGE:
SampleApp_HandleKeys( ((keyChange_t *)MSGpkt)->state, ((keyChange_t
*)MSGpkt)->keys );
break;
// Received when a messages is received (OTA) for this endpoint
case AF_INCOMING_MSG_CMD:
SampleApp_MessageMSGCB( MSGpkt );
break;;
// Received whenever the device changes state in the network
case ZDO_STATE_CHANGE:
SampleApp_NwkState = (devStates_t)(MSGpkt->hdr.status);
if ( (SampleApp_NwkState == DEV_ZB_COORD)
|| (SampleApp_NwkState == DEV_ROUTER)
|| (SampleApp_NwkState == DEV_END_DEVICE) )
{
// Start sending the periodic message in a regular interval.
HalLedSet(HAL_LED_1, HAL_LED_MODE_ON);
osal_start_timerEx( SampleApp_TaskID,
SAMPLEAPP_SEND_PERIODIC_MSG_EVT,
1