想提取LQI值判斷距離
afIncomingMSGPacket_t *pkt;
uint8 msgLqi = pkt->LinkQuality;
輸入以上程式後能動作,但LQI值似乎固定不變,改變距離但LED動作不變
warning : variable "pkt" is used before its value is set
想請問是不是因為這句話寫的問題,如果是想請問該怎麼解決?
VV:
afIncomingMSGPacket_t pkt
zhung mao-jen:
回复 VV:
我把*拿掉後,COMPILE後卻出現
uint8 msgLqi = pkt->LinkQuality;
error : expression must have pointer type