feat: Add MOVABLE_LEV class type support for clickabledata parsing
- Add support for MOVABLE_LEV (class type 5) in extract_clickabledata.lua
- Extract gain parameter as click value for LEV and MOVABLE_LEV types
- Fix ID Lookup for aircraft modules using movable lever controls
This change enables full support for:
- F4U-1D Corsair trim controls, throttle, propeller governor
- Mirror adjustments and other lever-based controls
- Any aircraft modules using MOVABLE_LEV class type
Technical changes:
- Added MOVABLE_LEV = 5 to class_type enumeration
- Updated get_class_enum_label() to recognize class type 5
- Modified collect_element_attributes() to extract gain values
- Use gain as arg_value for LEV/MOVABLE_LEV instead of default position
Fixes previously hidden controls in ID Lookup interface and provides
correct increment values for precise control mapping.
See MOVABLE_LEV_SUPPORT.md for detailed technical documentation.
Add MOVABLE_LEV class type support for clickabledata parsing
This PR adds support for the MOVABLE_LEV (class type 5) in the clickabledata parsing system, enabling the ID Lookup window to correctly identify and extract parameters for movable lever controls.
The original implementation only supported class types 0-4 (NULL, BTN, TUMB, SNGBTN, LEV). Aircraft modules using MOVABLE_LEV for interactive lever controls had these controls silently ignored during ID lookup, making them inaccessible through the Stream Deck interface.
- Added
MOVABLE_LEVrecognition: Extended the class type enumeration and label mapping - Fixed parameter extraction: LEV and MOVABLE_LEV now correctly use the
gainparameter (increment per interaction) instead ofarg_value(default position) as the click value - Maintained backward compatibility: Existing controls continue to work exactly as before
- F4U-1D Corsair (trim controls, throttle, propeller governor, mirror adjustments)
- Any other modules using movable lever controls
Sources/com.ctytler.dcs.sdPlugin/bin/extract_clickabledata.lua- Added
MOVABLE_LEV = 5to class_type table - Updated
get_class_enum_label()function - Enhanced
collect_element_attributes()to extract and use gain values
- Added
MOVABLE_LEV_SUPPORT.md- Complete technical documentationCHANGELOG.md- Version history and change tracking- Updated
CONTRIBUTING.md- Added feature description
Tested with F4U-1D Corsair module:
- ✅ ID Lookup window displays previously hidden MOVABLE_LEV controls
- ✅ Correct increment values (gain) extracted for trim controls
- ✅ Proper limit min/max values displayed
- ✅ Stream Deck commands work correctly with extracted values
- ✅ Existing LEV, BTN, TUMB controls unaffected
Before:
Trim yaw control not appearing in ID Lookup
After:
Device: CONTROL(8)
Button ID: 13
Type: MOVABLE_LEV
DCS ID: 161
Click Value: 0.1 (gain - correct!)
Limit Min: -0.645
Limit Max: 0.645
Description: Trim yaw
None - fully backward compatible
This change aligns with the fork's goal of providing comprehensive aircraft control support for Stream Deck integration.
- Code follows project style guidelines
- Self-review completed
- Documentation added/updated
- Changes generate no new warnings
- Tested with actual hardware and DCS
- Backward compatibility maintained
The key insight is that for lever-type controls (LEV and MOVABLE_LEV), the meaningful value for Stream Deck commands is the gain (increment per click/rotation) rather than the arg_value (default/rest position). This PR fixes that extraction logic.