[SOLVED] LED-ring initialization

Post here to get support
Post Reply
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

[SOLVED] LED-ring initialization

Post by Mitteau »

When I start my crazyflie 2, 2 times over 3, roughly, the parameters on LED-ring are not correct.
Namely, neffect=0.
I have to pass on bootloading configuration (blue led blinking), then start again. Then usually LE-ring parameters are OK (neffect=13).
Python GUI client was modified to to obtain white front LED switching with alt2 function.
What's happening ?
Thank you.
Jean-Claude
Last edited by Mitteau on Fri Feb 19, 2016 10:38 am, edited 1 time in total.
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Small difficulties

Post by Mitteau »

Hello everybody!
My crazyfklie2 flies perfect except for two points:
1/ LED ring does not initialize correctly. At starting time of CF, ring parameters are not accessed. For instance neffect=0 instead of 13. Perhaps failure of electronic ciruit?
2/ Newly bought motor support does not fix the motor. Even with some landings, motor escaped the support. i don't know if my support were bought at Seed studio or at French retailer La Drone. Probably the last one.
Some advice will be helpful.
best regards.
Jean-Claude
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: Small difficulties +

Post by Mitteau »

Hello friends !
Approximately half time I start my cf2, LED-ring parameters do not appear correct:for instance neffect is a wrong value. It is 0 in place of 13.
Everything else looks correct and the CF flies well.
I made a modification of the firmware ledring12.C

lines 209 à 213:
uint8_t reds[] = {1,2,3,4};
uint8_t greens[] = {8,9,10,11};
uint8_t whites[] = {5,6,7};
uint8_t blacks[] = {0};

Here is a modification of the python-GUI client in FlightTab.py:
line 186 self._ledring_nbr_effects = 12
line 215 self._ring_effect = 0
line 519 to 524
def alt2_updated(self, state):
if state :
if int(self.helper.cf.param.values["ring"]["headlightEnable"]) == 0 :
self.helper.cf.param.set_value("ring.headlightEnable", str(1))
else :
self.helper.cf.param.set_value("ring.headlightEnable", str(0))
(swithing head lights through Alt2 function)

Nothing else.

Here is the output of the console:

CFGBLK: v1, verification [OK]
IMU: MPU9250 I2C connection [OK].
IMU: AK8963 I2C connection [OK].
IMU: LPS25H I2C connection [OK].
DECK_DRIVERS: Found 4 drivers
DECK_INFO: Found 1 deck memory.
DECK_CORE: 1 deck enumerated
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
LPS25H: Self test [OK].
SYS: Free heap: 2872 bytes

Thank you for help!

Bye

Jean-Claude
derf
Expert
Posts: 163
Joined: Fri May 31, 2013 12:17 am
Location: Germany

Re: Small difficulties

Post by derf »

Hi Jean-Claude,

Please don't double-post the same topic and give the friendly people on the forum some time to reply.

Regards,

Fred
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: Small difficulties

Post by Mitteau »

Hey
I apologize.
Yours friendly.
Jean-Claude
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: [SOLVED] LED-ring initialization

Post by Mitteau »

Hi
LED ring initialization problem seems to be solved with the latest version of CF firmware (2016-02).
Bye
Jean-Claude
PhilipMC
Beginner
Posts: 6
Joined: Wed Mar 30, 2016 6:34 pm
Location: Kent, UK

Re: [SOLVED] LED-ring initialization

Post by PhilipMC »

I was just about to try the Experimental Attitude PID Settings. So I compiled the latest code and downloaded the crazyflie firmware. As a random test I thought would check through the ledring effects via the client.
I was surprised to see that the 'boat effect' had the lights laterally transposed... i.e. the green starboard lights were on the left and the red port lights were on the right!
Has somebody altered this on https://github.com/bitcraze/crazyflie-firmware? Can it be put back to the international standard?

Regards
Philip
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: [SOLVED] LED-ring initialization

Post by Mitteau »

Hi
Yes, the boat lights are green on the right side (starboard), red on left, nothing in front and black on the 3 rear leds. Modification is easy in ledring12.c, lines 209-212.
PhilipMC
Beginner
Posts: 6
Joined: Wed Mar 30, 2016 6:34 pm
Location: Kent, UK

Re: [SOLVED] LED-ring initialization

Post by PhilipMC »

Thanks Mitteau for your reply.
Yes I agree except with the default of green on the RHS (starboard). On a clean pull from git and compile, I have just tried it again without modifying ledring12.c . After I download the firmware to the crazyflie 2 I am physically getting green on the LHS (port) and red on the RHS (starboard). The ledring is mounted underneath with the battery on top and I have checked the orientation of the arrows to confirm that the deck is correctly mounted.

I am surprised to see this with unaltered code from git... hence my comment...Has somebody altered this on https://github.com/bitcraze/crazyflie-firmware?

Something somewhere must be wrong!

Regards
Philip
Post Reply