Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Feed WPI_TalonFX objects or turn off motor safety #117

Open
qhdwight opened this issue Feb 19, 2020 · 4 comments
Open

Feed WPI_TalonFX objects or turn off motor safety #117

qhdwight opened this issue Feb 19, 2020 · 4 comments

Comments

@qhdwight
Copy link

See: CrossTheRoadElec/Phoenix-api#68

Or else amber lights on slave will occur and there will be no movement.

Tested on our x4 Falcon drivetrain. Default generated project doesn't work. When motor safety was disabled by manually going into Java code it worked.

@auscompgeek
Copy link
Member

I think the best way to do this is to actually make the followers the base concrete class instead of the WPI_* ones.

@pietroglyph
Copy link
Contributor

Turning off motor safety is actually what we want in this situation (unless we want to call feed on the followers), and explicitly disabling it is a lot clearer than implicitly turning it off via the base non-WPI classes, IMO.

@auscompgeek
Copy link
Member

I suppose for the drivetrain characterisation that would make sense. But for simple-motor for example we don't need them to implement SpeedController.

@pietroglyph
Copy link
Contributor

That’s a good point. I used the WPI classes when I wrote simple motor in order to be consistent with the other projects (you have to enter in WPI_TalonSRX in the other projects’ configs after all), but we could switch to the base class everywhere (not using DifferentialDrive could be good because of the whole motor inversion misfeature anyway.)

Ultimately I err on the side of lazy, so I would prefer disabling motor safety (and if there are no other serious objections then I’ll go ahead and PR that in the next couple of days.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants