Skip to content

What the Bebop 2 4.7.1 aircraft accepts or refuses for ARDrone3 Animations.Flip

Static read of the Bebop 2 4.7.1 firmware’s handling of the ARDrone3 Animations.Flip command by one agent, 2026-10-05, commissioned for the skycontroller2 session’s flip questions. Status: Agent-cited, with these claims re-checked by the commissioning session in the config files: common/states.cfg lines 36 to 38 hold tresholdVbatMinForFlipPercent = 4.0, thresholdMaxHorizontalSpeedForFlip = 10.0 and maxAngularRateRefToFinishFlip = 216.0, and milosboard/states.cfg has no flip keys (control: a known key in the same files is found by the same search). The Flip direction enum order front, back, right, left was also read in the vendored ARSDK XML (the report cites this firmware’s own libarsdk.so; that cite was not re-read). Not re-derived: every disassembly claim (the handler at 0x58294, the state gate at 0x145a00, AnimationsQuad at 0x145730, the transition table), the flip’s timing and phases, and that the common values apply on a Bebop 2 (config layering was not read from the loader). Also unestablished: whether the hub battery value compared against 4.0 is a percentage or a fraction.

Nothing here is a flight procedure.

Static analysis of usr/bin/dragon-prog (rootfs firmware/extracted/bebop-2-4.7.1/rootfs), using the scratchpad disassembly dp.dis (vaddr = file offset + 0x10000 in text), libarsdk.so from the same rootfs, and the Colibry config files. No connection to any drone, controller, network host or mcbebop tool. Nothing was written outside the scratchpad.

Tags: Verified = I read the instructions, listing or config in this session. Agent-cited = taken from an existing note or earlier agent. Inference = my reading beyond the bytes. Open = not determined.

  1. The command is received by the callback at 0x58294 (registered at 0x6108c). It accepts direction values 0 to 3, anything else is logged (“unknown flip type”) and dropped. Valid values are queued as message id 152 (ANIMATION_START) with payload {1, direction}. Verified.
  2. A feature-level gate (function 0x145a00) allows the flip only when the flight state is Hovering, Flying, HoveringGps, GoToFix or Animation. Landed, takeoff, landing, emergency, flip-in-progress and the other states are refused with return code -11 and no flip-specific message. Verified for the gate; the link from the mailbox to this feature is Inference.
  3. Features::AnimationsQuad function 0x145730 then refuses if the horizontal speed is 10.0 m/s or more (thresholdMaxHorizontalSpeedForFlip) or if the battery field is 4.0 or less (tresholdVbatMinForFlipPercent, “Percent” in the name). Otherwise it posts event 15 (FLIP_COMMAND) to the flight state machine. Verified. No altitude, GPS, vertical camera, piloting-source or other-animation condition exists in the flip path.
  4. The state machine only has a FLIP_COMMAND transition from Hovering, Flying, HoveringGps and DemoMagicCarpet. From GoToFix and Animation the gate says yes but the event is dropped with an error log line (“EventsFsm: No transition from current state!”). Verified. GoToFix is, by its transitions, the state entered when the horizontal stick is released (Inference).
  5. Every refusal path found only writes to the aircraft’s own log. None of them sends a message to the controller. Verified for the functions read.
  6. An accepted flip enters ControlStateFlip: an upward impulse, a 360 degree rotation (about 0.33 s at a hardcoded 1080 deg/s) and a recovery, then FLIP_FINISHED returns to GoToFix. The estimated duration is about 0.465 s and a timeout ends it at 3 times that (about 1.4 s). Verified constants, phase meaning Inference.
  7. During the flip only EMERGENCY_EVENT has a transition out of the Flip state. Landing, critical battery and piloting events are dropped. Verified.
  8. Direction values in this firmware’s own libarsdk.so: FRONT 0, BACK 1, RIGHT 2, LEFT 3. Verified.
