Skip to content

Dropper branch#31

Open
alicvo wants to merge 4 commits into
masterfrom
dropper_branch
Open

Dropper branch#31
alicvo wants to merge 4 commits into
masterfrom
dropper_branch

Conversation

@alicvo

@alicvo alicvo commented Jun 6, 2026

Copy link
Copy Markdown

basicawwy

  • added servo module

    • ServoWrapper.py
      • added high-level PWM methods for servo-controlled subsystems:
        • dropper_drop()
        • dropper_reset()
        • grabber1_open()
        • grabber1_close()
        • grabber2_open()
        • grabber2_close()
        • torpedo_fire()
        • torpedo_reset()
      • added generic set_pwm(subsystem, pwm_value) helper for setting PWM by subsystem name
    • test_servo.py
      • added CLI tester for manually testing servo subsystem commands
    • README.md
      • added usage notes for servo wrapper commands and shared memory behavior
  • updated shared_memory.py

    • added shared memory PWM values for servo-controlled subsystems:
      • dropper_pwm
      • grabber1_pwm
      • grabber2_pwm
      • torpedo_pwm
  • updated MotorWrapper.py

    • extended USB command packet to include servo PWM values:
      • dropper_pwm
      • grabber1_pwm
      • grabber2_pwm
      • torpedo_pwm
    • reads servo PWM values from shared memory and updates the controls array every time send_command() is called
    • updated motor validation so only motor values are scaled by MOTOR_FACTOR; control and servo PWM values are sent unscaled

note / concern

  • ServoWrapper only updates shared memory values; PWM values are sent to hardware the next time MotorWrapper.send_command() is called
  • this works with the current USB packet flow, but long term we may want a separate command wrapper since the packet includes both motor and non-motor controls

@alicvo alicvo requested review from AndyC534 and rsunderr June 6, 2026 04:22
@alicvo alicvo self-assigned this Jun 6, 2026
@alicvo alicvo linked an issue Jun 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Servo Wrapper Class

1 participant