static void battNotifyCB( linkDBItem_t *pLinkItem )
{
if ( pLinkItem->stateFlags & LINK_CONNECTED )
{
// uint16 value = GATTServApp_ReadCharCfg( pLinkItem->connectionHandle,
// battLevelClientCharCfg );
// if ( value & GATT_CLIENT_CFG_NOTIFY )
// {
attHandleValueNoti_t noti;
noti.handle = battAttrTbl[BATT_LEVEL_VALUE_IDX].handle;
noti.len = 1;
int16 ax, ay, az, aTemp,gx, gy, gz;
PGetMotion(&ax, &ay, &az, &aTemp, &gx, &gy, &gz);
noti.value[0] =az >> 8;
// noti.value[0] = gz & 0x00ff;
// noti.value[0] = battLevel;
GATT_Notification( pLinkItem->connectionHandle, ¬i, FALSE );
// }
}
}我要是不写那两句会有什么后果,// uint16 value = GATTServApp_ReadCharCfg( pLinkItem->connectionHandle,
// battLevelClientCharCfg ); 有什么用?