Analyzed 2026-03-10 by code2llm · Primary language: python · Python: 4, Shell: 4
Run analysis multiple times to build a trend chart (≥3 data points needed).
| Module | Path | Lines | Funcs | Classes | CC max |
|---|---|---|---|---|---|
| tic_t249_controller.py | . | 1,454 | 55 | 7 | 39 |
| web_panel.py | . | 569 | 30 | 2 | 11 |
| example_reciprocate.py | . | 200 | 1 | 0 | 7 |
| setup.sh | . | 169 | 1 | 0 | 0 |
| cli_shell.sh | . | 147 | 2 | 0 | 0 |
| detect_usb.py | . | 108 | 3 | 0 | 7 |
| project.sh | . | 18 | 0 | 0 | 0 |
| install.sh | pololu-tic-1.8.1-linux-rpi | 9 | 0 | 0 | 0 |
| Severity | Target | Type | Value | Limit |
|---|---|---|---|---|
| critical | main | cc_exceeded | 39 | 15 |
| critical | main | high_fan_out | 38 | 10 |
| critical | main | high_fan_out | 23 | 10 |
| warning | TicT249Controller.reciprocate | high_fan_out | 14 | 10 |
| warning | TicT249Controller.setup | high_fan_out | 12 | 10 |
| warning | TicT249Controller.find_travel_range | high_fan_out | 12 | 10 |
| warning | api_connect | high_fan_out | 12 | 10 |
| warning | TicT249Controller._home_gpio | high_fan_out | 11 | 10 |
| warning | TicT249Controller._home_tic | high_fan_out | 10 | 10 |
| warning | TicT249Controller.wait_for_position | high_fan_out | 10 | 10 |
| warning | build_parser | high_fan_out | 10 | 10 |
| Function | Fan-out | Note |
|---|---|---|
| main | 38 | Orchestrates 38 calls |
| main | 23 | Orchestrates 23 calls |
| TicT249Controller.reciprocate | 14 | Ruch posuwisto-zwrotny z jedną krańcówką. Schemat (direction=FORWARD, krańcówka |
| TicT249Controller.setup | 12 | Połącz, skonfiguruj i przygotuj silnik do pracy. |
| TicT249Controller.find_travel_range | 12 | Wyznacz pełny zakres ruchu jadąc do obu krańcówek. 1) Home reverse → pozycja = |
| api_connect | 12 | Connect to a specific USB device. |
| TicT249Controller._home_gpio | 11 | Homing programowy przez GPIO Raspberry Pi. |
| TicT249Controller._home_tic | 10 | Homing sprzętowy przez Tic (firmware ≥1.06). |
| TicT249Controller.wait_for_position | 10 | Czekaj na pozycję. Przy GPIO — przerywa jeśli krańcówka aktywna. |
| build_parser | 10 | Orchestrates 10 calls |
| # | Action | Impact | Effort |
|---|---|---|---|
| 1 | Split main (CC=39 → target CC<10) | high | low |
| 2 | Split god module tic_t249_controller.py (1454L, 7 classes) | high | high |
| 3 | Split god module web_panel.py (569L, 2 classes) | high | high |
| 4 | Reduce main fan-out (currently 38) | medium | medium |
| 5 | Reduce main fan-out (currently 23) | medium | medium |