Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readability and support 4 versions of HexDrive #56

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

Robotmad
Copy link
Contributor

Break down update and draw actions into their own functions for each state to improve readability.

When initialising HexDrive EEPROM allow user to select from 4 board types: 4 servo, 2 motor, 2 servo/1motor, unknown which have unique PIDs.
When finding a HexDrive by PID, accept any of the above and set num_servos and num_motors accordingly.
Only offer "Servo Test" if there is a Servo.
Only offer "Motor Moves" if there is a Motor.
Test Servo: UI for the right number of Servos - centred vertially.
Move Motors: Currently no functionality if only 1 motor - so you get a warning. If we can come up with something to do with 1 motor this is place holder to do it.

NB 2 servo/1 motor is probably going to be of use with multiple bords fitted - either to deliver a pair of motors run from HexDrives on different sides of the Badge, or to support 3 motor use cases. (need to support multiple HexDrives being active for this.)

hexdrive.py: add try: around PWM function it was missing for which could fail.

@Robotmad Robotmad linked an issue Jun 26, 2024 that may be closed by this pull request
@Robotmad Robotmad merged commit dafbc1f into main Jun 26, 2024
1 check passed
@Robotmad Robotmad deleted the 55-expand-range-of-pids branch June 26, 2024 08:16
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.

Expand range of PIDs
2 participants