Cannot read stabilizer

Firmware/software/electronics/mechanics
Post Reply
luisruiz
Beginner
Posts: 14
Joined: Fri May 31, 2013 7:39 am

Cannot read stabilizer

Post by luisruiz »

Hello,

I was trying to read some variables from the Crazyflie on the Windows side, when I read the accelerometer or the gyro axis with:

allVar_log_conf.addVariable(LogVariable("acc.x", "float"))
allVar_log_conf.addVariable(LogVariable("gyro.y", "float"))

everything is fine, but if I try to read the stabilizer, any variable, I can't. I am using the same instruccion, just change the name of the variable according to what I found on modules/src/stabilizer.c:

allVar_log_conf.addVariable(LogVariable("stabilizer.roll", "float"))

Is it posible to read it?

Thanks.
--Luis
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Cannot read stabilizer

Post by marcus »

Hi Luis,

There's an example on the wiki that shows what code should be added to the Crazyflie firmware and what should be added in the client.

When running those commands nothing will be read from the Crazyflie, it's just the configuration for the logging that you will create. You will also have to send it to the Crazyflie and then you will get messages back with logging data.
luisruiz
Beginner
Posts: 14
Joined: Fri May 31, 2013 7:39 am

Re: Cannot read stabilizer

Post by luisruiz »

Hello,

Thanks, the following is already in the firmware, in module \modules\src\stabilizer.c:

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)

WORKING ----> allVar_log_conf.addVariable(LogVariable("gyro.y", "float"))

NOT WORKING -----> allVar_log_conf.addVariable(LogVariable("stabilizer.roll", "float"))

So, I think the firmware part is covered, but I can not log any stabilizer variable on the client side. Am I missing something?? The gyro variables can be logged as explained in the Wiki but not the stabilizer ones.
Post Reply