Phase 5.1: MechControlsMapper publishes its 20 control-input attributes

Reconstructed the MechControlsMapper attribute table (StickPosition..PilotArray,
IDs 3-0x16 chained from Subsystem::NextAttributeID==2) + the real members
(stickPosition ControlsJoystick, throttle/pedals/speed/turn Scalars, the look/
torso ControlsButtons, control/display/pilotArray ints) + AttributePointers[] +
AttributeIndex (chains Subsystem::AttributeIndex). Fixed the mapper hierarchy
statics in BTL4MPPR.CPP: L4/RIO/Thrustmaster ClassDerivations now chain correctly
(L4 defined first for static-init order) and all use MechControlsMapper::
AttributeIndex so the mapper instance publishes the control attributes the
streamed mappings bind to.

Mech still constructs (33 subsystems). The post-construction crash is UNCHANGED
(GetAttributePointer, attribute=0x13) -> so it's NOT the mapper; a streamed
AttributeWatcher (numeric ID 19) resolves on another object via GetSimulation.
Next diagnostic: which object/subsystemID the watcher targets. BT: 42 ok.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-20 11:10:44 -05:00
co-authored by Claude Fable 5
parent 9ebdfc4610
commit 1f2f8ac42a
3 changed files with 165 additions and 37 deletions
+35 -29
View File
@@ -13,34 +13,12 @@
# include <btl4mppr.hpp>
#endif
Derivation
MechThrustmasterMapper::ClassDerivations(
Subsystem::ClassDerivations,
"MechThrustmasterMapper"
);
MechThrustmasterMapper::SharedData
MechThrustmasterMapper::DefaultData(
MechThrustmasterMapper::ClassDerivations,
Subsystem::MessageHandlers,
Subsystem::AttributeIndex,
1
);
Derivation
MechRIOMapper::ClassDerivations(
Subsystem::ClassDerivations,
"MechRIOMapper"
);
MechRIOMapper::SharedData
MechRIOMapper::DefaultData(
MechRIOMapper::ClassDerivations,
Subsystem::MessageHandlers,
Subsystem::AttributeIndex,
1
);
//
// NOTE: define L4MechControlsMapper's statics FIRST -- the RIO/Thrustmaster
// derivations chain it, so it must construct before them. All three mappers'
// DefaultData use MechControlsMapper::AttributeIndex so the mapper instance
// publishes the control-input attributes the streamed mappings bind to.
//
Derivation
L4MechControlsMapper::ClassDerivations(
MechControlsMapper::ClassDerivations,
@@ -51,7 +29,35 @@ L4MechControlsMapper::SharedData
L4MechControlsMapper::DefaultData(
L4MechControlsMapper::ClassDerivations,
Subsystem::MessageHandlers,
Subsystem::AttributeIndex,
MechControlsMapper::AttributeIndex,
1
);
Derivation
MechThrustmasterMapper::ClassDerivations(
L4MechControlsMapper::ClassDerivations,
"MechThrustmasterMapper"
);
MechThrustmasterMapper::SharedData
MechThrustmasterMapper::DefaultData(
MechThrustmasterMapper::ClassDerivations,
Subsystem::MessageHandlers,
MechControlsMapper::AttributeIndex,
1
);
Derivation
MechRIOMapper::ClassDerivations(
L4MechControlsMapper::ClassDerivations,
"MechRIOMapper"
);
MechRIOMapper::SharedData
MechRIOMapper::DefaultData(
MechRIOMapper::ClassDerivations,
Subsystem::MessageHandlers,
MechControlsMapper::AttributeIndex,
1
);