Step Evidence Status
Decoder registration COMMANDS_Receive_ThreadHandler: bl 0x34ef8 <ARCOMMANDS_Decoder_SetARDrone3AnimationsFlipCb@plt> at 0x6108c (PLT stub 0x34ef8 = GOT 0x57b284, the JUMP_SLOT for that symbol). The callback address is the literal at 0x611e0 plus 0x61090 = 0x58294 Verified
Callback 0x58294 Args: r0 = direction, r1 = user data. cmp r0,#3; addls pc,... jump table at 0x582e0. Direction 0 stores 0, 1 stores 1, 2 stores 3, 3 stores 2 into sp+4. sp+0 = 1. Then bl 0x6a374 with size 32 and message id #152 Verified
Bad direction or null user data r0 above 3 goes to 0x58360 which only logs (string literal at 0x48cedc is “unknown flip type”, referenced at 0x58388) and returns without queuing. Null r1 goes to 0x5832c, same Verified
Message id 152 0x6a374 calls the mailbox sender 0x67ec4 (type 4, id 152, 32 byte payload, mbox_push at 0x67f58). Name table at 0x574ae0, entry 152 = BEHAVIOUR_FEATURE_COMMANDS_MSG_ANIMATION_START. The older BEHAVIOUR_FEATURE_COMMANDS_MSG_FLIP is entry 21 and this callback does not use it Verified
Second decoder, Animation.Start_flip Callback 0x6514c (registered at 0x65d08). Identity map of directions, sp+0 = 1, same message id 152 Verified
Feature dispatcher Features::AnimationsQuad vtable 0x577170, slot 2 = 0x14d55c. It tests mask & (1 << msg[0]) with the mask at feature+0x2c, copies the 32 byte message to feature+12, and for msg[0] = 1 jumps to 0x1459a4. There msg[1] (the direction) is mapped 0 to 0, 1 to 1, 2 to 3, 3 to 2 and passed to vtable slot 4 (0x145730). If the mask bit is clear it returns -11 (0x14d698) Verified
Link from mailbox message 152 to this dispatcher The payload layout built at 0x58294 ({1, direction, …}) is exactly what the dispatcher reads. I did not find the generic caller of slot 2 Inference
Availability mask producer Function 0x145a00, stores to feature+0x2c at 0x145b94 Verified
Flip decision Features::AnimationsQuad slot 4, function 0x145730 (the “Flip refused” string is referenced at 0x1457d0) Verified
Only event 15 poster Scan of all mov r1,#N; bl 0x152398 pairs: event 15 appears once, at 0x145810 (tail call at 0x145820). Positive control with the same script: event 16 is found at 0x22d7a0 and 0x22d7e0, event 10 at 0x152510, event 8 at four sites, event 55 at eight sites Verified
Event names Name function 0x22d230 (switch on 0..63): 0 EMERGENCY_EVENT, 8 LANDING_COMMAND, 10 BATTERY_CRITICAL, 11 HORIZONTAL_COMMAND, 12 NO_HORIZONTAL_COMMAND, 13 VERTICAL_COMMAND, 14 GOTOFIX_FINISHED, 15 FLIP_COMMAND, 16 FLIP_FINISHED, 46 SENSOR_DEFECTIVE_BAROMETER, 47 EMERGENCY_LANDING_COMMAND Verified
State machine Constructor 0x1536d4, 231 addTransition calls to 0x152c00 (arguments: from in r1, event in r2, to in r3, states loaded from [mgr+off]). State ids come from the addState calls (0x1544cc onward, mov r2,#id; ldr r1,[r4,#off]; bl 0x151dc4). Offsets resolve to class names through the GOT vtable slots and the exported vtable symbols Verified

State ids used below, from the addState calls: 1 Emergency, 2 Landed, 3 TakeoffGround, 4 Takeoff, 5 Landing, 6 Hovering, 7 Flying, 8 WaitMotorRamping, 9 WaitMotorBraking, 10 Flip, 11 GoToFix, 14 DemoMagicCarpet, 16 TakeoffFlying, 18 HoveringGps, 44 Animation. As a sanity check, the battery-critical poster at 0x1524a0 skips states 1, 5, 9, 24 and 25, which are Emergency, Landing, WaitMotorBraking, LandingGps and LandingFlying by the same table. Verified.

There are three gates in sequence: A (availability), B (speed and battery), C (state machine transition).

Condition Evidence Status
Landed (2) Gate A bit is r7 << 1, where r7 = 1 only for state ids 18, 6, 7, 11, 44 (compares at 0x145a4c, 0x145b08, 0x145b18, 0x145b28, 0x145b38). Id 2 gives r7 = 0, so the dispatcher returns -11 Verified: refused
Takeoff states (TakeoffGround 3, Takeoff 4, TakeoffFlying 16, WaitMotorRamping 8, WaitThrownTakeoff) Not in the gate A set. Also no event-15 transition from them in the table Verified: refused
Landing states (Landing 5, LandingGps 24, LandingFlying 25, WaitMotorBraking 9) Not in the gate A set. No event-15 transition Verified: refused
Emergency (1), EmergencyLanding Not in the gate A set. No event-15 transition Verified: refused
Hovering (6) In gate A set. Transition Hovering --15--> Flip at 0x1552b4 Verified: accepted if B passes
Flying (7) In gate A set. Transition at 0x155584 Verified: accepted if B passes
HoveringGps (18) In gate A set. Transition at 0x156484 Verified: accepted if B passes
GoToFix (11) In gate A set, but the table has no event-15 transition from GoToFix (its events are 0, 11, 63, 14, 8, 10, 29, 46, 47, 43, 44, 35). Gate passes, state machine drops the event Verified: dropped. Meaning of GoToFix as the state after stick release: Inference
Animation state (44), i.e. another animation running In gate A set, no event-15 transition from Animation (events 0, 8, 10, 26, 46, 47, 56, 57, 60, 59, 58, 35) Verified: dropped
Flip already running (10) Not in gate A set, and the Flip state has only events 0 and 16 Verified: refused
DemoMagicCarpet (14) Not in gate A set (so refused at A), though the table has a 15 transition from it at 0x1561f0 Verified: refused at A
Battery level 0x1457ec reads float at hub+0x60c (hub getter 0x103820, +1536 +12) and compares with the config object field at +364; ble to the refusal path when battery <= threshold, so it must be strictly greater. The loader 0x1988bc stores tresholdVbatMinForFlipPercent at base+364 (add r4,r3,#364 at 0x1997b4). common/states.cfg line 36: tresholdVbatMinForFlipPercent = 4.0;. mykonos3board/states.cfg has 10.0 (not this aircraft). milosboard/states.cfg is a 3 line comment and defines no flip key Verified code and config values. That hub+0x60c is the battery percentage: Inference (key name ends in Percent; getter 0x126218 reads the same field and stores (u8) of it, and sits in the Features::CommonEstimation vtable at 0x576bb8; the user-facing message string says “or on battery voltage”)
Horizontal speed 0x145748 to 0x145768: s16 = sqrt(hub[1344+8]^2 + hub[1344+4]^2); compares with config field at +3016 (add r0,r0,#3008; vldr [r0,#8]); bgt continues only if threshold > speed. Loader stores thresholdMaxHorizontalSpeedForFlip at base+3008+8 (0x1a41e8 to 0x1a41f4). common/states.cfg line 37: thresholdMaxHorizontalSpeedForFlip = 10.0; Verified code and value. That the two hub floats are horizontal velocity components in m/s: Inference
Same config object for loader and check Both use the same two offsets (364, 3016) and the same key names. The config manager at 0x115d34 holds two libconfig::Config objects and builds the paths /etc/colibry/common/root.cfg and /etc/colibry/%s/root.cfg, so a key absent from the board file plausibly falls back to common. Lookup order was not read Inference. The same layering is Agent-cited in docs-site/.../colibry-config.md. The board set for a Bebop 2 (milosboard) is Agent-cited from one unit’s log
Altitude (minimum height) Whole body of 0x145730..0x145850 read: hub fields touched are +0x7f0 (store), +1344 (+4, +8), +1536 (+12); calls are only hub getters, sqrtf, ulog and the event post. Gate A reads hub+0x460, 0x464, 0x409, 0x594 and 0x7c8 only, and the flip bit depends only on 0x7c8. Flip entry (0x22dec0) has no refusal branch. No flip key about height exists in the config (grep -i flip over etc/colibry/{common,milosboard}: tresholdVbatMinForFlipPercent, thresholdMaxHorizontalSpeedForFlip, maxAngularRateRefToFinishFlip, maxVerticalAccelerationForFlip, ffLossForFlip, ffLossSlopeForFlip and the “Flip” gain and angle sets) Verified: no altitude condition in the flip path. Positive control: the same hub-field listing on the gate A function finds its five fields. Open: a general minAltitude = 0.5 (common/reference.cfg line 103, with minAltitudeConstrainDuration = 1.0) exists in reference processing; whether it acts during a flip was not traced
GPS No GPS field in the flip path. Not even HoveringGps is required (Hovering and Flying are enough) Verified: not required
Vertical camera or optical flow No such field in the flip path Verified: not required (absence as above)
Flight mode, piloting source, controller identity The callback 0x58294 checks only direction and the user data pointer. dragon-prog has no ARCOMMANDS_Filter call (0 hits in strings, 0 call sites; control: 114 ARCOMMANDS_Decoder strings and 233 decoder call sites with the same search) Verified in dragon-prog. Other processes and the network layer were not examined
Current attitude Not read by the flip path. The attitude angle limit during the flip is the config set “Flip” 1000 deg (common/reference.cfg line 12) Verified: no attitude precondition
A user “flips enabled” setting No string or code path found (strings for flip listed above) Verified by string search only (no setter seen)

Notes on the compare operators (Verified by reading): speed equal to 10.0 is refused (the continue branch needs threshold strictly greater than speed), and battery equal to 4.0 is refused (the refusal branch is taken on less-or-equal).

Refusal What happens Status
Unknown direction value (above 3) or null user data Log line “unknown flip type” (condition: log level above 2), return, nothing queued Verified
Gate A closed (wrong state) Dispatcher 0x14d55c returns -11 (mvn r0,#10 at 0x14d698). No flip-specific message in that function. What the caller does with the return value was not found Verified return code; consumer Open
Speed or battery refusal ulog_log_write level 4 with the string at 0x4bcc6c “Flip refused because of horizontal speed is over : %f m/s or on battery voltage” (the printed number is the speed threshold, loaded from +3016, not the measured speed). The function ends without posting the event and without a generator call. Note the direction is stored to hub+0x7f0 before the checks (0x145744), so a refused flip still overwrites that field Verified
State machine has no transition (GoToFix, Animation) Event 15 is queued (log level 6 “controller event: %s(%d)” at 0x1523e8). The processing loop 0x151a34 finds no transition and calls ulog_log_write level 3 with “EventsFsm: No transition from current state!” (string 0x4bd76c, xref 0x151a8c), then pops the event and continues. No state change, no message Verified
Messages to the app The aircraft has ARCOMMANDS_Generator_GenerateAnimationFlipState (called at 0x65a50 from the generic animation-state sender near 0x65910, states IDLE 0, RUNNING 1, CANCELING 2 in libarsdk.so at 0x4b610) and GenerateAnimationAvailability (0x65660). None of the refusal paths above call a generator. The feature reports its availability mask change to the behaviour layer (0x145d70, hook id 36, 4 bytes from feature+0x2c), which is how a controller could learn the flip bit is clear Verified for refusal paths; reaching the app via availability is Inference

Net result: a refused flip is silent toward the controller as far as these code paths show. The only visible effect is a line in the aircraft’s log.

Entry function ControlStateFlip vtable 0x578670: slot 0 entry 0x22dec0, slot 2 process 0x22ea78, slot 3 exit 0x22f0e8. Verified.

Item Evidence Status
State entered FSM state id 10 (Flip), from Hovering, Flying or HoveringGps (event 15) Verified
Rotation targets Entry switches on hub+0x7f0 (0x22e334): internal direction 0 stores -2 pi at state+0x20; 1 stores +2 pi at +0x20; 2 stores +2 pi at +0x1c; 3 stores -2 pi at +0x1c (constants 0xc0c90fdb and 0x40c90fdb). The process copies +0x1c and +0x20 into hub+1632 +8 and +12 every cycle in phase 1 (0x22ed2c to 0x22ed4c). Internal 0 front, 1 back, 2 right, 3 left (the two-stage swap above cancels for ARDrone3.Animations.Flip, and gives the same result for Animation.Start_flip) Verified targets. Which of +0x1c and +0x20 is roll and which is pitch, and which sign is nose down: Inference (consistent with front = negative pitch, right = positive roll)
Rotation rate and duration Entry stores 0x4196cbe4 (18.8496 rad/s, 1080 deg/s) into the config object field at +3652 (hardcoded, not a config key), then estimated duration = max(abs target) / 18.8496 + 0.132 (double at 0x22e6c8) = 0.3333 + 0.132 = about 0.465 s, logged as “Flip entry, estimated duration : %fs” Verified
Phase 0, launch state+0x10 = 0: writes 0.5 * 9.81 * duration (about 2.28) to hub+1808 and runs vertical-related helpers; moves to phase 1 when hub+1812 is at least 0.9 of that value (0x22eb68 to 0x22eb74) Verified code. Reading it as an upward vertical impulse: Inference
Phase 1, rotation Sets the attitude references to the +-2 pi targets and applies a thrust command formed from hub[3600+8] and hub[1840+8]; elapsed time is accumulated from the config period at +488; moves to phase 2 when elapsed is at least 0.6 times the estimated duration (about 0.28 s; constants at 0x22eee0 to 0x22eee8, branch at 0x22eed0) Verified code; thrust meaning Inference
Phase 2, recovery Reads hub[1136+8], hub[1136+12] magnitude and compares with 0.8727 rad/s (50 deg/s, 0x22eef4); sets phase 3 when abs(hub[1696]) and abs(hub[1700]) are both at most the config field at +4008, loaded from maxAngularRateRefToFinishFlip (216.0 deg/s in common/states.cfg line 38; the loader stores it at base+4008, 0x229848) and an elapsed-time test passes (0x22ecd4 to 0x22ed24) Verified code. What the four floats are physically: Open
Exit to GoToFix Common tail 0x22d764: if elapsed >= 3.0 * estimated duration (about 1.40 s) post event 16 and log “Flip exit on duration” (level 4); else if phase == 3 post event 16 and log “Flip exit on finished” (level 6). Transition Flip --16--> GoToFix at 0x1559bc Verified
Gains and limits Entry selects the config entries named “User”, “Flip” (0x22e228) and the exit restores “Flying” and “Default” (0x22f138, 0x22f270). Config: angle limit set “Flip” = [1000, 1000] deg (common/reference.cfg line 12), versus 35 deg for “Flying”. Milosboard gain sets “Default” and “Flip” are identical except that yaw gains are zero in “Flip” (psiKP 300 to 0, psiKD 30 to 0). Other flip keys: maxVerticalAccelerationForFlip 6.0 m/s2, ffLossForFlip 5.8, ffLossSlopeForFlip 0.3 Verified values. Which set each name selects: Inference. Consumers of the last three keys: Open
Motors, high level No direct motor calls in the Flip state. It changes attitude references, gains and a thrust command, so the quaternion controller and the motor mixer drive the rotation (the rest of the path is in earlier notes) Inference

Interruption during the flip (transitions out of Flip in the table: only two):

Event Result Status
EMERGENCY_EVENT (0) Flip --0--> Emergency at 0x155980 (motors stop in the Emergency entry per the earlier report) Verified. Sources of event 0 (user emergency command, motor errno 2 to 5 via the HAL result word) are Agent-cited from psoc-error-consumers.md; the Flip state itself does not read the HAL “motors spinning” word (scan of 0x22dec0..0x22f5c0 finds no read of sample+0x630 or hub+0x45d; positive control: the same scan finds both in the Landing process at 0x2305b4 and the Animation process at 0x2324dc)
FLIP_FINISHED (16) to GoToFix Verified
Low battery (BATTERY_CRITICAL, 10) No Flip transition for event 10. The event is dropped with the “No transition” error line and the flip continues. The poster 0x1524a0 skips only states 1, 5, 9, 24, 25, so it does post during a flip Verified
LANDING_COMMAND (8), HORIZONTAL_COMMAND (11), VERTICAL_COMMAND (13), SENSOR_DEFECTIVE_BAROMETER (46), EMERGENCY_LANDING_COMMAND (47) No transition from Flip, dropped the same way Verified
A second FLIP_COMMAND during the flip Closed at gate A (state 10 is not in the set) Verified
What the stick inputs do to the references during the flip Not traced (the Flip process overwrites the angle references each cycle in phase 1, which suggests the sticks do not steer it) Open
Source Evidence Values
libarsdk.so descriptor g_arsdk_cmd_desc_Ardrone3_Animations_Flip at 0x54cfc: name “Ardrone3.Animations.Flip”, project 1, class 5, command 0, one argument “Direction”, enum table at 0x557fc, count 4 Verified (read the descriptor and enum rows) FRONT 0, BACK 1, RIGHT 2, LEFT 3
Animation.Start_flip descriptor 0x4b488, argument “Type”, enum at 0x4b5e0 Verified FRONT 0, BACK 1, LEFT 2, RIGHT 3 (note the different order)
Animation.Flip_state enum at 0x4b610 Verified IDLE 0, RUNNING 1, CANCELING 2
Minidrone.Animations.Flip Descriptor 0x526d0, enum 0x52ae0 Not decoded (not this product)
dragon-prog internal direction Callback 0x58294 and dispatcher 0x1459a4 each swap 2 and 3; the Flip entry switch at 0x22e33c uses 0 and 1 for the pitch-type axis, 2 and 3 for the other axis Internal 0 front, 1 back, 2 right, 3 left (Verified from the two paths, which agree for both commands)

Mapping for the controller names, using the ARDrone3 table: flip_front = 0, flip_back = 1, flip_right = 2, flip_left = 3. The existing note sc-software-protocols.md lines 215 to 218 gives the controller arguments as left 3, right 2, front 0, back 1; that is Agent-cited here and agrees with the table above. I did not examine the controller side.

  • Event posting scan (mov r1,#N before bl 0x152398): found event 15 once; the same script finds events 16, 10, 8 and 55 where expected.
  • Hub-field scan of the flip handler found 0x7f0, +1344 and +1536; the same scan of the availability function finds 0x460, 0x464, 0x409, 0x594 and 0x7c8.
  • sample+0x630 and hub+0x45d scan over the Flip state found nothing; the same scan finds both in the Landing and Animation states.
  • ARCOMMANDS_Filter search found 0 hits; the same kind of search for ARCOMMANDS_Decoder finds 114 strings and 233 call sites.
  • Config values were read from the files: common/states.cfg lines 36 to 38, common/reference.cfg lines 12 and 105, common/controller.cfg lines 115 and 116, milosboard/controller.cfg gain sets. milosboard/states.cfg contains only comments.
  • The generic caller that hands mailbox message id 152 to AnimationsQuad slot 2, and what it does with the -11 return.
  • Whether Animation.Availability or Animation.FlipState reach the app for a flip, and what any other process (network layer, other daemons, PSOC firmware) does with the command.
  • Identity and units of the hub floats at +0x60c, +1344, +1136 and +1696 (inferred from names and use, not from a producer).
  • The lookup order of the two libconfig::Config objects (common first or board first), and whether the 4.0 and 10.0 values in common/states.cfg are really the ones in effect on a milosboard Bebop 2.
  • Consumers of maxVerticalAccelerationForFlip, ffLossForFlip, ffLossSlopeForFlip, and the exact meaning of the “User”, “Flip”, “Flying”, “Default” set selections.
  • Whether the general minAltitude reference constraint applies during a flip.
  • Any Skycontroller 2 behaviour, and the Minidrone.Animations.Flip path (message id 21).
  1. Is a flip requested in GoToFix (right after the stick is released) really dropped with only a log line? The gate and the table say so; the consequence for the pilot depends on how long the state lasts, which was not measured.
  2. Does the app ever see the flip availability bit change (Animation.Availability), and is a -11 result translated to any event?
  3. Which hub field is the battery percentage the flip compares, and is it the filtered or table-derived value from milosboard/estimator.cfg?
  4. Do stick inputs have any effect during phase 1 and 2 of the flip beyond the ignored FSM events?
  5. During the recovery phase, what happens if the rotation does not finish: only the 1.4 s timeout ends the state, after which GoToFix takes over. Is anything else guarding a failed flip (altitude loss near the ground)?

Comments

Spotted a mistake, or tried this on your own Bebop? Leave a note. Comments are kept on this site's own server.