Compare commits

..

10 Commits

4 changed files with 3 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
# Team 65266 Lego Dynamics - Pybricks Utils # Team 65266 Lego Dynamics - PYNAMICS - Pybricks Utilities
A collection of Pybricks utilities to assist in your FLL robot programming with Python. Created by FLL team 65266, Lego Dynamics. A collection of Pybricks utilities to assist in your FLL robot programming with Python. Created by FLL team 65266, Lego Dynamics.
<img src="https://codes.fll-65266.org/Arcmyx/pynamics-pybricks-utils/raw/branch/arcmyx-dev/pynamics-screenshot.png" alt="Pynamics screenshot" width="670"> <img src="https://codes.fll-65266.org/Arcmyx/pynamics-pybricks-utils/raw/branch/main/pynamics-screenshot.png" alt="Pynamics screenshot" width="670">
How to use this: How to use this:

View File

@@ -41,7 +41,7 @@ class MotorDiagnostics:
# Stability: penalize deviation relative to desired # Stability: penalize deviation relative to desired
stability = max(0, 100 - (stdev_speed / desired) * 100) stability = max(0, 100 - (stdev_speed / desired) * 100)
# Normalize load: map 1020 as baseline (0%), 200 as max (100%) # Normalize load: map 10 to 20 as baseline (around 0%), 200 as max (around 100%)
baseline = 15 # midpoint of idle range baseline = 15 # midpoint of idle range
max_observed = 200 # heavy load/stall max_observed = 200 # heavy load/stall
normalized_load = max(0, avg_load - baseline) normalized_load = max(0, avg_load - baseline)