rpi-motor-tic249 — Good

Analyzed 2026-03-10 by code2llm  ·  Primary language: python  ·  Python: 4, Shell: 4

92
Functions
9
Classes
6
Files
2,837
Lines
2
Languages
3.6
Avg CC
5
Critical (CC≥10)
0
Duplicates
0
Cycles

Language Distribution

Largest Modules (lines)

Most Complex Modules (functions)

Evolution (2026-03-10)

3.6
CC̄ →
5
Critical →
2837
Lines

Run analysis multiple times to build a trend chart (≥3 data points needed).

Top Modules (8)

ModulePathLinesFuncsClassesCC 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

Alerts (11)

SeverityTargetTypeValueLimit
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

Hotspots (10)

FunctionFan-outNote
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

Refactoring Priorities (5)

#ActionImpactEffort
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