Skip to content

Skycontroller 2 `mppd`: how pressed buttons become actions, and what the flip actions send

Static read of the Skycontroller 2’s mppd button path by one agent, 2026-10-05, answering questions from the skycontroller2 session about the flip bindings. Status: Agent-cited, with these claims re-checked by the commissioning session in the disassembly of the unit’s own usr/bin/mppd: the flip send cases (0x20db2 direction 3 for action 22 flip_left, 0x20dbc direction 2 for 23, 0x20dc6 direction 0 for 24, 0x20dd0 direction 1 for 25, all using one descriptor literal) and the direction enum order in the vendored ARSDK XML (front, back, right, left; the XML also says the command is expected in flying state and is supported for products 0901 and 090c); and the press-callback decision logic at 0x1ed32 to 0x1ed92 (state set to 1, candidate list recomputed, zero candidates drops the press, exactly one fully pressed candidate executes, two or more wait). Not re-derived: the release callback, the candidate rule’s inner function (mapping_can_start), axis blocking, the threshold value 75, and every “Open” item. The board firmware’s behaviour for the virtual stick keys is unread; several outcomes below depend on it. Drone-side acceptance of a flip is a separate report (bebop2-flip-acceptance), in progress at the time of writing.

Nothing here is a flight procedure. It is a reading of code, to be settled by a props-off bench check.

Static analysis only. Nothing was connected to, no mcbebop tool was used, nothing was written under the extract, no serial, MAC, key or device id appears here. Image root R = the extracted system volume.

Tags: Verified (I read the instructions or listing), Agent-cited (taken from the brief or the earlier report, not re-read), Inference, Open.

Address conventions: usr/bin/mppd addresses are virtual (file offset + 0x10000, data +0x20000), Thumb-2 (llvm-objdump --triple=thumbv7). libmppd_hw_mpp.so and libmppbb.so addresses are file offsets. Scratch listings: sc2-mppd.dis, libmppd_hw_mpp.dis, libmppbb.dis in the same scratchpad.

Controls for negative results: the “no timer, no debounce” and “no other writer” claims were checked by grepping the same listing for the literal offsets of the state arrays, and the grep does find the known writers (4 sites for 0x1608, 2 for 0x1688), so the grep works. The “mppd never calls mpp_bb_axis_threshold_set” claim was checked with grep -a -c over the three binaries; it returns 1 for libmppd_hw_mpp.so and mpp_bb_cli (known users) and 0 for mppd.

  1. The match rule is neither plain equality nor plain containment. Every change of a button’s state recomputes a “candidate” list: a mapping is a candidate when the currently pressed mask is a SUBSET of the mapping’s mask (cur & map == cur), plus a validity test (mapping_can_start). The action fires when exactly one candidate remains and its mask is fully pressed (fires on the press edge that completes it), or, for a single button that is only a prefix of other mappings, on the RELEASE edge when the pressed mask equals a candidate mask exactly. Verified.
  2. X first, then the left stick crossing its threshold: X press fires nothing (five candidates: 0x8 and the four flips); the virtual-direction press that arrives next leaves exactly one candidate (the flip), so the flip fires at the crossing and video_record never fires, because both buttons are marked “consumed” (state 2) and release does nothing for a consumed button. Verified.
  3. Stick already past threshold, then X: the virtual-direction press is DISCARDED when it arrives (no candidate exists for a lone virtual bit because axes 0 and 1 are bound), so it is not remembered. X then sees mask 0x8 only: no flip, and video_record fires when X is released. Verified for the code path; the premise that the board sends the virtual key only once, at the crossing, is Open (board firmware unread).
  4. A flip is sent as Ardrone3_Animations_Flip with direction 3 (left, action 22), 2 (right, 23), 0 (front, 24), 1 (back, 25); the arsdk-xml enum is front 0, back 1, right 2, left 3. The only controller-side gate is drone-manager state == 6 (DRONE_CONNECTED); no flying-state, battery, piloting-source or grab check. “cannot send button action” guards only the telemetry copy of the action to the phone (blackbox), not the drone command. Verified.
  5. The threshold is 75, set for axes 0 to 4 once at start in mppd_hw_create; libmppbb forwards it unchanged in a 17-byte hid report (id 2, cmd 1, axis, value). It is a board-side setting, so the scale on the board is Open; mpp_bb_cli documents 1 to 100, consistent with percent of travel on the -100..100 axes. Verified for the value and the report, Inference for the percent reading.
  6. Beyond the question: while X is held (or any button that is a prefix of a flip combination), the left-stick axes (yaw, gaz) are BLOCKED in the controller output and sent as 0 until the candidate list changes, so a tap of X during hard yaw or climb zeroes those commands for the duration of the hold. Verified for the code, Inference for the on-air effect (not traced into the PCMD frame).
  7. Once a flip has fired with X held, X stays “pressed, consumed” in the mask, so each further crossing of the threshold (release then press of the virtual key) while X is still held fires another flip; and re-pressing X while the stick is still past threshold after a consumed flip fires again. No debounce, long-press or double-press logic exists in this path; key autorepeat (value 2) is ignored. Verified.
  8. Virtual-left bits belong to the left stick: L/R to axis 0 (default yaw), U/D to axis 1 (default gaz). Both groups can be set simultaneously with yaw/gaz because they are separate key events from the board, but only one flip can fire per hold (a second virtual key while a flip is pending has no candidate and is dropped). Which physical direction is U versus D is board polarity and is Open.

2. The matching path (functions and addresses, all in mppd unless noted)

Section titled “2. The matching path (functions and addresses, all in mppd unless noted)”
  • The evdev read loop is the pomp fd callback at 0x3618 (the listing labels it inside sensors_get_attitude; that is only the nearest exported symbol). It calls libevdev_next_event (0x36f4) in a loop. Verified.
  • EV_KEY (type 1) key code to bit index switch at 0x370e to 0x3814 (same table as in the earlier report; codes 0x12c..0x12f = 300..303 give index 13, 12, 14, 15, i.e. VIRTUAL_LEFT_R, L, U, D; 0x123 gives 3 = X). Verified.
  • Dispatch at 0x3814:
3814: ldr r3, [sp, #0x24] ; event value
3816: cbz r3, 0x3824 ; value 0 -> release callback ([cbs+4])
3818: cmp r3, #1 ; bne 0x36ee ; value 2 (autorepeat) ignored, anything but 1 ignored
381e: ldr r3,[r4,#0x14]; ldr r3,[r3] ; value 1 -> press callback ([cbs+0])
382e: ldr r2,[r4,#0x44]; mov r0,r4; blx r3 ; cb(gamepad, bit_index, user)

Verified. The library therefore reports one bit index per edge, not a mask. The mask is assembled in mppd.

  • Axes (EV_ABS, 0x3836): value rescaled to -100..100 (and, when property ro.bb.bootloader.version is 7 or less, rescaled so raw +-80 becomes +-100, see 0x388a to 0x38c4 and the string “Gamepad will use internal calibration”), then the axis callback [cbs+8] fires only when the processed value changed (0x391c to 0x3930). Verified.

2.2 The three callbacks (mppd, callback struct at 0x44090: press 0x1ec9c, release 0x1eb98, axis 0x1ea04)

Section titled “2.2 The three callbacks (mppd, callback struct at 0x44090: press 0x1ec9c, release 0x1eb98, axis 0x1ea04)”

The struct is passed to gamepad_create at 0x1ee72. Verified (word read at 0x44090 to 0x44098).

Context fields (offsets from the gamepad context ctx, Verified from the listings, names are mine):

Offset Meaning
+0x1608 + 4*i logical state of button i: 0 not pressed, 1 pressed and pending, 2 pressed and consumed
+0x1688 + 4*i raw pressed flag (written on every edge, never read elsewhere: only two sites in the listing)
+0x1578 + 4i, +0x1538 + 4axis “grabbed by the app” flags (button, axis)
+0x1708 + 4*axis axis blocked flag
+0x1740 + 0x18 = +0x1758 sentinel of the active (candidate) list
+0x14 selected mapping slot; entries live at ctx + 0x4c8*slot + 0x18*action (button entries from +0x18) and +0x2d0 + ... (axis entries)
entry layout +0 type (0 button, 1 axis, 2 unused), +4 action, +8 mask (button)

Functions:

Address Role
0x1e594 current_mask(ctx): OR of 1<<i for every i whose state at +0x1608+4*i is 1 or 2 (subs r1,#1; cmp r1,#1; lslls; orrls, 32 iterations). So state 1 and state 2 both count as pressed
0x1e6d8 is_candidate(ctx, map_mask): cur = current_mask; if (cur & map_mask) == cur then return mapping_can_start(cur, axis_flags) else 0. The flags array is built from every axis entry with type 1: flags[axis_index] = 1
0x1ea74 recompute(ctx): rebuilds the candidate list by calling 0x1e6d8 for every one of the 29 button entries (and again for the axis-with-buttons entries); for each hit it appends the entry and calls mapping_block_axes(mask, ctx+0x1708); then diffs the old and new blocked-axis arrays and sends axis values (0 when newly blocked, the stored raw value when newly unblocked) through 0x1e736
0x1e736 axis dispatch: picks the axis entry (type 1) for that axis, applies the invert flag, calls 0x1d9c4
0x1d9c4 execute(ctx, entry, value): type 0 with action 0 to 15 encodes Mapper_Application_button_event(action) to the phone; type 0 with action 16 and up calls ops[0] = 0x20b74 (the button action handler); type 1 axis actions call ops[1] = 0x202fc; then marks EVERY bit of entry.mask as state 2 (loop at 0x1da54 to 0x1da70)
0x1ec9c press callback
0x1eb98 release callback
libmppd_hw_mpp.so 0x3f1c mapping_can_start(mask, flags[5])
libmppd_hw_mpp.so 0x4044 mapping_block_axes(mask, buf)
0x1db20 mapping loader (per slot), 0x1da84 per-entry validation wrapper, libmppd_hw_mpp.so 0x3f88 mapping_validate

ops table at 0x44a48: [0] 0x20b74 button action handler, [1] 0x202fc axis handler, [2] 0x1ff76 send to phone, [3] and [4] power-button press and release. Verified (word read, and the 0x1ee46 store into the context).

2.3 Loader and the “already mapped” message

Section titled “2.3 Loader and the “already mapped” message”

The loader function 0x1db20 (called from 0x1e646) loops the 29 button entries of a slot. Duplicate check at 0x1dd52 to 0x1dd7c, with the log at 0x1dd80 (string “button combination 0x%08x already mapped to action %d” at 0x2e752, the xref is add r2, pc at 0x1dd80):

1dd52: ldr r2,[sp,#8]; ldr r1,[r2,#0x18] ; entry.type
1dd54: cbnz r1, 0x1dd88 ; only type 0 entries are compared
1dd56: ldr r1,[r2,#0x20]; cmp r1,r6 ; entry.mask == new mask (EQUALITY)
1dd5a: bne 0x1dd88
1dd80: add r2,pc ; blx ulog_log_write ; "already mapped to action %d"

So the loader refuses two mappings with an identical mask (equality). It says nothing about the run-time lookup. Verified. After the check it stores type 0, action, mask at 0x1ddc8 to 0x1ddd0, then calls the validation wrapper 0x1da84, which calls mapping_validate (0x3f88). I traced that the flip masks pass it: START bit (0x80) is rejected, masks of 0x400000 and up are rejected, L2+R2 together is rejected, both L and R (or U and D) of one virtual pair together are rejected, then mapping_can_start, which returns 1 for any mask that contains a non-virtual bit such as X. So 0x1008, 0x2008, 0x4008 and 0x8008 are accepted. Verified. (The axis loader has a separate duplicate check at 0x1df46, string “axis+buttons combination %d+0x%08x already mapped to action %d”.)

2.4 mapping_can_start (0x3f1c) and mapping_block_axes (0x4044), decoded

Section titled “2.4 mapping_can_start (0x3f1c) and mapping_block_axes (0x4044), decoded”

mapping_can_start(mask, flags): returns 0 for an empty mask; returns 1 if the mask has any bit outside 0x3ff000 (that is, any real button bit); otherwise (only virtual-direction bits) it returns 1 if any touched stick group (L/R pair, U/D pair, and so on, 5 groups) has flags[group] == 0, and 0 if every touched group has an axis mapping. In plain words: a virtual direction of a stick whose axis is bound cannot start a mapping by itself. Verified. All five axes are bound in the default mapping_bebop_2.cfg (Agent-cited from the brief and the earlier report: axes 18 yaw on 0, 19 gaz on 1, 16 roll on 2, 17 pitch on 3, 21 tilt on 4; I did not re-parse the axes array in this task). The loader gives every axis entry type 1 regardless of its buttons field (stores at 0x1df94), so flags[axis] is 1 for each bound axis.

mapping_block_axes(mask, buf): sets buf[0] = 1 if the mask has any of 0x3000 (left L/R), buf[1] for 0xc000 (left U/D), buf[2] for 0x30000, buf[3] for 0xc0000, buf[4] for 0x300000. Group index equals axis index. Verified.

2.5 Press callback 0x1ec9c, step by step (Verified)

Section titled “2.5 Press callback 0x1ec9c, step by step (Verified)”
1ecda..1ece6: raw[idx] = 1 ; +0x1688
1ecea: gamepad_get_power_button() (returns 7, START) -> if idx==7 use ops[3], done
1ecfc: if grabbed[idx] (+0x1578) != 0 -> encode Mapper_Grab_button_event(idx, 1) to the phone, done
1ed32: state[idx] = 1 ; +0x1608
1ed3c: recompute(ctx) ; 0x1ea74
1ed40..1ed5c: n = number of nodes in the candidate list
1ed5e: n == 0 -> state[idx] = 0 ; recompute ; done ; the press is DROPPED
1ed6e: n == 1 -> e = the entry; if e.type == 0 and (e.mask & ~current_mask()) == 0 -> execute(ctx, e, 0) ; 0x1ed82..0x1ed92
n >= 2 -> nothing (button stays state 1 and waits)

2.6 Release callback 0x1eb98, step by step (Verified)

Section titled “2.6 Release callback 0x1eb98, step by step (Verified)”
1ebd6..1ebe0: raw[idx] = 0
1ebe2: power button -> ops[4], done
1ebf4: if grabbed[idx] -> if state[idx] != 0 { state[idx] = 0; recompute }; encode Mapper_Grab_button_event(idx, 0) to phone; done
1ec3a: if state[idx] == 1: ; pending, not consumed
scan the candidate list for a type 0 entry whose mask == current_mask() ; 0x1ec4e..0x1ec6a
(current_mask still includes idx here: state is cleared only below)
execute(ctx, found_or_NULL, 0) ; 0x1ec74, NULL is ignored by execute
state[idx] = 0 ; recompute(ctx) ; 0x1ec78..0x1ec82

If the state was 2 (consumed) the cmp r3,#1; bne at 0x1ec3c skips the scan: no action on release. Verified.

3. Event sequences (default mapping_bebop_2.cfg, left stick = yaw and gaz)

Section titled “3. Event sequences (default mapping_bebop_2.cfg, left stick = yaw and gaz)”

Notation: X = BUTTON_X (0x8), VL, VR, VU, VD = VIRTUAL_LEFT_L/R/U/D (0x1000, 0x2000, 0x4000, 0x8000). “state” is the value at +0x1608. The premise in every row is that the board sends one press edge when a stick passes the threshold and one release edge when it returns (Agent-cited; the board firmware is unread, so see Open 1).

# Sequence Per edge Outcome Tag
A X press, X release, no stick press: state[X]=1, cur 0x8, candidates 5 (0x8, 0x1008, 0x2008, 0x4008, 0x8008), n=5, nothing; left axes 0 and 1 blocked (yaw, gaz sent as 0). release: state==1, candidate with mask == cur (0x8) found, video_record (action 18) fires; unblock video_record fires on RELEASE of X, not on press Verified
B X held, left stick crosses threshold to the left (VL), then back, then X released VL press: state[VL]=1, cur 0x1008, only flip_left qualifies (can_start true because of X), n=1, mask fully pressed, execute: flip left sent (action 22). Bits X and VL set to state 2. Recompute is not run again after firing, so the block set stays as computed at the VL press (axis 0 only; axis 1 was unblocked at that recompute and gets its stored raw value). VL release: state 2, no action, recompute, axes unblocked. X release: state 2, no action One flip, video_record never fires Verified
C Stick already past threshold (VL pressed first), then X press, then X release VL press: state[VL]=1, cur 0x1000, flip_left rejected by can_start (virtual-only mask and axis 0 bound), n=0, so state[VL] is reset to 0 and nothing is remembered. X press: cur 0x8 only, n=5, nothing, axes 0 and 1 blocked. X release: video_record fires NO flip; video_record on release; yaw and gaz are zeroed while X is held Verified for the code path; Open 1 for the premise
D As C, but while X is still held the stick comes back inside the threshold and crosses again second VL press: as B flip fires on the re-crossing Verified
E B, then X released and pressed again while VL is still pressed after B, VL stays state 2 while the stick is beyond threshold. X release: state[X]=0. X press: state[X]=1, cur = VL(2) + X(1) = 0x1008, one candidate, fully pressed a second flip fires at the X press Verified (logic), Inference for the board holding VL pressed
F X held, VL pressed and then VU pressed (diagonal) VL press fires the flip (as B). VU press: cur 0x5008, no mapping mask contains it, n=0, state[VU]=0 one flip only Verified
G Tap of a single non-prefix button (A, B, C, Y, L1, R1, L2, R2) press: one candidate, fully pressed, fires at the PRESS edge; state 2; release does nothing fires once per press Verified
H Key held down (autorepeat) value 2 events are ignored at 0x3818 no repeat; an action fires once per edge, never on a timer Verified
I START handled separately (ops[3] and ops[4]); mapping_validate refuses START in any mapping not part of this path Verified

Single-button suppression and combination suppression: the single-button action is suppressed when the combination completes (both bits go to state 2 in execute at 0x1da54, and the release path fires only for state 1). A combination is not suppressed by a single button that already fired: a single button that is a prefix of a combination does not fire at press at all (n >= 2), it is deferred to release, which is the mechanism that makes the combination possible. For a button that is not a prefix (n == 1 at press), it fires at press and sets state 2; a combination cannot then complete from it unless a mapping with a superset mask exists, in which case the candidate rule above applies. Verified.

State kept between events: yes, the three-valued state array (0, 1, 2) at +0x1608 and the candidate list at +0x1758; “pressed but dropped” (n == 0) is deliberately not kept. No release action beyond the deferred single-button fire. Verified.

mppd 0x20b74 is the button action handler, called through ops[0] from execute for any action of 16 or more (actions 0 to 15 never reach it; they send Mapper_Application_button_event to the phone instead). Handler entry, in order (Verified):

  1. 0x20b92 to 0x20bac: if the ulog cookie level is above 5, log Button Action %s(%d) at level 6 (format string at 0x2f2ad, xref at 0x20baa; the %s is the action name from the function at 0x1ff2c). Action 28 (cycle_hud) is tested first (0x20bb0) and returns.
  2. 0x20c30 to 0x20c36: bl 0x1896c(blackbox, action). This calls mpp_blackbox_send_button_action; on a negative return it logs “cannot send button action” (string at 0x2ce8c, xref at 0x189aa, level 3, includes strerror) and returns. This is the telemetry copy to the phone. It runs BEFORE the drone-manager test and its failure does not stop the action. So “cannot send button action” guards nothing about the drone command.
  3. 0x20c3a to 0x20c42: ldr r0,[r4,#0x18]; bl 0x1c7f8; cmp r0,#0; beq end. 0x1c7f8 is ldr r0,[r0,#0x28]; subs r3,r0,#6; rsbs r0,r3,#0; adcs r0,r3, i.e. returns 1 only when the drone-manager state field equals 6. Per the earlier report the state enum order puts 6 at DRONE_CONNECTED (Agent-cited for the enum, Verified for the compare). Not connected: return silently.
  4. 0x20c52: ldr r3,[r4,#0x14] selects one of two jump tables. Both tables (the tbh at 0x20c64 and the word table at 0x20ea0) resolve action 22 to 25 to the same four targets, so the flips are not conditional on that field. Table decoded: 22 to 0x20db2, 23 to 0x20dbc, 24 to 0x20dc6, 25 to 0x20dd0 (26 emergency 0x20dae, 18 video 0x20dda, 19 picture 0x20df4).
  5. Each flip case loads the Flip descriptor and the direction, then arsdk_cmd_enc(buf, desc, direction) and sends through the generic send callback (0x20e74 calls 0x1ff64, which calls ctx[0xd4](buf, ctx[0xd0]) if set):
Action Name Target Direction argument arsdk-xml enum name (front 0, back 1, right 2, left 3)
22 flip_left 0x20db2: movs r2,#3 3 left
23 flip_right 0x20dbc: movs r2,#2 2 right
24 flip_front 0x20dc6: movs r2,#0 0 front
25 flip_back 0x20dd0: movs r2,#1 1 back

The descriptor literal at 0x20f24 resolves, through the GOT (base 0x4434c, slot 0x448f0), to g_arsdk_cmd_desc_Ardrone3_Animations_Flip. Verified (relocation table lookup; the same method resolves the Emergency, VideoV2, PictureV2, UserTakeOff and NavigateHome literals to the expected names, which is the control).

The enum order is read from the vendored arsdk-xml at ardrone3.xml (class Animations id 5, cmd Flip id 0, arg direction enum front, back, right, left). Verified in that file. libarsdk.so itself carries no enum names for this command (its string table has the descriptor name and “Ardrone3.Animations.Flip” only), so the library cannot independently confirm the order; the file is the project’s own copy of the public XML. The same XML lists <immediate> expectation “state: flying” and “will make a flip if it has enough battery” for products 0901 and 090c: that is a drone-side condition (Agent-cited from the XML text, behaviour on a real Bebop 2 not tested here, Open).

What is NOT checked on the controller before the flip is sent (searched in 0x20b74 to 0x20e86): flying state, battery (the battery test exists only on the takeoff cases, 0x20ce2 and 0x20d4c), piloting source, grab state of the button (a grabbed button never reaches execute: it is forwarded to the phone as Mapper_Grab_button_event, see 2.5), confirm or arm. Verified for the handler. What the send callback at ctx[0xd4] does (whether it applies a piloting-source or connection check of its own) is Open: the setter is at 0x212dc and I did not trace its caller.

  • mppd_hw_create (libmppd_hw_mpp.so 0x4bf8) calls mpp_bb_new, mpp_bb_start, then at 0x4d1e to 0x4d50 calls mpp_bb_axis_threshold_set(bb, axis, 0x4b) for axis 0, 1, 2, 3, 4, value 0x4b = 75 (movs r2,#0x4b before each blx 0x26dc). Verified. It runs once, at controller start; no other caller exists in mppd, libmppd_hw_mpp.so (five call sites, all here) or mpp_bb_cli (only on the command th_set, which is manual).
  • libmppbb.so mpp_bb_axis_threshold_set (0x18b4): zeroes a 17-byte buffer, stores [0]=2 (report id), [1]=1 (threshold command), [2]=axis, [3]=threshold, then writes it with write() on the hidraw node via 0x14f8, which requires the write to return 0x11 (17). There is no range check, scaling, or clamp in the host library. Verified.
  • Scale: the host sends 75 as given. What the board firmware does with it (percent of full travel on the -100..100 report, hysteresis, whether it measures raw or calibrated travel) is not in this image’s code that I read. mpp_bb_cli documents 1 <= threshold <= 100 (string present in the binary), which supports “percent of travel” (Inference). The earlier statement “about two thirds” does not match the code: the value is three quarters. Open: the bottom-board firmware (lib/firmware/bottomboard.hex) was not decoded for this.
  • Hardware note: for old boards (ro.bb.bootloader.version 7 or less) the host rescales raw +-80 to +-100 (0x388a to 0x38c4). Whether that interacts with the board threshold is Open.

6. Other safeguards and hazards in this path

Section titled “6. Other safeguards and hazards in this path”
  • No debounce, double-press, long-press or timer in the press, release, recompute, execute or evdev loop code (no pomp_timer, clock_gettime or tick comparison in 0x1e594 to 0x1ed98, 0x1d9c4, 0x1da84 or the evdev loop). Verified by reading those listings. A board-side debounce is Open.
  • Three states: 0 released, 1 pressed and pending, 2 pressed and consumed; consumed buttons still count in current_mask. This is the whole of the “three-state” handling for button mappings. The app-action path (actions 0 to 15, Mapper_Application_button_event) is a one-shot message to the phone on the same edge rules. Button and axis “grab” (phone takes the raw events, Mapper_Grab_button_event and Mapper_Grab_axis_event) is a separate mode (mapping_grab_controls, libmppd_hw_mpp.so 0x4082); while a button is grabbed no mapping can fire from it. Verified.
  • Axis blocking (new finding): while any candidate flip is live, mapping_block_axes marks axis 0 and axis 1 blocked, so the stick’s yaw and gaz are replaced by 0 (0x1eb48 to 0x1eb86 sends value 0 through 0x1e736 when an axis becomes blocked, and the axis callback 0x1ea04 stops forwarding at 0x1ea58 while the flag is set). With X alone down, all four flips are candidates, so both left-stick axes are blocked for the whole hold. On release the raw value is restored. Verified for the code. The on-air effect (yaw and gaz in the next PCMD frame equal 0) is Inference: the axis handler 0x202fc forwards the value to the piloting state at ctx[0xac] and the PCMD builder was not traced.
  • Which stick directions produce which bits: the bits are produced by the board as key events 300 to 303 (Agent-cited from the brief), and the mapping and blocking code treats group 0 (VL, VR) as left stick axis 0 (AXIS_LEFT_LR, bound to yaw by default) and group 1 (VU, VD) as axis 1 (AXIS_LEFT_UD, bound to gaz by default). Verified for the grouping in code. So with X down, yaw past threshold selects flip_left or flip_right and climb or descend past threshold selects flip_front or flip_back. Which physical direction is “U” or “D” (stick polarity) is board behaviour, Open.
  • Key codes 720 to 725 (right stick and slider virtual bits): same switch, no default mapping. Not relevant to X.
  • Mapping source: the loader prefers /factory/<module>.cfg, then /etc/mppd, and the phone can change mappings at run time (Agent-cited from the earlier report). If the live unit’s copy differs, the candidate set differs; the rules in this report still apply to whatever masks are loaded.

Both lines below are emitted by the controller’s ulog (mppd cookie): button [%s] pressed and button [%s] released are level 7 (debug, strings at the callbacks 0x1ecd4 and 0x1ebd0 region), and Button Action %s(%d) is level 6 (info, 0x20baa). The names are the logical button names (A, B, C, X, Y, L1, R1, START, LEFT_JS, RIGHT_JS, L2, R2, VIRTUAL_LEFT_L and so on, order from gamepad_button_name). The debug lines need the cookie raised to debug (how to do that on the unit with the ulog control tool is Open, not tested here).

Predictions, to confirm or refute the two readings:

Bench action Expected lines under my reading What would indicate the alternative
Press and release X only button [X] pressed then, at the release, button [X] released immediately followed by Button Action VIDEO_RECORD(18) (the action line comes at release, not at press) an action line at the press edge would mean single-button fires on press (contradicts 0x1ed5e to 0x1ed92)
Hold X, push left stick left across threshold pressed [X], pressed [VIRTUAL_LEFT_L], Button Action FLIP_LEFT(22); later released lines with NO VIDEO_RECORD line a VIDEO_RECORD line after the flip would mean the consumed state is not working
Push the stick past threshold first, then press X, then release X pressed [VIRTUAL_LEFT_L] (no action), pressed [X] (no action), released [X] then Button Action VIDEO_RECORD(18), no flip line a flip line at the X press would mean the dropped virtual press is actually remembered (Open 1)
Hold X, cross the threshold, return, cross again a flip line at each crossing one flip only would mean the consumed bits are cleared on something I did not see
Hold X and push the stick up, then down FLIP_FRONT(24) then FLIP_BACK(25) if U is up (polarity Open)
Whether the board sends the virtual key once or keeps reasserting it while the stick stays beyond threshold count pressed [VIRTUAL_LEFT_L] lines while holding the stick still beyond threshold: one line per crossing under my premise repeated press lines with no release would change rows C and E

A hardware-free check is possible with usr/bin/mppinput (Agent-cited from the earlier report: it injects key events on the input node). Do not use it on an armed aircraft link.

  1. Board behaviour for the virtual keys: one press edge at the threshold crossing and one release edge on return (assumed), or periodic reassertion, hysteresis, a different threshold scale. This decides rows C and E. Needs the bottom-board firmware (lib/firmware/bottomboard.hex) decoded, or one evtest-style capture of codes 300 to 303 on the bench.
  2. Which physical stick direction raises VIRTUAL_LEFT_U versus D, and L versus R (board polarity and any inversion in the axis table).
  3. The meaning of 75 on the board’s scale (percent of travel, raw counts) and its hysteresis.
  4. The send callback at ctx[0xd4] (setter 0x212dc): does it add a connection or piloting-source condition for commands sent from the button handler? Not traced.
  5. Whether the PCMD builder really transmits 0 for yaw and gaz while the axes are blocked (the 0x202fc axis handler stores into the piloting state at ctx[0xac]; the periodic sender was not traced).
  6. The unit’s own mapping files in /factory and /var/lib/mppd (not in the image) and any mapping changed from the phone app; a mapping that unbinds axis 0 or 1 would change mapping_can_start for the virtual bits and could make a lone virtual-direction press a candidate, which would change row C.
  7. Drone-side behaviour of a flip command that arrives outside flight or at low battery (the XML says expectation “flying” and “enough battery”; no controller-side enforcement exists).
  8. How to raise the mppd ulog cookie to debug on the unit to see the pressed and released lines (info-level Button Action lines may already appear in the default level; not verified).

Comments

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