Skip to content

Add a user settable flag on device that resets on boot #111

Open

Description

@TheTripleV

I'd like a way to determine if a device has been initialized by robot code (homed and zero'd in this case).

Timeline:

  1. Robot is manually (human) homed
  2. Robot breaker is turned on
  3. TalonFX turns on
  4. Robot code starts
  5. Robot code zeros TalonFX
  6. Robot code restarts (redeploy)
  7. Robot code zeros TalonFX - want to eliminate this

To do this, TalonFX can have a flag (or fault) that

  • can be set/cleared by phoenix6
  • persists across robot code restarts
  • automatically clears when the device is powered off

It would be good to have this on all TalonFX, Cancoder, Pigeon, and Candi devices.

Activity

  1. daltzctr commented on Sep 19, 2025

    @daltzctr
    Contributor

    This doesn't exactly solve your problem, but you could use the CustomParams configs for this. There's a few clever strategies I can see using some value entered into CustomParams.

  2. ArchdukeTim commented on May 19, 2026

    @ArchdukeTim

    I've thought about this the past 2 years, and both times the solution was always 'start your motor at 0, and never call setPosition in code'. Which can sometimes suck, but is definitely safer than overwriting the position on redeploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions