#118: the PANIC BUTTON ejects -- keypad-bank routing + the 0x17/0x19 id bug
Two finds close the press path the operator field-tested: 1. The pod's guarded PANIC key reports through the PILOT KEYPAD bank -- the binary's ONLY panic press binding is keyboardGroup[KeyboardPilot].Add( mode 0x200000, mech, 0x19) (FUN_004d266c); there is NO buttonGroup[0x3d] consumer (0x3d is the lamp address). The desktop Panic click now ALSO lands as a pilot-keypad key (PadRIO::EmitButton -> EmitKeypad), so the armed-mode binding fires; a healthy press stays a mode-masked no-op, exactly the pod behaviour. 2. KeypressMessageID resolved to 0x17 via enum-chain arithmetic; the binary passes LITERAL 0x19 (two mapper ids are unreconstructed). The armed keypad send arrived at the Mech as msg 0x17 -- no handler, silently swallowed. Pinned to 0x19 (Mech::EjectPilot's id on the OWNER receiver -- the collision is the design). Verified headless through the REAL click seam (BT_BTNTEST=61): generators killed -> panic-arm ON -> screen-click Panic -> [lbe4key] unit 0 mode 0x650421 -> PUNCH-OUT. Also: IsDisabled eject refusals now log; [padkey]/ [lbe4key] seam tracing under BT_PAD_LOG. Still open (cosmetic): the flashing eject slot on the engineering MFD shows no graphic -- the streamed page element's pixmap is unreconstructed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
0089b3284f
commit
611b1a8bbd
@@ -2670,6 +2670,16 @@ void
|
||||
);
|
||||
|
||||
Check(&keyboardGroup[rio_event.Data.Keyboard.Unit]);
|
||||
{
|
||||
static int s_klog = -1;
|
||||
if (s_klog < 0) s_klog = (getenv("BT_PAD_LOG") != 0) ? 1 : 0;
|
||||
if (s_klog)
|
||||
DEBUG_STREAM << "[lbe4key] unit "
|
||||
<< (int)rio_event.Data.Keyboard.Unit
|
||||
<< " key " << (int)new_key
|
||||
<< " mode 0x" << std::hex << (unsigned)mode_mask
|
||||
<< std::dec << "\n" << std::flush;
|
||||
}
|
||||
keyboardGroup[rio_event.Data.Keyboard.Unit].
|
||||
ForceUpdate(&new_key, mode_mask);
|
||||
|
||||
|
||||
@@ -466,6 +466,18 @@ void
|
||||
<< (pressed ? "HELD" : "released") << "\n" << std::flush;
|
||||
}
|
||||
|
||||
// PANIC (0x3d): the pod's guarded PANIC key reports through the PILOT
|
||||
// KEYPAD bank -- the binary's ONLY panic press binding is
|
||||
// keyboardGroup[KeyboardPilot].Add(mode 0x200000, mech, msg 0x19 =
|
||||
// EjectPilot) in the RIO mapper ctor (FUN_004d266c @004d266c); there is
|
||||
// NO buttonGroup[0x3d] consumer anywhere (0x3d is the LAMP address, mode-
|
||||
// linked via MakeLinkedLamp). Mirror that wiring for the desktop click:
|
||||
// a Panic press ALSO lands as a pilot-keypad key, so the ARMED mode
|
||||
// binding fires the eject; a healthy press is a mode-masked no-op --
|
||||
// exactly the pod behaviour.
|
||||
if (address == 0x3D && pressed)
|
||||
EmitKeypad(LBE4ControlsManager::KeyboardPilot, 0);
|
||||
|
||||
RIOEvent event;
|
||||
event.Type = pressed ? ButtonPressedEvent : ButtonReleasedEvent;
|
||||
event.Data.Unit = address;
|
||||
@@ -479,6 +491,9 @@ void
|
||||
event.Type = KeyEvent;
|
||||
event.Data.Keyboard.Unit = unit;
|
||||
event.Data.Keyboard.Key = key;
|
||||
if (getenv("BT_PAD_LOG"))
|
||||
DEBUG_STREAM << "[padkey] unit " << unit << " key " << key
|
||||
<< " queued\n" << std::flush;
|
||||
PushEvent(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,17 @@
|
||||
//
|
||||
public:
|
||||
enum {
|
||||
KeypressMessageID = MechControlsMapper::NextMessageID,
|
||||
StringMatchMessageID,
|
||||
// PINNED to the binary literals (FUN_004d266c passes 0x19/0x1a
|
||||
// straight into the group Adds; corrected 2026-08-03). The chain
|
||||
// arithmetic (MechControlsMapper::NextMessageID) lands on 0x17 --
|
||||
// TWO mapper ids between 0x16 ToggleVoiceAssist and 0x19 are
|
||||
// unreconstructed -- and the mis-numbered Keypress send was
|
||||
// SILENTLY swallowed by the Mech (no 0x17 handler), which is why
|
||||
// the armed pilot-keypad press never ejected. Mech::EjectPilot is
|
||||
// id 0x19 on the MECH's receiver: the panic-mode keypad binding
|
||||
// sends THIS id to the OWNER, and the collision is the design.
|
||||
KeypressMessageID = 0x19,
|
||||
StringMatchMessageID, // 0x1a (unregistered; stringManager route)
|
||||
NextMessageID
|
||||
};
|
||||
|
||||
@@ -307,8 +316,12 @@
|
||||
// was previously self-consistent at the wrong value (0x2a), so it
|
||||
// worked by accident -- now it matches the binary.
|
||||
// (Faithful-fidelity note: the binary RIO table also carries its OWN
|
||||
// Keypress id 0x19 -> @004d2514; our ctor still registers the shared
|
||||
// L4 Keypress (0x17, @004d1bf0) -- see the Gitea backlog issue.)
|
||||
// Keypress id: FIXED 2026-08-03 -- KeypressMessageID is now pinned to
|
||||
// the binary's 0x19 (the old chain arithmetic landed on 0x17, and the
|
||||
// panic-mode pilot-keypad send was silently swallowed by the Mech --
|
||||
// no 0x17 handler -- so the armed eject press never fired). Remaining
|
||||
// refinement: the ctor registers the shared L4 Keypress BODY
|
||||
// (@004d1bf0); the RIO-specific body is @004d2514.)
|
||||
//
|
||||
enum {
|
||||
Aux1QuadMessageID = MechControlsMapper::Aux1QuadMessageID, // 3
|
||||
|
||||
@@ -599,6 +599,9 @@ void
|
||||
}
|
||||
if (IsDisabled()) // @0049fb54 -- no ejecting from a wreck
|
||||
{
|
||||
DEBUG_STREAM << "[eject] " << GetEntityID()
|
||||
<< " REFUSED (disabled: movementMode "
|
||||
<< MovementMode() << ")" << std::endl << std::flush;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user