How sumzer0-git/edapgui works
Main components
• User Interface & Main Controller: The EDAPGui.py file acts as the entry point, initializing the GUI and overall autopilot control.
• Assist Modules: There are different Python modules that encapsulate the various in-game assists (FSD Route Assist, Supercruise Assist, Waypoint Assist, Robigo Assist, and AFK Combat Assist). Although these may be spread over several files (e.g., ED_AP.py, EDafk_combat.py, NavRouteParser.py, etc.), represent them as separate “assist engines” under an Autopilot Manager.
• Computer Vision Engine: Core modules like OCR.py, Image_Templates.py, and Screen_Regions.py indicate that the system captures the game screen, performs template matching, and identifies key elements used to determine status.
• Input & Control Modules: Files such as directinput.py, MousePt.py, and EDKeys.py handle the simulation of keystrokes and mouse events. These are critical for interacting with Elite Dangerous externally.
• Configuration & Data Files: The configs folder (with baseline_ships.json, resolution.json, user_ships.json), the ships and waypoints folders, and the config file (config-AP.json mentioned in the README) represent the static data that tunes the behavior of the autopilot (for ship tuning or waypoint routes).
• Logging & Diagnostics: EDlogger.py, Test_Routines.py, and the verbose logging options (via autopilot.log) indicate modules developed for tracking behavior and debugging.
Relationships and interactions
• The EDAPGui (main entry module) connects to the Autopilot Manager, which spawns individual assist modules based on user input or hotkeys.
• The Autopilot Manager directs computer vision components to retrieve screenshots (using Screen.py and Screen_Regions.py) and then process these images by comparing them with templates (Image_Templates.py, OCR.py).
• Simultaneously, configuration files (from configs, ships, and waypoints) are loaded to provide parameters like ship-specific tuning, keybindings, and resolution data.
• When an assist is triggered (for example, FSD or Supercruise Assist), the control flow goes from the UI/Manager to the specific module that computes the next steps, and then to the Input & Control layer (via directinput.py) to send keystrokes/mouse events to the running Elite Dangerous window.
• Logging (EDlogger.py) and error handling feed back into the UI to update the user, and diagnostic messages are saved.
• There is also integration with external services such as TCE (Trade Computer Extension) and (optionally) Discord notifications for future extensibility.
Architectural patterns and design principles
• Modular design: The project is broken into multiple single-responsibility modules. For example, separate files for different autopilot assists and distinct modules for computer vision and direct input.
• Configuration-Driven: Much of the behavior (keybindings, ship parameters, screen resolution) is defined via JSON configuration files.
• Event-Driven & Asynchronous: The system uses threading and event-based triggers (hotkeys, screen events) to switch between different assists when required.
• External Integration: The project uses external libraries (e.g., mss for screen capture, pynput for keyboard interactions) to interface with the game externally.
Relevant technologies and frameworks
• Language: Python (targeting 3.11, though compatible with 3.9/3.10).
• Libraries/Frameworks: Likely mss (for screen capture), pynput (for keyboard input), and possibly OpenCV (for computer vision template matching).
• OS: Windows-specific integration (evidenced by direct input commands, Win32 API calls, and Windows-specific configuration files).
• The Main UI/Controller (EDAPGui)
• Autopilot Manager with sub-components for each assist (FSD Route Assist, Supercruise Assist, etc.)
• Computer Vision Processor (OCR, Template Matching)
• Input & Control Module (directinput and keystroke simulation)
• Configuration/Data Store (configs, ships, waypoints)
• Logging & Diagnostics System
• Data input from the screen (via Screen.py and OCR) flows into the Vision Processor.
• Vision outputs and configuration feed into the Autopilot Manager.
• The Manager sends commands to the Input Module that in turn interacts with the game.
• Logging feedback loops from each component back to a central logger.
• That the design is modular and configuration-driven.
• Mention the threading or event-driven aspects if applicable.
Final advice
• Gradually add layers to include specific modules (like EDKeys, EDlogger, etc.) as sub-components beneath the main blocks.