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

merge dev/quarterback into dev/experimental #106

Open
wants to merge 95 commits into
base: dev/experimental
Choose a base branch
from

Conversation

RyzenFromFire
Copy link
Member

No description provided.

RyzenFromFire and others added 30 commits January 24, 2024 20:28
Added setFlywheelSpeed, setFlywheelSpeedStage, and adjustFlywheelSpeedStage.
and some minor reorganization
Implemented cradleActuator.write for move the cradle's linear actuator.
- add QB turret and base into `main.cpp` switch statement based on EEPROM
- prevented NPEs from QB turret not having a `Drive`
- added `assemblyPin` for tilter to QB turret constructor
- added `initialized` state variable to QB turret to differentiate between initial reset/startup (first time pressed) and zero turret (second time onwards)
- added variables to QB turret class to hold normalized stick values (like `Drive`) and prevent repeated local variable creation and abandonment
- prototyped control schema for turret (`QuarterbackTurret::action()`)
- added automatic toggle overload for `switchMode()`
- impemented `switchMode`
- refactor flywheel to two motor objects since we can't power two falcons off one pin because we can't invert polarity of one, it has to be done in code
- actually initiate motor objects (setup pins)
- reassign typical drive motor pins to flywheel pins
fixed additional null pointer exception cases for qb turret
- comparison was inverted (skill issue)
- also added debug function
- also fixed flywheel stick with same issue as turret (wrong inequality operator)
- added `relativeToRobot` argument to `moveTurret()` since we will need it for the macros
- documentation revisions
- implement `switchTarget()`
- added pins to QB turret constructor
- removed turret variables from QB turret class since they weren't being used
- remove `enable = true` from `zeroTurret()` -- don't necessarily want this always, for safety. should only happen with `reset()` and the `setEnabled()` called from Square
- add functionality to disable non-emergency actions when running a macro
Made progress on the functions loadFromCenter and handoff.
Started work on the quarterback's laser sensor.
Tw1ZZLER and others added 30 commits April 3, 2024 22:16
I have implemented an addition to the (Circle) homing routine where the QB turret will spin in a circle after completing the laser homing. It tracks max and min X and Y values, effectively calibrating itself so that it can then print out the heading that it sees at any given time. This is accurate to at least 10 degrees from what I was testing probably more like 3 or 5.
Averaging function kinda messes it up

Hi max
Currently this code works like it used to, just commented a ton of things and organized my code, I also added the ability for a variable to enable and disable the magnetometer functionality
The magnetometer doesn't seem to work yet. There is something still wrong with FindNearest function. Inputs of target = 1 degree and current = 302 provides a result of 301
The magnetometer was too unreliable so I removed it and went back to encoder
actually fixed turret sensitivity
improved code readability/whitespace
added defines for george's magic numbers
added actual threshold PWM value instead of incorrect bottom constraint (brought power up to minimum when it should be zero)
moved from Quarterback class (which is old QB) to new QuarterbackBase class. also just pass in drive with that constructor instead of implementing a new method for every robot class :(

Co-Authored-By: RyzenFromFire <16062019+RyzenFromFire@users.noreply.github.com>
Updated a few things

Co-Authored-By: RyzenFromFire <16062019+RyzenFromFire@users.noreply.github.com>
Ready to start testing / debugging on actual hardware now
Testing completed, it actually reduced the latency so you can't really visually see it on the serial monitor so I would say it is about sub 100 ms or so.
Mr. President the second motor has hit the ESP
Needs tested in the real world but this is the setup for that.
Made some changes and cleaned up the code a bit to make it more readable / organized
Add QB wifi changes (merge `quarterback-wifi` -> `quarterback`)
With the newer of FastLED, 3.7.0 it doesn't seem to like the compiler platformio uses, so I forced PIO to use an older version of FastLED, this library does not always need to be 100% up to date
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.

5 participants