Other Parts Discussed in Thread: LPSTK-CC1352R, CC1352R
Hi,
I just want to confirm something. I am connecting 2 LPSTK-CC1352R nodes to CC1352R Launchpad collector using TI 15.4 Stack. I am following the SimpleLink Academy LSPTK TI 15.4 Stack collector where you modify the code to print sensor values located at csf.c. The guide seems to be not updated. Because at the code below there is now a #ifdef LPSTK. My question is do I set the LPSTK as predefined symbol or not? Since I am connecting 2 LPSTK-CC1352R maybe I should?
/*!
The application calls this function to indicate that a device
has reported sensor data.
Public function defined in csf.h
*/
void Csf_deviceSensorDataUpdate(ApiMac_sAddr_t *pSrcAddr, int8_t rssi,
Smsgs_sensorMsg_t *pMsg)
{
#ifndef POWER_MEAS
LED_toggle(gGreenLedHandle);
#endif /* endif for POWER_MEAS */
#ifndef CUI_DISABLE
if(pMsg->frameControl & Smsgs_dataFields_bleSensor)
{
CUI_statusLinePrintf(csfCuiHndl, deviceStatusLine, "ADDR:%2x%2x%2x%2x%2x%2x, UUID:0x%04x, "
"ManFac:0x%04x, Length:%d, Data:0x%02x", pMsg->bleSensor.bleAddr[5],
pMsg->bleSensor.bleAddr[4], pMsg->bleSensor.bleAddr[3], pMsg->bleSensor.bleAddr[2],
pMsg->bleSensor.bleAddr[1], pMsg->bleSensor.bleAddr[0], pMsg->bleSensor.uuid,
pMsg->bleSensor.manFacID, pMsg->bleSensor.dataLength, pMsg->bleSensor.data[0]);
}
else
{
CUI_statusLinePrintf(csfCuiHndl, deviceStatusLine, "Sensor - Addr=0x%04x, Temp=%d, RSSI=%d",
pSrcAddr->addr.shortAddr, pMsg->tempSensor.ambienceTemp, rssi);
#ifdef LPSTK
CUI_statusLinePrintf(csfCuiHndl, lpstkDataStatusLine, "Humid=%d, Light=%d, Accl=(%d, %d, %d, %d, %d)",
pMsg->humiditySensor.humidity, pMsg->lightSensor.rawData,
pMsg->accelerometerSensor.xAxis, pMsg->accelerometerSensor.yAxis,
pMsg->accelerometerSensor.zAxis, pMsg->accelerometerSensor.xTiltDet,
pMsg->accelerometerSensor.yTiltDet);
#endif
}
CUI_statusLinePrintf(csfCuiHndl, numJoinDevStatusLine, "%x", getNumActiveDevices());
#endif /* CUI_DISABLE */
#if defined(MT_CSF)
MTCSF_sensorUpdateIndCB(pSrcAddr, rssi, pMsg);
#endif /* endif for MT_CSF */
}
-kel