rpi-motor-tic249 — Good

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

106
Functions
9
Classes
7
Files
3,735
Lines
2
Languages
4.1
Avg CC
7
Critical (CC≥10)
0
Duplicates
0
Cycles

Language Distribution

Largest Modules (lines)

Most Complex Modules (functions)

Evolution (2026-03-10)

4.1
CC̄ →
7
Critical →
3735
Lines

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

Top Modules (9)

ModulePathLinesFuncsClassesCC max
tic_t249_controller.py . 1,456 55 7 39
web_panel.py . 788 35 2 13
diagnose_usb.py . 327 9 0 16
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 (17)

SeverityTargetTypeValueLimit
critical main cc_exceeded 39 15
critical main high_fan_out 38 10
critical main high_fan_out 23 10
error test_read_registers high_fan_out 17 10
warning test_movement cc_exceeded 16 15
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 test_movement high_fan_out 11 10
warning TicT249Controller._home_gpio high_fan_out 11 10
warning api_connect high_fan_out 11 10
warning _reciprocate_worker high_fan_out 11 10
warning main high_fan_out 10 10
warning TicT249Controller._home_tic high_fan_out 10 10
warning TicT249Controller.wait_for_position high_fan_out 10 10

Hotspots (10)

FunctionFan-outNote
main 38 Orchestrates 38 calls
main 23 Orchestrates 23 calls
test_read_registers 17 Test reading registers from Tic.
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 =
test_movement 11 Test actual motor movement.
TicT249Controller._home_gpio 11 Homing programowy przez GPIO Raspberry Pi.
api_connect 11 Connect to a specific USB device.
_reciprocate_worker 11 Simplified reciprocating motion worker thread.

Refactoring Priorities (7)

#ActionImpactEffort
1 Split main (CC=39 → target CC<10) high low
2 Split god module tic_t249_controller.py (1456L, 7 classes) high high
3 Split god module web_panel.py (788L, 2 classes) high high
4 Split test_movement (CC=16 → target CC<10) medium low
5 Reduce main fan-out (currently 38) medium medium
6 Reduce main fan-out (currently 23) medium medium
7 Reduce test_read_registers fan-out (currently 17) medium medium