|
14 | 14 | from components.injector import InjectorComponent |
15 | 15 | from components.led_component import LightStrip |
16 | 16 | from components.shooter import ShooterComponent |
17 | | -from utilities.game import FIELD_LENGTH, FIELD_WIDTH, is_red |
| 17 | +from utilities.game import ( |
| 18 | + ALGAE_MAX_DIAMETER, |
| 19 | + ALGAE_MIN_DIAMETER, |
| 20 | + FIELD_LENGTH, |
| 21 | + FIELD_WIDTH, |
| 22 | + is_red, |
| 23 | +) |
18 | 24 |
|
19 | 25 |
|
20 | 26 | @wpiutil.wpistruct.make_wpistruct |
@@ -42,16 +48,16 @@ class BallisticsComponent: |
42 | 48 | # Tuples are values corresponding to the distances above |
43 | 49 | # fmt: off |
44 | 50 | FLYWHEEL_TOP_SPEED_LOOKUP = { |
45 | | - 16.0: (30, 32.5, 38.0), # , 90 |
| 51 | + ALGAE_MIN_DIAMETER: (30, 32.5, 38.0), # , 90 |
46 | 52 | # 16.5: (60, 80), |
47 | | - 17.0: (33, 36, 39.0), # , 50 |
| 53 | + ALGAE_MAX_DIAMETER: (33, 36, 39.0), # , 50 |
48 | 54 | } |
49 | 55 | # Currently we use the same speed top and bottom, but this could be seperate |
50 | 56 | FLYWHEEL_BOTTOM_SPEED_LOOKUP = FLYWHEEL_TOP_SPEED_LOOKUP |
51 | 57 | FLYWHEEL_ANGLE_LOOKUP = { |
52 | | - 16.0: (math.radians(-10), math.radians(-12), math.radians(-19)), # , math.radians(-25) |
| 58 | + ALGAE_MIN_DIAMETER: (math.radians(-10), math.radians(-12), math.radians(-19)), # , math.radians(-25) |
53 | 59 | # 16.5: (math.radians(-15), math.radians(-20)), |
54 | | - 17.0: (math.radians(-10), math.radians(-12), math.radians(-19)), # , math.radians(-25) |
| 60 | + ALGAE_MAX_DIAMETER: (math.radians(-10), math.radians(-12), math.radians(-19)), # , math.radians(-25) |
55 | 61 | } |
56 | 62 | # fmt: on |
57 | 63 | BALL_SIZES = list(FLYWHEEL_ANGLE_LOOKUP.keys()) |
|
0 commit comments