Problem flashing new CF firmware (I think?)

Post here to get support
Post Reply
stickcult
Beginner
Posts: 1
Joined: Sat Aug 24, 2013 7:39 am

Problem flashing new CF firmware (I think?)

Post by stickcult » Mon Aug 26, 2013 8:00 am

(I posted this a few days ago, but accidentally in the CrazyRadio support and not this one, oops)

Hello! Today I tried for the first time to jump in and modify the firmware code. The first thing I tried was adding new log groups and variables, just to confirm that I can actually make changes to the firmware.

In stabilizer.c, I added some log groups to expose the gyro and accelerometer values. Built with "make CLOAD=1" and then uploaded the cflie.bin file to the copter with the bootloader in the cfclient program. However, when it starts back up, I can't see any of my new log groups under Settings > Log Configurations. The only groups that are in there are motor, pm and stabilizer. I even tried commenting out the stabilizer log group in the stabilizer.c file and rebuilt and reflashed, but it still shows up in the cfclient when I reconnect.

I assume that when I make the .bin file is being changed, although I only know that it shows the date modified and created to be today.

Any ideas as to what I'm doing wrong or what step I'm missing?

Relevant code from stabilizer.c:

Code: Select all

LOG_GROUP_START(acc)
LOG_ADD(LOG_FLOAT, x, &acc.x)
LOG_ADD(LOG_FLOAT, y, &acc.y)
LOG_ADD(LOG_FLOAT, z, &acc.z)
LOG_GROUP_STOP(acc)

LOG_GROUP_START(gyro)
LOG_ADD(LOG_FLOAT, x, &gyro.x)
LOG_ADD(LOG_FLOAT, y, &gyro.y)
LOG_ADD(LOG_FLOAT, z, &gyro.z)
LOG_GROUP_STOP(gyro)

// LOG_GROUP_START(stabilizer)
// LOG_ADD(LOG_FLOAT, roll, &eulerRollActual)
// LOG_ADD(LOG_FLOAT, pitch, &eulerPitchActual)
// LOG_ADD(LOG_FLOAT, yaw, &eulerYawActual)
// LOG_ADD(LOG_UINT16, thrust, &actuatorThrust)
// LOG_GROUP_STOP(stabilizer)

LOG_GROUP_START(motor)
LOG_ADD(LOG_INT32, m4, &motorPowerM4) 
LOG_ADD(LOG_INT32, m1, &motorPowerM1) 
LOG_ADD(LOG_INT32, m2, &motorPowerM2) 
LOG_ADD(LOG_INT32, m3, &motorPowerM3) 
LOG_GROUP_STOP(motor)



Post Reply