Hello, Aceinna.
Fortunately, we succeeded in uploading the bin file to the 330bi through the ST Link Utility.
However, one final barrier remains.
I want to receive Roll and Pitch values as well as Acceleration and Gyro from the 330BI. However, there are no roll and pitch values in the z1 packet.
So, I am testing it simply by entering the roll and pitch values into the Mag_x and Max_y values using below code.
BOOL Fill_z1PacketPayload(uint8_t *payload, uint8_t *payloadLen)
{
uint64_t tstamp;
double accels[NUM_AXIS];
double mags[NUM_AXIS];
double rates[NUM_AXIS];
real EulerAngles[NUM_AXIS];
data1_payload_t *pld = (data1_payload_t *)payload;
// tstamp = platformGetDacqTimeStamp(); // time stamp of last sensor sample in microseconds from system start
tstamp = platformGetCurrTimeStamp(); // current time stamp in microseconds from system start
// tstamp /= 1000; // convert to miliseconds
// timer = getSystemTime(); // OS timer value (tick defined in FreeRTOSConfig.h)
pld->timer = tstamp;
EKF_GetAttitude_EA(EulerAngles);
GetAccelData_mPerSecSq(accels);
GetRateData_degPerSec(rates);
GetMagData_G(mags);
for (int i = 0; i < NUM_AXIS; i++){
pld->accel_mpss[i] = (float)accels[i];
pld->rate_dps[i] = (float)rates[i];
//pld->mag_G[i] = (float)mags[i];
}
pld->mag_G[0] = (float)EulerAngles[ROLL];
pld->mag_G[1] = (float)EulerAngles[PITCH];
*payloadLen = sizeof(data1_payload_t);
return TRUE;
}
However, when we get the EulerAngles[ROLL] and EulerAngles[PITCH], those values were zero....................................................
How to get the slope data from the 330BI?????