001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenix6.hardware.core; 008 009import com.ctre.phoenix6.hardware.ParentDevice; 010import com.ctre.phoenix6.controls.*; 011import com.ctre.phoenix6.controls.compound.*; 012import com.ctre.phoenix6.configs.*; 013import com.ctre.phoenix6.StatusCode; 014import com.ctre.phoenix6.hardware.traits.*; 015import com.ctre.phoenix6.jni.PlatformJNI; 016import com.ctre.phoenix6.sim.DeviceType; 017import com.ctre.phoenix6.sim.TalonFXSimState; 018import com.ctre.phoenix6.*; 019import com.ctre.phoenix6.spns.*; 020import com.ctre.phoenix6.signals.*; 021import java.util.HashMap; 022import edu.wpi.first.units.*; 023import edu.wpi.first.units.measure.*; 024import static edu.wpi.first.units.Units.*; 025 026/** 027 * Class description for the Talon FX integrated motor controller. 028 * 029 * <pre> 030 * // Constants used in TalonFX construction 031 * final int kTalonFXId = 0; 032 * final String kTalonFXCANbus = "canivore"; 033 * 034 * // Construct the TalonFX 035 * TalonFX talonfx = new TalonFX(kTalonFXId, kTalonFXCANbus); 036 * 037 * // Configure the TalonFX for basic use 038 * TalonFXConfiguration configs = new TalonFXConfiguration(); 039 * // This TalonFX should be configured with a kP of 1, a kI of 0, a kD of 10, and a kV of 2 on slot 0 040 * configs.Slot0.kP = 1; 041 * configs.Slot0.kI = 0; 042 * configs.Slot0.kD = 10; 043 * configs.Slot0.kV = 2; 044 * 045 * // Write these configs to the TalonFX 046 * talonfx.getConfigurator().apply(configs); 047 * 048 * // Set the position to 0 rotations for initial use 049 * talonfx.setPosition(0); 050 * 051 * // Get Position and Velocity 052 * var position = talonfx.getPosition(); 053 * var velocity = talonfx.getVelocity(); 054 * 055 * // Refresh and print these values 056 * System.out.println("Position is " + position.refresh().toString()); 057 * System.out.println("Velocity is " + velocity.refresh().toString()); 058 * </pre> 059 */ 060public class CoreTalonFX extends ParentDevice implements CommonTalonWithFOC 061{ 062 private TalonFXConfigurator _configurator; 063 064 /** 065 * Constructs a new Talon FX motor controller object. 066 * <p> 067 * Constructs the device using the default CAN bus for the system: 068 * <ul> 069 * <li>"rio" on roboRIO 070 * <li>"can0" on Linux 071 * <li>"*" on Windows 072 * </ul> 073 * 074 * @param deviceId ID of the device, as configured in Phoenix Tuner. 075 */ 076 public CoreTalonFX(int deviceId) 077 { 078 this(deviceId, ""); 079 } 080 081 /** 082 * Constructs a new Talon FX motor controller object. 083 * 084 * @param deviceId ID of the device, as configured in Phoenix Tuner. 085 * @param canbus Name of the CAN bus this device is on. Possible CAN bus strings are: 086 * <ul> 087 * <li>"rio" for the native roboRIO CAN bus 088 * <li>CANivore name or serial number 089 * <li>SocketCAN interface (non-FRC Linux only) 090 * <li>"*" for any CANivore seen by the program 091 * <li>empty string (default) to select the default for the system: 092 * <ul> 093 * <li>"rio" on roboRIO 094 * <li>"can0" on Linux 095 * <li>"*" on Windows 096 * </ul> 097 * </ul> 098 */ 099 public CoreTalonFX(int deviceId, String canbus) 100 { 101 super(deviceId, "talon fx", canbus); 102 _configurator = new TalonFXConfigurator(this.deviceIdentifier); 103 PlatformJNI.JNI_SimCreate(DeviceType.P6_TalonFXType.value, deviceId); 104 } 105 106 /** 107 * Constructs a new Talon FX motor controller object. 108 * 109 * @param deviceId ID of the device, as configured in Phoenix Tuner. 110 * @param canbus The CAN bus this device is on. 111 */ 112 public CoreTalonFX(int deviceId, CANBus canbus) 113 { 114 this(deviceId, canbus.getName()); 115 } 116 117 /** 118 * Gets the configurator to use with this device's configs 119 * 120 * @return Configurator for this object 121 */ 122 public TalonFXConfigurator getConfigurator() 123 { 124 return this._configurator; 125 } 126 127 128 private TalonFXSimState _simState = null; 129 /** 130 * Get the simulation state for this device. 131 * <p> 132 * This function reuses an allocated simulation state 133 * object, so it is safe to call this function multiple 134 * times in a robot loop. 135 * 136 * @return Simulation state 137 */ 138 public TalonFXSimState getSimState() { 139 if (_simState == null) 140 _simState = new TalonFXSimState(this); 141 return _simState; 142 } 143 144 145 146 /** 147 * App Major Version number. 148 * 149 * <ul> 150 * <li> <b>Minimum Value:</b> 0 151 * <li> <b>Maximum Value:</b> 255 152 * <li> <b>Default Value:</b> 0 153 * <li> <b>Units:</b> 154 * </ul> 155 * 156 * Default Rates: 157 * <ul> 158 * <li> <b>CAN:</b> 4.0 Hz 159 * </ul> 160 * <p> 161 * This refreshes and returns a cached StatusSignal object. 162 * 163 * @return VersionMajor Status Signal Object 164 */ 165 @Override 166 public StatusSignal<Integer> getVersionMajor() 167 { 168 return getVersionMajor(true); 169 } 170 171 /** 172 * App Major Version number. 173 * 174 * <ul> 175 * <li> <b>Minimum Value:</b> 0 176 * <li> <b>Maximum Value:</b> 255 177 * <li> <b>Default Value:</b> 0 178 * <li> <b>Units:</b> 179 * </ul> 180 * 181 * Default Rates: 182 * <ul> 183 * <li> <b>CAN:</b> 4.0 Hz 184 * </ul> 185 * <p> 186 * This refreshes and returns a cached StatusSignal object. 187 * 188 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 189 * @return VersionMajor Status Signal Object 190 */ 191 @Override 192 public StatusSignal<Integer> getVersionMajor(boolean refresh) 193 { 194 @SuppressWarnings("unchecked") 195 var retval = super.lookupStatusSignal(SpnValue.Version_Major.value, Integer.class, val -> (int)val, "VersionMajor", false, refresh); 196 return retval; 197 } 198 199 /** 200 * App Minor Version number. 201 * 202 * <ul> 203 * <li> <b>Minimum Value:</b> 0 204 * <li> <b>Maximum Value:</b> 255 205 * <li> <b>Default Value:</b> 0 206 * <li> <b>Units:</b> 207 * </ul> 208 * 209 * Default Rates: 210 * <ul> 211 * <li> <b>CAN:</b> 4.0 Hz 212 * </ul> 213 * <p> 214 * This refreshes and returns a cached StatusSignal object. 215 * 216 * @return VersionMinor Status Signal Object 217 */ 218 @Override 219 public StatusSignal<Integer> getVersionMinor() 220 { 221 return getVersionMinor(true); 222 } 223 224 /** 225 * App Minor Version number. 226 * 227 * <ul> 228 * <li> <b>Minimum Value:</b> 0 229 * <li> <b>Maximum Value:</b> 255 230 * <li> <b>Default Value:</b> 0 231 * <li> <b>Units:</b> 232 * </ul> 233 * 234 * Default Rates: 235 * <ul> 236 * <li> <b>CAN:</b> 4.0 Hz 237 * </ul> 238 * <p> 239 * This refreshes and returns a cached StatusSignal object. 240 * 241 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 242 * @return VersionMinor Status Signal Object 243 */ 244 @Override 245 public StatusSignal<Integer> getVersionMinor(boolean refresh) 246 { 247 @SuppressWarnings("unchecked") 248 var retval = super.lookupStatusSignal(SpnValue.Version_Minor.value, Integer.class, val -> (int)val, "VersionMinor", false, refresh); 249 return retval; 250 } 251 252 /** 253 * App Bugfix Version number. 254 * 255 * <ul> 256 * <li> <b>Minimum Value:</b> 0 257 * <li> <b>Maximum Value:</b> 255 258 * <li> <b>Default Value:</b> 0 259 * <li> <b>Units:</b> 260 * </ul> 261 * 262 * Default Rates: 263 * <ul> 264 * <li> <b>CAN:</b> 4.0 Hz 265 * </ul> 266 * <p> 267 * This refreshes and returns a cached StatusSignal object. 268 * 269 * @return VersionBugfix Status Signal Object 270 */ 271 @Override 272 public StatusSignal<Integer> getVersionBugfix() 273 { 274 return getVersionBugfix(true); 275 } 276 277 /** 278 * App Bugfix Version number. 279 * 280 * <ul> 281 * <li> <b>Minimum Value:</b> 0 282 * <li> <b>Maximum Value:</b> 255 283 * <li> <b>Default Value:</b> 0 284 * <li> <b>Units:</b> 285 * </ul> 286 * 287 * Default Rates: 288 * <ul> 289 * <li> <b>CAN:</b> 4.0 Hz 290 * </ul> 291 * <p> 292 * This refreshes and returns a cached StatusSignal object. 293 * 294 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 295 * @return VersionBugfix Status Signal Object 296 */ 297 @Override 298 public StatusSignal<Integer> getVersionBugfix(boolean refresh) 299 { 300 @SuppressWarnings("unchecked") 301 var retval = super.lookupStatusSignal(SpnValue.Version_Bugfix.value, Integer.class, val -> (int)val, "VersionBugfix", false, refresh); 302 return retval; 303 } 304 305 /** 306 * App Build Version number. 307 * 308 * <ul> 309 * <li> <b>Minimum Value:</b> 0 310 * <li> <b>Maximum Value:</b> 255 311 * <li> <b>Default Value:</b> 0 312 * <li> <b>Units:</b> 313 * </ul> 314 * 315 * Default Rates: 316 * <ul> 317 * <li> <b>CAN:</b> 4.0 Hz 318 * </ul> 319 * <p> 320 * This refreshes and returns a cached StatusSignal object. 321 * 322 * @return VersionBuild Status Signal Object 323 */ 324 @Override 325 public StatusSignal<Integer> getVersionBuild() 326 { 327 return getVersionBuild(true); 328 } 329 330 /** 331 * App Build Version number. 332 * 333 * <ul> 334 * <li> <b>Minimum Value:</b> 0 335 * <li> <b>Maximum Value:</b> 255 336 * <li> <b>Default Value:</b> 0 337 * <li> <b>Units:</b> 338 * </ul> 339 * 340 * Default Rates: 341 * <ul> 342 * <li> <b>CAN:</b> 4.0 Hz 343 * </ul> 344 * <p> 345 * This refreshes and returns a cached StatusSignal object. 346 * 347 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 348 * @return VersionBuild Status Signal Object 349 */ 350 @Override 351 public StatusSignal<Integer> getVersionBuild(boolean refresh) 352 { 353 @SuppressWarnings("unchecked") 354 var retval = super.lookupStatusSignal(SpnValue.Version_Build.value, Integer.class, val -> (int)val, "VersionBuild", false, refresh); 355 return retval; 356 } 357 358 /** 359 * Full Version of firmware in device. The format is a four byte 360 * value. 361 * 362 * <ul> 363 * <li> <b>Minimum Value:</b> 0 364 * <li> <b>Maximum Value:</b> 4294967295 365 * <li> <b>Default Value:</b> 0 366 * <li> <b>Units:</b> 367 * </ul> 368 * 369 * Default Rates: 370 * <ul> 371 * <li> <b>CAN:</b> 4.0 Hz 372 * </ul> 373 * <p> 374 * This refreshes and returns a cached StatusSignal object. 375 * 376 * @return Version Status Signal Object 377 */ 378 @Override 379 public StatusSignal<Integer> getVersion() 380 { 381 return getVersion(true); 382 } 383 384 /** 385 * Full Version of firmware in device. The format is a four byte 386 * value. 387 * 388 * <ul> 389 * <li> <b>Minimum Value:</b> 0 390 * <li> <b>Maximum Value:</b> 4294967295 391 * <li> <b>Default Value:</b> 0 392 * <li> <b>Units:</b> 393 * </ul> 394 * 395 * Default Rates: 396 * <ul> 397 * <li> <b>CAN:</b> 4.0 Hz 398 * </ul> 399 * <p> 400 * This refreshes and returns a cached StatusSignal object. 401 * 402 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 403 * @return Version Status Signal Object 404 */ 405 @Override 406 public StatusSignal<Integer> getVersion(boolean refresh) 407 { 408 @SuppressWarnings("unchecked") 409 var retval = super.lookupStatusSignal(SpnValue.Version_Full.value, Integer.class, val -> (int)val, "Version", false, refresh); 410 return retval; 411 } 412 413 /** 414 * Integer representing all fault flags reported by the device. 415 * <p> 416 * These are device specific and are not used directly in typical 417 * applications. Use the signal specific GetFault_*() methods instead. 418 * 419 * <ul> 420 * <li> <b>Minimum Value:</b> 0 421 * <li> <b>Maximum Value:</b> 4294967295 422 * <li> <b>Default Value:</b> 0 423 * <li> <b>Units:</b> 424 * </ul> 425 * 426 * Default Rates: 427 * <ul> 428 * <li> <b>CAN:</b> 4.0 Hz 429 * </ul> 430 * <p> 431 * This refreshes and returns a cached StatusSignal object. 432 * 433 * @return FaultField Status Signal Object 434 */ 435 @Override 436 public StatusSignal<Integer> getFaultField() 437 { 438 return getFaultField(true); 439 } 440 441 /** 442 * Integer representing all fault flags reported by the device. 443 * <p> 444 * These are device specific and are not used directly in typical 445 * applications. Use the signal specific GetFault_*() methods instead. 446 * 447 * <ul> 448 * <li> <b>Minimum Value:</b> 0 449 * <li> <b>Maximum Value:</b> 4294967295 450 * <li> <b>Default Value:</b> 0 451 * <li> <b>Units:</b> 452 * </ul> 453 * 454 * Default Rates: 455 * <ul> 456 * <li> <b>CAN:</b> 4.0 Hz 457 * </ul> 458 * <p> 459 * This refreshes and returns a cached StatusSignal object. 460 * 461 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 462 * @return FaultField Status Signal Object 463 */ 464 @Override 465 public StatusSignal<Integer> getFaultField(boolean refresh) 466 { 467 @SuppressWarnings("unchecked") 468 var retval = super.lookupStatusSignal(SpnValue.AllFaults.value, Integer.class, val -> (int)val, "FaultField", true, refresh); 469 return retval; 470 } 471 472 /** 473 * Integer representing all (persistent) sticky fault flags reported 474 * by the device. 475 * <p> 476 * These are device specific and are not used directly in typical 477 * applications. Use the signal specific GetStickyFault_*() methods 478 * instead. 479 * 480 * <ul> 481 * <li> <b>Minimum Value:</b> 0 482 * <li> <b>Maximum Value:</b> 4294967295 483 * <li> <b>Default Value:</b> 0 484 * <li> <b>Units:</b> 485 * </ul> 486 * 487 * Default Rates: 488 * <ul> 489 * <li> <b>CAN:</b> 4.0 Hz 490 * </ul> 491 * <p> 492 * This refreshes and returns a cached StatusSignal object. 493 * 494 * @return StickyFaultField Status Signal Object 495 */ 496 @Override 497 public StatusSignal<Integer> getStickyFaultField() 498 { 499 return getStickyFaultField(true); 500 } 501 502 /** 503 * Integer representing all (persistent) sticky fault flags reported 504 * by the device. 505 * <p> 506 * These are device specific and are not used directly in typical 507 * applications. Use the signal specific GetStickyFault_*() methods 508 * instead. 509 * 510 * <ul> 511 * <li> <b>Minimum Value:</b> 0 512 * <li> <b>Maximum Value:</b> 4294967295 513 * <li> <b>Default Value:</b> 0 514 * <li> <b>Units:</b> 515 * </ul> 516 * 517 * Default Rates: 518 * <ul> 519 * <li> <b>CAN:</b> 4.0 Hz 520 * </ul> 521 * <p> 522 * This refreshes and returns a cached StatusSignal object. 523 * 524 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 525 * @return StickyFaultField Status Signal Object 526 */ 527 @Override 528 public StatusSignal<Integer> getStickyFaultField(boolean refresh) 529 { 530 @SuppressWarnings("unchecked") 531 var retval = super.lookupStatusSignal(SpnValue.AllStickyFaults.value, Integer.class, val -> (int)val, "StickyFaultField", true, refresh); 532 return retval; 533 } 534 535 /** 536 * The applied (output) motor voltage. 537 * 538 * <ul> 539 * <li> <b>Minimum Value:</b> -40.96 540 * <li> <b>Maximum Value:</b> 40.95 541 * <li> <b>Default Value:</b> 0 542 * <li> <b>Units:</b> V 543 * </ul> 544 * 545 * Default Rates: 546 * <ul> 547 * <li> <b>CAN 2.0:</b> 100.0 Hz 548 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 549 * </ul> 550 * <p> 551 * This refreshes and returns a cached StatusSignal object. 552 * 553 * @return MotorVoltage Status Signal Object 554 */ 555 @Override 556 public StatusSignal<Voltage> getMotorVoltage() 557 { 558 return getMotorVoltage(true); 559 } 560 561 /** 562 * The applied (output) motor voltage. 563 * 564 * <ul> 565 * <li> <b>Minimum Value:</b> -40.96 566 * <li> <b>Maximum Value:</b> 40.95 567 * <li> <b>Default Value:</b> 0 568 * <li> <b>Units:</b> V 569 * </ul> 570 * 571 * Default Rates: 572 * <ul> 573 * <li> <b>CAN 2.0:</b> 100.0 Hz 574 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 575 * </ul> 576 * <p> 577 * This refreshes and returns a cached StatusSignal object. 578 * 579 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 580 * @return MotorVoltage Status Signal Object 581 */ 582 @Override 583 public StatusSignal<Voltage> getMotorVoltage(boolean refresh) 584 { 585 @SuppressWarnings("unchecked") 586 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_MotorVoltage.value, Voltage.class, val -> Volts.of(val), "MotorVoltage", true, refresh); 587 return retval; 588 } 589 590 /** 591 * Forward Limit Pin. 592 * 593 * 594 * Default Rates: 595 * <ul> 596 * <li> <b>CAN 2.0:</b> 100.0 Hz 597 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 598 * </ul> 599 * <p> 600 * This refreshes and returns a cached StatusSignal object. 601 * 602 * @return ForwardLimit Status Signal Object 603 */ 604 @Override 605 public StatusSignal<ForwardLimitValue> getForwardLimit() 606 { 607 return getForwardLimit(true); 608 } 609 610 /** 611 * Forward Limit Pin. 612 * 613 * 614 * Default Rates: 615 * <ul> 616 * <li> <b>CAN 2.0:</b> 100.0 Hz 617 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 618 * </ul> 619 * <p> 620 * This refreshes and returns a cached StatusSignal object. 621 * 622 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 623 * @return ForwardLimit Status Signal Object 624 */ 625 @Override 626 public StatusSignal<ForwardLimitValue> getForwardLimit(boolean refresh) 627 { 628 @SuppressWarnings("unchecked") 629 var retval = super.lookupStatusSignal(SpnValue.ForwardLimit.value, ForwardLimitValue.class, val -> ForwardLimitValue.valueOf((int)val), "ForwardLimit", true, refresh); 630 return retval; 631 } 632 633 /** 634 * Reverse Limit Pin. 635 * 636 * 637 * Default Rates: 638 * <ul> 639 * <li> <b>CAN 2.0:</b> 100.0 Hz 640 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 641 * </ul> 642 * <p> 643 * This refreshes and returns a cached StatusSignal object. 644 * 645 * @return ReverseLimit Status Signal Object 646 */ 647 @Override 648 public StatusSignal<ReverseLimitValue> getReverseLimit() 649 { 650 return getReverseLimit(true); 651 } 652 653 /** 654 * Reverse Limit Pin. 655 * 656 * 657 * Default Rates: 658 * <ul> 659 * <li> <b>CAN 2.0:</b> 100.0 Hz 660 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 661 * </ul> 662 * <p> 663 * This refreshes and returns a cached StatusSignal object. 664 * 665 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 666 * @return ReverseLimit Status Signal Object 667 */ 668 @Override 669 public StatusSignal<ReverseLimitValue> getReverseLimit(boolean refresh) 670 { 671 @SuppressWarnings("unchecked") 672 var retval = super.lookupStatusSignal(SpnValue.ReverseLimit.value, ReverseLimitValue.class, val -> ReverseLimitValue.valueOf((int)val), "ReverseLimit", true, refresh); 673 return retval; 674 } 675 676 /** 677 * The applied rotor polarity as seen from the front of the motor. 678 * This typically is determined by the Inverted config, but can be 679 * overridden if using Follower features. 680 * 681 * 682 * Default Rates: 683 * <ul> 684 * <li> <b>CAN 2.0:</b> 100.0 Hz 685 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 686 * </ul> 687 * <p> 688 * This refreshes and returns a cached StatusSignal object. 689 * 690 * @return AppliedRotorPolarity Status Signal Object 691 */ 692 @Override 693 public StatusSignal<AppliedRotorPolarityValue> getAppliedRotorPolarity() 694 { 695 return getAppliedRotorPolarity(true); 696 } 697 698 /** 699 * The applied rotor polarity as seen from the front of the motor. 700 * This typically is determined by the Inverted config, but can be 701 * overridden if using Follower features. 702 * 703 * 704 * Default Rates: 705 * <ul> 706 * <li> <b>CAN 2.0:</b> 100.0 Hz 707 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 708 * </ul> 709 * <p> 710 * This refreshes and returns a cached StatusSignal object. 711 * 712 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 713 * @return AppliedRotorPolarity Status Signal Object 714 */ 715 @Override 716 public StatusSignal<AppliedRotorPolarityValue> getAppliedRotorPolarity(boolean refresh) 717 { 718 @SuppressWarnings("unchecked") 719 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_RotorPolarity.value, AppliedRotorPolarityValue.class, val -> AppliedRotorPolarityValue.valueOf((int)val), "AppliedRotorPolarity", true, refresh); 720 return retval; 721 } 722 723 /** 724 * The applied motor duty cycle. 725 * 726 * <ul> 727 * <li> <b>Minimum Value:</b> -2.0 728 * <li> <b>Maximum Value:</b> 1.9990234375 729 * <li> <b>Default Value:</b> 0 730 * <li> <b>Units:</b> fractional 731 * </ul> 732 * 733 * Default Rates: 734 * <ul> 735 * <li> <b>CAN 2.0:</b> 100.0 Hz 736 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 737 * </ul> 738 * <p> 739 * This refreshes and returns a cached StatusSignal object. 740 * 741 * @return DutyCycle Status Signal Object 742 */ 743 @Override 744 public StatusSignal<Double> getDutyCycle() 745 { 746 return getDutyCycle(true); 747 } 748 749 /** 750 * The applied motor duty cycle. 751 * 752 * <ul> 753 * <li> <b>Minimum Value:</b> -2.0 754 * <li> <b>Maximum Value:</b> 1.9990234375 755 * <li> <b>Default Value:</b> 0 756 * <li> <b>Units:</b> fractional 757 * </ul> 758 * 759 * Default Rates: 760 * <ul> 761 * <li> <b>CAN 2.0:</b> 100.0 Hz 762 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 763 * </ul> 764 * <p> 765 * This refreshes and returns a cached StatusSignal object. 766 * 767 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 768 * @return DutyCycle Status Signal Object 769 */ 770 @Override 771 public StatusSignal<Double> getDutyCycle(boolean refresh) 772 { 773 @SuppressWarnings("unchecked") 774 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_DutyCycle.value, Double.class, val -> val, "DutyCycle", true, refresh); 775 return retval; 776 } 777 778 /** 779 * Current corresponding to the torque output by the motor. Similar to 780 * StatorCurrent. Users will likely prefer this current to calculate 781 * the applied torque to the rotor. 782 * <p> 783 * Stator current where positive current means torque is applied in 784 * the forward direction as determined by the Inverted setting. 785 * 786 * <ul> 787 * <li> <b>Minimum Value:</b> -327.68 788 * <li> <b>Maximum Value:</b> 327.67 789 * <li> <b>Default Value:</b> 0 790 * <li> <b>Units:</b> A 791 * </ul> 792 * 793 * Default Rates: 794 * <ul> 795 * <li> <b>CAN 2.0:</b> 100.0 Hz 796 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 797 * </ul> 798 * <p> 799 * This refreshes and returns a cached StatusSignal object. 800 * 801 * @return TorqueCurrent Status Signal Object 802 */ 803 @Override 804 public StatusSignal<Current> getTorqueCurrent() 805 { 806 return getTorqueCurrent(true); 807 } 808 809 /** 810 * Current corresponding to the torque output by the motor. Similar to 811 * StatorCurrent. Users will likely prefer this current to calculate 812 * the applied torque to the rotor. 813 * <p> 814 * Stator current where positive current means torque is applied in 815 * the forward direction as determined by the Inverted setting. 816 * 817 * <ul> 818 * <li> <b>Minimum Value:</b> -327.68 819 * <li> <b>Maximum Value:</b> 327.67 820 * <li> <b>Default Value:</b> 0 821 * <li> <b>Units:</b> A 822 * </ul> 823 * 824 * Default Rates: 825 * <ul> 826 * <li> <b>CAN 2.0:</b> 100.0 Hz 827 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 828 * </ul> 829 * <p> 830 * This refreshes and returns a cached StatusSignal object. 831 * 832 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 833 * @return TorqueCurrent Status Signal Object 834 */ 835 @Override 836 public StatusSignal<Current> getTorqueCurrent(boolean refresh) 837 { 838 @SuppressWarnings("unchecked") 839 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_TorqueCurrent.value, Current.class, val -> Amps.of(val), "TorqueCurrent", true, refresh); 840 return retval; 841 } 842 843 /** 844 * Current corresponding to the stator windings. Similar to 845 * TorqueCurrent. Users will likely prefer TorqueCurrent over 846 * StatorCurrent. 847 * <p> 848 * Stator current where Positive current indicates motoring regardless 849 * of direction. Negative current indicates regenerative braking 850 * regardless of direction. 851 * 852 * <ul> 853 * <li> <b>Minimum Value:</b> -327.68 854 * <li> <b>Maximum Value:</b> 327.66 855 * <li> <b>Default Value:</b> 0 856 * <li> <b>Units:</b> A 857 * </ul> 858 * 859 * Default Rates: 860 * <ul> 861 * <li> <b>CAN 2.0:</b> 4.0 Hz 862 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 863 * </ul> 864 * <p> 865 * This refreshes and returns a cached StatusSignal object. 866 * 867 * @return StatorCurrent Status Signal Object 868 */ 869 @Override 870 public StatusSignal<Current> getStatorCurrent() 871 { 872 return getStatorCurrent(true); 873 } 874 875 /** 876 * Current corresponding to the stator windings. Similar to 877 * TorqueCurrent. Users will likely prefer TorqueCurrent over 878 * StatorCurrent. 879 * <p> 880 * Stator current where Positive current indicates motoring regardless 881 * of direction. Negative current indicates regenerative braking 882 * regardless of direction. 883 * 884 * <ul> 885 * <li> <b>Minimum Value:</b> -327.68 886 * <li> <b>Maximum Value:</b> 327.66 887 * <li> <b>Default Value:</b> 0 888 * <li> <b>Units:</b> A 889 * </ul> 890 * 891 * Default Rates: 892 * <ul> 893 * <li> <b>CAN 2.0:</b> 4.0 Hz 894 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 895 * </ul> 896 * <p> 897 * This refreshes and returns a cached StatusSignal object. 898 * 899 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 900 * @return StatorCurrent Status Signal Object 901 */ 902 @Override 903 public StatusSignal<Current> getStatorCurrent(boolean refresh) 904 { 905 @SuppressWarnings("unchecked") 906 var retval = super.lookupStatusSignal(SpnValue.PRO_SupplyAndTemp_StatorCurrent.value, Current.class, val -> Amps.of(val), "StatorCurrent", true, refresh); 907 return retval; 908 } 909 910 /** 911 * Measured supply side current. 912 * 913 * <ul> 914 * <li> <b>Minimum Value:</b> -327.68 915 * <li> <b>Maximum Value:</b> 327.66 916 * <li> <b>Default Value:</b> 0 917 * <li> <b>Units:</b> A 918 * </ul> 919 * 920 * Default Rates: 921 * <ul> 922 * <li> <b>CAN 2.0:</b> 4.0 Hz 923 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 924 * </ul> 925 * <p> 926 * This refreshes and returns a cached StatusSignal object. 927 * 928 * @return SupplyCurrent Status Signal Object 929 */ 930 @Override 931 public StatusSignal<Current> getSupplyCurrent() 932 { 933 return getSupplyCurrent(true); 934 } 935 936 /** 937 * Measured supply side current. 938 * 939 * <ul> 940 * <li> <b>Minimum Value:</b> -327.68 941 * <li> <b>Maximum Value:</b> 327.66 942 * <li> <b>Default Value:</b> 0 943 * <li> <b>Units:</b> A 944 * </ul> 945 * 946 * Default Rates: 947 * <ul> 948 * <li> <b>CAN 2.0:</b> 4.0 Hz 949 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 950 * </ul> 951 * <p> 952 * This refreshes and returns a cached StatusSignal object. 953 * 954 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 955 * @return SupplyCurrent Status Signal Object 956 */ 957 @Override 958 public StatusSignal<Current> getSupplyCurrent(boolean refresh) 959 { 960 @SuppressWarnings("unchecked") 961 var retval = super.lookupStatusSignal(SpnValue.PRO_SupplyAndTemp_SupplyCurrent.value, Current.class, val -> Amps.of(val), "SupplyCurrent", true, refresh); 962 return retval; 963 } 964 965 /** 966 * Measured supply voltage to the device. 967 * 968 * <ul> 969 * <li> <b>Minimum Value:</b> 4 970 * <li> <b>Maximum Value:</b> 29.575 971 * <li> <b>Default Value:</b> 4 972 * <li> <b>Units:</b> V 973 * </ul> 974 * 975 * Default Rates: 976 * <ul> 977 * <li> <b>CAN 2.0:</b> 4.0 Hz 978 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 979 * </ul> 980 * <p> 981 * This refreshes and returns a cached StatusSignal object. 982 * 983 * @return SupplyVoltage Status Signal Object 984 */ 985 @Override 986 public StatusSignal<Voltage> getSupplyVoltage() 987 { 988 return getSupplyVoltage(true); 989 } 990 991 /** 992 * Measured supply voltage to the device. 993 * 994 * <ul> 995 * <li> <b>Minimum Value:</b> 4 996 * <li> <b>Maximum Value:</b> 29.575 997 * <li> <b>Default Value:</b> 4 998 * <li> <b>Units:</b> V 999 * </ul> 1000 * 1001 * Default Rates: 1002 * <ul> 1003 * <li> <b>CAN 2.0:</b> 4.0 Hz 1004 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1005 * </ul> 1006 * <p> 1007 * This refreshes and returns a cached StatusSignal object. 1008 * 1009 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1010 * @return SupplyVoltage Status Signal Object 1011 */ 1012 @Override 1013 public StatusSignal<Voltage> getSupplyVoltage(boolean refresh) 1014 { 1015 @SuppressWarnings("unchecked") 1016 var retval = super.lookupStatusSignal(SpnValue.PRO_SupplyAndTemp_SupplyVoltage.value, Voltage.class, val -> Volts.of(val), "SupplyVoltage", true, refresh); 1017 return retval; 1018 } 1019 1020 /** 1021 * Temperature of device. 1022 * <p> 1023 * This is the temperature that the device measures itself to be at. 1024 * Similar to Processor Temperature. 1025 * 1026 * <ul> 1027 * <li> <b>Minimum Value:</b> 0.0 1028 * <li> <b>Maximum Value:</b> 255.0 1029 * <li> <b>Default Value:</b> 0 1030 * <li> <b>Units:</b> ℃ 1031 * </ul> 1032 * 1033 * Default Rates: 1034 * <ul> 1035 * <li> <b>CAN 2.0:</b> 4.0 Hz 1036 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1037 * </ul> 1038 * <p> 1039 * This refreshes and returns a cached StatusSignal object. 1040 * 1041 * @return DeviceTemp Status Signal Object 1042 */ 1043 @Override 1044 public StatusSignal<Temperature> getDeviceTemp() 1045 { 1046 return getDeviceTemp(true); 1047 } 1048 1049 /** 1050 * Temperature of device. 1051 * <p> 1052 * This is the temperature that the device measures itself to be at. 1053 * Similar to Processor Temperature. 1054 * 1055 * <ul> 1056 * <li> <b>Minimum Value:</b> 0.0 1057 * <li> <b>Maximum Value:</b> 255.0 1058 * <li> <b>Default Value:</b> 0 1059 * <li> <b>Units:</b> ℃ 1060 * </ul> 1061 * 1062 * Default Rates: 1063 * <ul> 1064 * <li> <b>CAN 2.0:</b> 4.0 Hz 1065 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1066 * </ul> 1067 * <p> 1068 * This refreshes and returns a cached StatusSignal object. 1069 * 1070 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1071 * @return DeviceTemp Status Signal Object 1072 */ 1073 @Override 1074 public StatusSignal<Temperature> getDeviceTemp(boolean refresh) 1075 { 1076 @SuppressWarnings("unchecked") 1077 var retval = super.lookupStatusSignal(SpnValue.PRO_SupplyAndTemp_DeviceTemp.value, Temperature.class, val -> Celsius.of(val), "DeviceTemp", true, refresh); 1078 return retval; 1079 } 1080 1081 /** 1082 * Temperature of the processor. 1083 * <p> 1084 * This is the temperature that the processor measures itself to be 1085 * at. Similar to Device Temperature. 1086 * 1087 * <ul> 1088 * <li> <b>Minimum Value:</b> 0.0 1089 * <li> <b>Maximum Value:</b> 255.0 1090 * <li> <b>Default Value:</b> 0 1091 * <li> <b>Units:</b> ℃ 1092 * </ul> 1093 * 1094 * Default Rates: 1095 * <ul> 1096 * <li> <b>CAN 2.0:</b> 4.0 Hz 1097 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1098 * </ul> 1099 * <p> 1100 * This refreshes and returns a cached StatusSignal object. 1101 * 1102 * @return ProcessorTemp Status Signal Object 1103 */ 1104 @Override 1105 public StatusSignal<Temperature> getProcessorTemp() 1106 { 1107 return getProcessorTemp(true); 1108 } 1109 1110 /** 1111 * Temperature of the processor. 1112 * <p> 1113 * This is the temperature that the processor measures itself to be 1114 * at. Similar to Device Temperature. 1115 * 1116 * <ul> 1117 * <li> <b>Minimum Value:</b> 0.0 1118 * <li> <b>Maximum Value:</b> 255.0 1119 * <li> <b>Default Value:</b> 0 1120 * <li> <b>Units:</b> ℃ 1121 * </ul> 1122 * 1123 * Default Rates: 1124 * <ul> 1125 * <li> <b>CAN 2.0:</b> 4.0 Hz 1126 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1127 * </ul> 1128 * <p> 1129 * This refreshes and returns a cached StatusSignal object. 1130 * 1131 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1132 * @return ProcessorTemp Status Signal Object 1133 */ 1134 @Override 1135 public StatusSignal<Temperature> getProcessorTemp(boolean refresh) 1136 { 1137 @SuppressWarnings("unchecked") 1138 var retval = super.lookupStatusSignal(SpnValue.PRO_SupplyAndTemp_ProcessorTemp.value, Temperature.class, val -> Celsius.of(val), "ProcessorTemp", true, refresh); 1139 return retval; 1140 } 1141 1142 /** 1143 * Velocity of the motor rotor. This velocity is not affected by any 1144 * feedback configs. 1145 * 1146 * <ul> 1147 * <li> <b>Minimum Value:</b> -512.0 1148 * <li> <b>Maximum Value:</b> 511.998046875 1149 * <li> <b>Default Value:</b> 0 1150 * <li> <b>Units:</b> rotations per second 1151 * </ul> 1152 * 1153 * Default Rates: 1154 * <ul> 1155 * <li> <b>CAN 2.0:</b> 4.0 Hz 1156 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1157 * </ul> 1158 * <p> 1159 * This refreshes and returns a cached StatusSignal object. 1160 * 1161 * @return RotorVelocity Status Signal Object 1162 */ 1163 @Override 1164 public StatusSignal<AngularVelocity> getRotorVelocity() 1165 { 1166 return getRotorVelocity(true); 1167 } 1168 1169 /** 1170 * Velocity of the motor rotor. This velocity is not affected by any 1171 * feedback configs. 1172 * 1173 * <ul> 1174 * <li> <b>Minimum Value:</b> -512.0 1175 * <li> <b>Maximum Value:</b> 511.998046875 1176 * <li> <b>Default Value:</b> 0 1177 * <li> <b>Units:</b> rotations per second 1178 * </ul> 1179 * 1180 * Default Rates: 1181 * <ul> 1182 * <li> <b>CAN 2.0:</b> 4.0 Hz 1183 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1184 * </ul> 1185 * <p> 1186 * This refreshes and returns a cached StatusSignal object. 1187 * 1188 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1189 * @return RotorVelocity Status Signal Object 1190 */ 1191 @Override 1192 public StatusSignal<AngularVelocity> getRotorVelocity(boolean refresh) 1193 { 1194 @SuppressWarnings("unchecked") 1195 var retval = super.lookupStatusSignal(SpnValue.PRO_RotorPosAndVel_Velocity.value, AngularVelocity.class, val -> RotationsPerSecond.of(val), "RotorVelocity", true, refresh); 1196 return retval; 1197 } 1198 1199 /** 1200 * Position of the motor rotor. This position is only affected by the 1201 * RotorOffset config and calls to setPosition. 1202 * 1203 * <ul> 1204 * <li> <b>Minimum Value:</b> -16384.0 1205 * <li> <b>Maximum Value:</b> 16383.999755859375 1206 * <li> <b>Default Value:</b> 0 1207 * <li> <b>Units:</b> rotations 1208 * </ul> 1209 * 1210 * Default Rates: 1211 * <ul> 1212 * <li> <b>CAN 2.0:</b> 4.0 Hz 1213 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1214 * </ul> 1215 * <p> 1216 * This refreshes and returns a cached StatusSignal object. 1217 * 1218 * @return RotorPosition Status Signal Object 1219 */ 1220 @Override 1221 public StatusSignal<Angle> getRotorPosition() 1222 { 1223 return getRotorPosition(true); 1224 } 1225 1226 /** 1227 * Position of the motor rotor. This position is only affected by the 1228 * RotorOffset config and calls to setPosition. 1229 * 1230 * <ul> 1231 * <li> <b>Minimum Value:</b> -16384.0 1232 * <li> <b>Maximum Value:</b> 16383.999755859375 1233 * <li> <b>Default Value:</b> 0 1234 * <li> <b>Units:</b> rotations 1235 * </ul> 1236 * 1237 * Default Rates: 1238 * <ul> 1239 * <li> <b>CAN 2.0:</b> 4.0 Hz 1240 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1241 * </ul> 1242 * <p> 1243 * This refreshes and returns a cached StatusSignal object. 1244 * 1245 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1246 * @return RotorPosition Status Signal Object 1247 */ 1248 @Override 1249 public StatusSignal<Angle> getRotorPosition(boolean refresh) 1250 { 1251 @SuppressWarnings("unchecked") 1252 var retval = super.lookupStatusSignal(SpnValue.PRO_RotorPosAndVel_Position.value, Angle.class, val -> Rotations.of(val), "RotorPosition", true, refresh); 1253 return retval; 1254 } 1255 1256 /** 1257 * Velocity of the device in mechanism rotations per second. This can 1258 * be the velocity of a remote sensor and is affected by the 1259 * RotorToSensorRatio and SensorToMechanismRatio configs. 1260 * 1261 * <ul> 1262 * <li> <b>Minimum Value:</b> -512.0 1263 * <li> <b>Maximum Value:</b> 511.998046875 1264 * <li> <b>Default Value:</b> 0 1265 * <li> <b>Units:</b> rotations per second 1266 * </ul> 1267 * 1268 * Default Rates: 1269 * <ul> 1270 * <li> <b>CAN 2.0:</b> 50.0 Hz 1271 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1272 * </ul> 1273 * <p> 1274 * This refreshes and returns a cached StatusSignal object. 1275 * 1276 * @return Velocity Status Signal Object 1277 */ 1278 @Override 1279 public StatusSignal<AngularVelocity> getVelocity() 1280 { 1281 return getVelocity(true); 1282 } 1283 1284 /** 1285 * Velocity of the device in mechanism rotations per second. This can 1286 * be the velocity of a remote sensor and is affected by the 1287 * RotorToSensorRatio and SensorToMechanismRatio configs. 1288 * 1289 * <ul> 1290 * <li> <b>Minimum Value:</b> -512.0 1291 * <li> <b>Maximum Value:</b> 511.998046875 1292 * <li> <b>Default Value:</b> 0 1293 * <li> <b>Units:</b> rotations per second 1294 * </ul> 1295 * 1296 * Default Rates: 1297 * <ul> 1298 * <li> <b>CAN 2.0:</b> 50.0 Hz 1299 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1300 * </ul> 1301 * <p> 1302 * This refreshes and returns a cached StatusSignal object. 1303 * 1304 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1305 * @return Velocity Status Signal Object 1306 */ 1307 @Override 1308 public StatusSignal<AngularVelocity> getVelocity(boolean refresh) 1309 { 1310 @SuppressWarnings("unchecked") 1311 var retval = super.lookupStatusSignal(SpnValue.PRO_PosAndVel_Velocity.value, AngularVelocity.class, val -> RotationsPerSecond.of(val), "Velocity", true, refresh); 1312 return retval; 1313 } 1314 1315 /** 1316 * Position of the device in mechanism rotations. This can be the 1317 * position of a remote sensor and is affected by the 1318 * RotorToSensorRatio and SensorToMechanismRatio configs, as well as 1319 * calls to setPosition. 1320 * 1321 * <ul> 1322 * <li> <b>Minimum Value:</b> -16384.0 1323 * <li> <b>Maximum Value:</b> 16383.999755859375 1324 * <li> <b>Default Value:</b> 0 1325 * <li> <b>Units:</b> rotations 1326 * </ul> 1327 * 1328 * Default Rates: 1329 * <ul> 1330 * <li> <b>CAN 2.0:</b> 50.0 Hz 1331 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1332 * </ul> 1333 * <p> 1334 * This refreshes and returns a cached StatusSignal object. 1335 * 1336 * @return Position Status Signal Object 1337 */ 1338 @Override 1339 public StatusSignal<Angle> getPosition() 1340 { 1341 return getPosition(true); 1342 } 1343 1344 /** 1345 * Position of the device in mechanism rotations. This can be the 1346 * position of a remote sensor and is affected by the 1347 * RotorToSensorRatio and SensorToMechanismRatio configs, as well as 1348 * calls to setPosition. 1349 * 1350 * <ul> 1351 * <li> <b>Minimum Value:</b> -16384.0 1352 * <li> <b>Maximum Value:</b> 16383.999755859375 1353 * <li> <b>Default Value:</b> 0 1354 * <li> <b>Units:</b> rotations 1355 * </ul> 1356 * 1357 * Default Rates: 1358 * <ul> 1359 * <li> <b>CAN 2.0:</b> 50.0 Hz 1360 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1361 * </ul> 1362 * <p> 1363 * This refreshes and returns a cached StatusSignal object. 1364 * 1365 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1366 * @return Position Status Signal Object 1367 */ 1368 @Override 1369 public StatusSignal<Angle> getPosition(boolean refresh) 1370 { 1371 @SuppressWarnings("unchecked") 1372 var retval = super.lookupStatusSignal(SpnValue.PRO_PosAndVel_Position.value, Angle.class, val -> Rotations.of(val), "Position", true, refresh); 1373 return retval; 1374 } 1375 1376 /** 1377 * Acceleration of the device in mechanism rotations per second². This 1378 * can be the acceleration of a remote sensor and is affected by the 1379 * RotorToSensorRatio and SensorToMechanismRatio configs. 1380 * 1381 * <ul> 1382 * <li> <b>Minimum Value:</b> -2048.0 1383 * <li> <b>Maximum Value:</b> 2047.75 1384 * <li> <b>Default Value:</b> 0 1385 * <li> <b>Units:</b> rotations per second² 1386 * </ul> 1387 * 1388 * Default Rates: 1389 * <ul> 1390 * <li> <b>CAN 2.0:</b> 50.0 Hz 1391 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1392 * </ul> 1393 * <p> 1394 * This refreshes and returns a cached StatusSignal object. 1395 * 1396 * @return Acceleration Status Signal Object 1397 */ 1398 @Override 1399 public StatusSignal<AngularAcceleration> getAcceleration() 1400 { 1401 return getAcceleration(true); 1402 } 1403 1404 /** 1405 * Acceleration of the device in mechanism rotations per second². This 1406 * can be the acceleration of a remote sensor and is affected by the 1407 * RotorToSensorRatio and SensorToMechanismRatio configs. 1408 * 1409 * <ul> 1410 * <li> <b>Minimum Value:</b> -2048.0 1411 * <li> <b>Maximum Value:</b> 2047.75 1412 * <li> <b>Default Value:</b> 0 1413 * <li> <b>Units:</b> rotations per second² 1414 * </ul> 1415 * 1416 * Default Rates: 1417 * <ul> 1418 * <li> <b>CAN 2.0:</b> 50.0 Hz 1419 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1420 * </ul> 1421 * <p> 1422 * This refreshes and returns a cached StatusSignal object. 1423 * 1424 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1425 * @return Acceleration Status Signal Object 1426 */ 1427 @Override 1428 public StatusSignal<AngularAcceleration> getAcceleration(boolean refresh) 1429 { 1430 @SuppressWarnings("unchecked") 1431 var retval = super.lookupStatusSignal(SpnValue.PRO_PosAndVel_Acceleration.value, AngularAcceleration.class, val -> RotationsPerSecondPerSecond.of(val), "Acceleration", true, refresh); 1432 return retval; 1433 } 1434 1435 /** 1436 * The active control mode of the motor controller. 1437 * 1438 * 1439 * Default Rates: 1440 * <ul> 1441 * <li> <b>CAN 2.0:</b> 4.0 Hz 1442 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1443 * </ul> 1444 * <p> 1445 * This refreshes and returns a cached StatusSignal object. 1446 * 1447 * @return ControlMode Status Signal Object 1448 */ 1449 @Override 1450 public StatusSignal<ControlModeValue> getControlMode() 1451 { 1452 return getControlMode(true); 1453 } 1454 1455 /** 1456 * The active control mode of the motor controller. 1457 * 1458 * 1459 * Default Rates: 1460 * <ul> 1461 * <li> <b>CAN 2.0:</b> 4.0 Hz 1462 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1463 * </ul> 1464 * <p> 1465 * This refreshes and returns a cached StatusSignal object. 1466 * 1467 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1468 * @return ControlMode Status Signal Object 1469 */ 1470 @Override 1471 public StatusSignal<ControlModeValue> getControlMode(boolean refresh) 1472 { 1473 @SuppressWarnings("unchecked") 1474 var retval = super.lookupStatusSignal(SpnValue.TalonFX_ControlMode.value, ControlModeValue.class, val -> ControlModeValue.valueOf((int)val), "ControlMode", true, refresh); 1475 return retval; 1476 } 1477 1478 /** 1479 * Check if Motion Magic® is running. This is equivalent to checking 1480 * that the reported control mode is a Motion Magic® based mode. 1481 * 1482 * 1483 * Default Rates: 1484 * <ul> 1485 * <li> <b>CAN 2.0:</b> 4.0 Hz 1486 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1487 * </ul> 1488 * <p> 1489 * This refreshes and returns a cached StatusSignal object. 1490 * 1491 * @return MotionMagicIsRunning Status Signal Object 1492 */ 1493 @Override 1494 public StatusSignal<MotionMagicIsRunningValue> getMotionMagicIsRunning() 1495 { 1496 return getMotionMagicIsRunning(true); 1497 } 1498 1499 /** 1500 * Check if Motion Magic® is running. This is equivalent to checking 1501 * that the reported control mode is a Motion Magic® based mode. 1502 * 1503 * 1504 * Default Rates: 1505 * <ul> 1506 * <li> <b>CAN 2.0:</b> 4.0 Hz 1507 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1508 * </ul> 1509 * <p> 1510 * This refreshes and returns a cached StatusSignal object. 1511 * 1512 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1513 * @return MotionMagicIsRunning Status Signal Object 1514 */ 1515 @Override 1516 public StatusSignal<MotionMagicIsRunningValue> getMotionMagicIsRunning(boolean refresh) 1517 { 1518 @SuppressWarnings("unchecked") 1519 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDStateEnables_IsMotionMagicRunning.value, MotionMagicIsRunningValue.class, val -> MotionMagicIsRunningValue.valueOf((int)val), "MotionMagicIsRunning", true, refresh); 1520 return retval; 1521 } 1522 1523 /** 1524 * Indicates if the robot is enabled. 1525 * 1526 * 1527 * Default Rates: 1528 * <ul> 1529 * <li> <b>CAN 2.0:</b> 4.0 Hz 1530 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1531 * </ul> 1532 * <p> 1533 * This refreshes and returns a cached StatusSignal object. 1534 * 1535 * @return RobotEnable Status Signal Object 1536 */ 1537 @Override 1538 public StatusSignal<RobotEnableValue> getRobotEnable() 1539 { 1540 return getRobotEnable(true); 1541 } 1542 1543 /** 1544 * Indicates if the robot is enabled. 1545 * 1546 * 1547 * Default Rates: 1548 * <ul> 1549 * <li> <b>CAN 2.0:</b> 4.0 Hz 1550 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1551 * </ul> 1552 * <p> 1553 * This refreshes and returns a cached StatusSignal object. 1554 * 1555 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1556 * @return RobotEnable Status Signal Object 1557 */ 1558 @Override 1559 public StatusSignal<RobotEnableValue> getRobotEnable(boolean refresh) 1560 { 1561 @SuppressWarnings("unchecked") 1562 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDStateEnables_RobotEnable.value, RobotEnableValue.class, val -> RobotEnableValue.valueOf((int)val), "RobotEnable", true, refresh); 1563 return retval; 1564 } 1565 1566 /** 1567 * Indicates if device is actuator enabled. 1568 * 1569 * 1570 * Default Rates: 1571 * <ul> 1572 * <li> <b>CAN 2.0:</b> 4.0 Hz 1573 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1574 * </ul> 1575 * <p> 1576 * This refreshes and returns a cached StatusSignal object. 1577 * 1578 * @return DeviceEnable Status Signal Object 1579 */ 1580 @Override 1581 public StatusSignal<DeviceEnableValue> getDeviceEnable() 1582 { 1583 return getDeviceEnable(true); 1584 } 1585 1586 /** 1587 * Indicates if device is actuator enabled. 1588 * 1589 * 1590 * Default Rates: 1591 * <ul> 1592 * <li> <b>CAN 2.0:</b> 4.0 Hz 1593 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1594 * </ul> 1595 * <p> 1596 * This refreshes and returns a cached StatusSignal object. 1597 * 1598 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1599 * @return DeviceEnable Status Signal Object 1600 */ 1601 @Override 1602 public StatusSignal<DeviceEnableValue> getDeviceEnable(boolean refresh) 1603 { 1604 @SuppressWarnings("unchecked") 1605 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDStateEnables_DeviceEnable.value, DeviceEnableValue.class, val -> DeviceEnableValue.valueOf((int)val), "DeviceEnable", true, refresh); 1606 return retval; 1607 } 1608 1609 /** 1610 * The slot that the closed-loop PID is using. 1611 * 1612 * <ul> 1613 * <li> <b>Minimum Value:</b> 0 1614 * <li> <b>Maximum Value:</b> 2 1615 * <li> <b>Default Value:</b> 0 1616 * <li> <b>Units:</b> 1617 * </ul> 1618 * 1619 * Default Rates: 1620 * <ul> 1621 * <li> <b>CAN 2.0:</b> 4.0 Hz 1622 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1623 * </ul> 1624 * <p> 1625 * This refreshes and returns a cached StatusSignal object. 1626 * 1627 * @return ClosedLoopSlot Status Signal Object 1628 */ 1629 @Override 1630 public StatusSignal<Integer> getClosedLoopSlot() 1631 { 1632 return getClosedLoopSlot(true); 1633 } 1634 1635 /** 1636 * The slot that the closed-loop PID is using. 1637 * 1638 * <ul> 1639 * <li> <b>Minimum Value:</b> 0 1640 * <li> <b>Maximum Value:</b> 2 1641 * <li> <b>Default Value:</b> 0 1642 * <li> <b>Units:</b> 1643 * </ul> 1644 * 1645 * Default Rates: 1646 * <ul> 1647 * <li> <b>CAN 2.0:</b> 4.0 Hz 1648 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1649 * </ul> 1650 * <p> 1651 * This refreshes and returns a cached StatusSignal object. 1652 * 1653 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1654 * @return ClosedLoopSlot Status Signal Object 1655 */ 1656 @Override 1657 public StatusSignal<Integer> getClosedLoopSlot(boolean refresh) 1658 { 1659 @SuppressWarnings("unchecked") 1660 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDOutput_Slot.value, Integer.class, val -> (int)val, "ClosedLoopSlot", true, refresh); 1661 return retval; 1662 } 1663 1664 /** 1665 * Assess the status of the motor output with respect to load and 1666 * supply. 1667 * <p> 1668 * This routine can be used to determine the general status of motor 1669 * commutation. 1670 * 1671 * 1672 * Default Rates: 1673 * <ul> 1674 * <li> <b>CAN 2.0:</b> 4.0 Hz 1675 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1676 * </ul> 1677 * <p> 1678 * This refreshes and returns a cached StatusSignal object. 1679 * 1680 * @return MotorOutputStatus Status Signal Object 1681 */ 1682 @Override 1683 public StatusSignal<MotorOutputStatusValue> getMotorOutputStatus() 1684 { 1685 return getMotorOutputStatus(true); 1686 } 1687 1688 /** 1689 * Assess the status of the motor output with respect to load and 1690 * supply. 1691 * <p> 1692 * This routine can be used to determine the general status of motor 1693 * commutation. 1694 * 1695 * 1696 * Default Rates: 1697 * <ul> 1698 * <li> <b>CAN 2.0:</b> 4.0 Hz 1699 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1700 * </ul> 1701 * <p> 1702 * This refreshes and returns a cached StatusSignal object. 1703 * 1704 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1705 * @return MotorOutputStatus Status Signal Object 1706 */ 1707 @Override 1708 public StatusSignal<MotorOutputStatusValue> getMotorOutputStatus(boolean refresh) 1709 { 1710 @SuppressWarnings("unchecked") 1711 var retval = super.lookupStatusSignal(SpnValue.TalonFX_MotorOutputStatus.value, MotorOutputStatusValue.class, val -> MotorOutputStatusValue.valueOf((int)val), "MotorOutputStatus", true, refresh); 1712 return retval; 1713 } 1714 1715 /** 1716 * The active control mode of the differential controller. 1717 * 1718 * 1719 * Default Rates: 1720 * <ul> 1721 * <li> <b>CAN 2.0:</b> 100.0 Hz 1722 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1723 * </ul> 1724 * <p> 1725 * This refreshes and returns a cached StatusSignal object. 1726 * 1727 * @return DifferentialControlMode Status Signal Object 1728 */ 1729 @Override 1730 public StatusSignal<DifferentialControlModeValue> getDifferentialControlMode() 1731 { 1732 return getDifferentialControlMode(true); 1733 } 1734 1735 /** 1736 * The active control mode of the differential controller. 1737 * 1738 * 1739 * Default Rates: 1740 * <ul> 1741 * <li> <b>CAN 2.0:</b> 100.0 Hz 1742 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1743 * </ul> 1744 * <p> 1745 * This refreshes and returns a cached StatusSignal object. 1746 * 1747 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1748 * @return DifferentialControlMode Status Signal Object 1749 */ 1750 @Override 1751 public StatusSignal<DifferentialControlModeValue> getDifferentialControlMode(boolean refresh) 1752 { 1753 @SuppressWarnings("unchecked") 1754 var retval = super.lookupStatusSignal(SpnValue.TalonFX_DifferentialControlMode.value, DifferentialControlModeValue.class, val -> DifferentialControlModeValue.valueOf((int)val), "DifferentialControlMode", true, refresh); 1755 return retval; 1756 } 1757 1758 /** 1759 * Average component of the differential velocity of device. 1760 * 1761 * <ul> 1762 * <li> <b>Minimum Value:</b> -512.0 1763 * <li> <b>Maximum Value:</b> 511.998046875 1764 * <li> <b>Default Value:</b> 0 1765 * <li> <b>Units:</b> rotations per second 1766 * </ul> 1767 * 1768 * Default Rates: 1769 * <ul> 1770 * <li> <b>CAN 2.0:</b> 4.0 Hz 1771 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1772 * </ul> 1773 * <p> 1774 * This refreshes and returns a cached StatusSignal object. 1775 * 1776 * @return DifferentialAverageVelocity Status Signal Object 1777 */ 1778 @Override 1779 public StatusSignal<AngularVelocity> getDifferentialAverageVelocity() 1780 { 1781 return getDifferentialAverageVelocity(true); 1782 } 1783 1784 /** 1785 * Average component of the differential velocity of device. 1786 * 1787 * <ul> 1788 * <li> <b>Minimum Value:</b> -512.0 1789 * <li> <b>Maximum Value:</b> 511.998046875 1790 * <li> <b>Default Value:</b> 0 1791 * <li> <b>Units:</b> rotations per second 1792 * </ul> 1793 * 1794 * Default Rates: 1795 * <ul> 1796 * <li> <b>CAN 2.0:</b> 4.0 Hz 1797 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1798 * </ul> 1799 * <p> 1800 * This refreshes and returns a cached StatusSignal object. 1801 * 1802 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1803 * @return DifferentialAverageVelocity Status Signal Object 1804 */ 1805 @Override 1806 public StatusSignal<AngularVelocity> getDifferentialAverageVelocity(boolean refresh) 1807 { 1808 @SuppressWarnings("unchecked") 1809 var retval = super.lookupStatusSignal(SpnValue.PRO_AvgPosAndVel_Velocity.value, AngularVelocity.class, val -> RotationsPerSecond.of(val), "DifferentialAverageVelocity", true, refresh); 1810 return retval; 1811 } 1812 1813 /** 1814 * Average component of the differential position of device. 1815 * 1816 * <ul> 1817 * <li> <b>Minimum Value:</b> -16384.0 1818 * <li> <b>Maximum Value:</b> 16383.999755859375 1819 * <li> <b>Default Value:</b> 0 1820 * <li> <b>Units:</b> rotations 1821 * </ul> 1822 * 1823 * Default Rates: 1824 * <ul> 1825 * <li> <b>CAN 2.0:</b> 4.0 Hz 1826 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1827 * </ul> 1828 * <p> 1829 * This refreshes and returns a cached StatusSignal object. 1830 * 1831 * @return DifferentialAveragePosition Status Signal Object 1832 */ 1833 @Override 1834 public StatusSignal<Angle> getDifferentialAveragePosition() 1835 { 1836 return getDifferentialAveragePosition(true); 1837 } 1838 1839 /** 1840 * Average component of the differential position of device. 1841 * 1842 * <ul> 1843 * <li> <b>Minimum Value:</b> -16384.0 1844 * <li> <b>Maximum Value:</b> 16383.999755859375 1845 * <li> <b>Default Value:</b> 0 1846 * <li> <b>Units:</b> rotations 1847 * </ul> 1848 * 1849 * Default Rates: 1850 * <ul> 1851 * <li> <b>CAN 2.0:</b> 4.0 Hz 1852 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1853 * </ul> 1854 * <p> 1855 * This refreshes and returns a cached StatusSignal object. 1856 * 1857 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1858 * @return DifferentialAveragePosition Status Signal Object 1859 */ 1860 @Override 1861 public StatusSignal<Angle> getDifferentialAveragePosition(boolean refresh) 1862 { 1863 @SuppressWarnings("unchecked") 1864 var retval = super.lookupStatusSignal(SpnValue.PRO_AvgPosAndVel_Position.value, Angle.class, val -> Rotations.of(val), "DifferentialAveragePosition", true, refresh); 1865 return retval; 1866 } 1867 1868 /** 1869 * Difference component of the differential velocity of device. 1870 * 1871 * <ul> 1872 * <li> <b>Minimum Value:</b> -512.0 1873 * <li> <b>Maximum Value:</b> 511.998046875 1874 * <li> <b>Default Value:</b> 0 1875 * <li> <b>Units:</b> rotations per second 1876 * </ul> 1877 * 1878 * Default Rates: 1879 * <ul> 1880 * <li> <b>CAN 2.0:</b> 4.0 Hz 1881 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1882 * </ul> 1883 * <p> 1884 * This refreshes and returns a cached StatusSignal object. 1885 * 1886 * @return DifferentialDifferenceVelocity Status Signal Object 1887 */ 1888 @Override 1889 public StatusSignal<AngularVelocity> getDifferentialDifferenceVelocity() 1890 { 1891 return getDifferentialDifferenceVelocity(true); 1892 } 1893 1894 /** 1895 * Difference component of the differential velocity of device. 1896 * 1897 * <ul> 1898 * <li> <b>Minimum Value:</b> -512.0 1899 * <li> <b>Maximum Value:</b> 511.998046875 1900 * <li> <b>Default Value:</b> 0 1901 * <li> <b>Units:</b> rotations per second 1902 * </ul> 1903 * 1904 * Default Rates: 1905 * <ul> 1906 * <li> <b>CAN 2.0:</b> 4.0 Hz 1907 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1908 * </ul> 1909 * <p> 1910 * This refreshes and returns a cached StatusSignal object. 1911 * 1912 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1913 * @return DifferentialDifferenceVelocity Status Signal Object 1914 */ 1915 @Override 1916 public StatusSignal<AngularVelocity> getDifferentialDifferenceVelocity(boolean refresh) 1917 { 1918 @SuppressWarnings("unchecked") 1919 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPosAndVel_Velocity.value, AngularVelocity.class, val -> RotationsPerSecond.of(val), "DifferentialDifferenceVelocity", true, refresh); 1920 return retval; 1921 } 1922 1923 /** 1924 * Difference component of the differential position of device. 1925 * 1926 * <ul> 1927 * <li> <b>Minimum Value:</b> -16384.0 1928 * <li> <b>Maximum Value:</b> 16383.999755859375 1929 * <li> <b>Default Value:</b> 0 1930 * <li> <b>Units:</b> rotations 1931 * </ul> 1932 * 1933 * Default Rates: 1934 * <ul> 1935 * <li> <b>CAN 2.0:</b> 4.0 Hz 1936 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1937 * </ul> 1938 * <p> 1939 * This refreshes and returns a cached StatusSignal object. 1940 * 1941 * @return DifferentialDifferencePosition Status Signal Object 1942 */ 1943 @Override 1944 public StatusSignal<Angle> getDifferentialDifferencePosition() 1945 { 1946 return getDifferentialDifferencePosition(true); 1947 } 1948 1949 /** 1950 * Difference component of the differential position of device. 1951 * 1952 * <ul> 1953 * <li> <b>Minimum Value:</b> -16384.0 1954 * <li> <b>Maximum Value:</b> 16383.999755859375 1955 * <li> <b>Default Value:</b> 0 1956 * <li> <b>Units:</b> rotations 1957 * </ul> 1958 * 1959 * Default Rates: 1960 * <ul> 1961 * <li> <b>CAN 2.0:</b> 4.0 Hz 1962 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1963 * </ul> 1964 * <p> 1965 * This refreshes and returns a cached StatusSignal object. 1966 * 1967 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 1968 * @return DifferentialDifferencePosition Status Signal Object 1969 */ 1970 @Override 1971 public StatusSignal<Angle> getDifferentialDifferencePosition(boolean refresh) 1972 { 1973 @SuppressWarnings("unchecked") 1974 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPosAndVel_Position.value, Angle.class, val -> Rotations.of(val), "DifferentialDifferencePosition", true, refresh); 1975 return retval; 1976 } 1977 1978 /** 1979 * The slot that the closed-loop differential PID is using. 1980 * 1981 * <ul> 1982 * <li> <b>Minimum Value:</b> 0 1983 * <li> <b>Maximum Value:</b> 2 1984 * <li> <b>Default Value:</b> 0 1985 * <li> <b>Units:</b> 1986 * </ul> 1987 * 1988 * Default Rates: 1989 * <ul> 1990 * <li> <b>CAN 2.0:</b> 4.0 Hz 1991 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 1992 * </ul> 1993 * <p> 1994 * This refreshes and returns a cached StatusSignal object. 1995 * 1996 * @return DifferentialClosedLoopSlot Status Signal Object 1997 */ 1998 @Override 1999 public StatusSignal<Integer> getDifferentialClosedLoopSlot() 2000 { 2001 return getDifferentialClosedLoopSlot(true); 2002 } 2003 2004 /** 2005 * The slot that the closed-loop differential PID is using. 2006 * 2007 * <ul> 2008 * <li> <b>Minimum Value:</b> 0 2009 * <li> <b>Maximum Value:</b> 2 2010 * <li> <b>Default Value:</b> 0 2011 * <li> <b>Units:</b> 2012 * </ul> 2013 * 2014 * Default Rates: 2015 * <ul> 2016 * <li> <b>CAN 2.0:</b> 4.0 Hz 2017 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 2018 * </ul> 2019 * <p> 2020 * This refreshes and returns a cached StatusSignal object. 2021 * 2022 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2023 * @return DifferentialClosedLoopSlot Status Signal Object 2024 */ 2025 @Override 2026 public StatusSignal<Integer> getDifferentialClosedLoopSlot(boolean refresh) 2027 { 2028 @SuppressWarnings("unchecked") 2029 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPIDOutput_Slot.value, Integer.class, val -> (int)val, "DifferentialClosedLoopSlot", true, refresh); 2030 return retval; 2031 } 2032 2033 /** 2034 * The torque constant (K_T) of the motor. 2035 * 2036 * <ul> 2037 * <li> <b>Minimum Value:</b> 0.0 2038 * <li> <b>Maximum Value:</b> 0.025500000000000002 2039 * <li> <b>Default Value:</b> 0 2040 * <li> <b>Units:</b> Nm/A 2041 * </ul> 2042 * 2043 * Default Rates: 2044 * <ul> 2045 * <li> <b>CAN:</b> 4.0 Hz 2046 * </ul> 2047 * <p> 2048 * This refreshes and returns a cached StatusSignal object. 2049 * 2050 * @return MotorKT Status Signal Object 2051 */ 2052 @Override 2053 public StatusSignal<Per<TorqueUnit, CurrentUnit>> getMotorKT() 2054 { 2055 return getMotorKT(true); 2056 } 2057 2058 /** 2059 * The torque constant (K_T) of the motor. 2060 * 2061 * <ul> 2062 * <li> <b>Minimum Value:</b> 0.0 2063 * <li> <b>Maximum Value:</b> 0.025500000000000002 2064 * <li> <b>Default Value:</b> 0 2065 * <li> <b>Units:</b> Nm/A 2066 * </ul> 2067 * 2068 * Default Rates: 2069 * <ul> 2070 * <li> <b>CAN:</b> 4.0 Hz 2071 * </ul> 2072 * <p> 2073 * This refreshes and returns a cached StatusSignal object. 2074 * 2075 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2076 * @return MotorKT Status Signal Object 2077 */ 2078 @Override 2079 public StatusSignal<Per<TorqueUnit, CurrentUnit>> getMotorKT(boolean refresh) 2080 { 2081 @SuppressWarnings("unchecked") 2082 var retval = super.lookupStatusSignal(SpnValue.TalonFX_MotorConstants_kT.value, (Class<Per<TorqueUnit, CurrentUnit>>)(Class<?>)Per.class, val -> NewtonMeters.per(Amp).ofNative(val), "MotorKT", true, refresh); 2083 return retval; 2084 } 2085 2086 /** 2087 * The velocity constant (K_V) of the motor. 2088 * 2089 * <ul> 2090 * <li> <b>Minimum Value:</b> 0.0 2091 * <li> <b>Maximum Value:</b> 2047.0 2092 * <li> <b>Default Value:</b> 0 2093 * <li> <b>Units:</b> RPM/V 2094 * </ul> 2095 * 2096 * Default Rates: 2097 * <ul> 2098 * <li> <b>CAN:</b> 4.0 Hz 2099 * </ul> 2100 * <p> 2101 * This refreshes and returns a cached StatusSignal object. 2102 * 2103 * @return MotorKV Status Signal Object 2104 */ 2105 @Override 2106 public StatusSignal<Per<AngularVelocityUnit, VoltageUnit>> getMotorKV() 2107 { 2108 return getMotorKV(true); 2109 } 2110 2111 /** 2112 * The velocity constant (K_V) of the motor. 2113 * 2114 * <ul> 2115 * <li> <b>Minimum Value:</b> 0.0 2116 * <li> <b>Maximum Value:</b> 2047.0 2117 * <li> <b>Default Value:</b> 0 2118 * <li> <b>Units:</b> RPM/V 2119 * </ul> 2120 * 2121 * Default Rates: 2122 * <ul> 2123 * <li> <b>CAN:</b> 4.0 Hz 2124 * </ul> 2125 * <p> 2126 * This refreshes and returns a cached StatusSignal object. 2127 * 2128 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2129 * @return MotorKV Status Signal Object 2130 */ 2131 @Override 2132 public StatusSignal<Per<AngularVelocityUnit, VoltageUnit>> getMotorKV(boolean refresh) 2133 { 2134 @SuppressWarnings("unchecked") 2135 var retval = super.lookupStatusSignal(SpnValue.TalonFX_MotorConstants_kV.value, (Class<Per<AngularVelocityUnit, VoltageUnit>>)(Class<?>)Per.class, val -> RPM.per(Volt).ofNative(val), "MotorKV", true, refresh); 2136 return retval; 2137 } 2138 2139 /** 2140 * The stall current of the motor at 12 V output. 2141 * 2142 * <ul> 2143 * <li> <b>Minimum Value:</b> 0.0 2144 * <li> <b>Maximum Value:</b> 1023.0 2145 * <li> <b>Default Value:</b> 0 2146 * <li> <b>Units:</b> A 2147 * </ul> 2148 * 2149 * Default Rates: 2150 * <ul> 2151 * <li> <b>CAN:</b> 4.0 Hz 2152 * </ul> 2153 * <p> 2154 * This refreshes and returns a cached StatusSignal object. 2155 * 2156 * @return MotorStallCurrent Status Signal Object 2157 */ 2158 @Override 2159 public StatusSignal<Current> getMotorStallCurrent() 2160 { 2161 return getMotorStallCurrent(true); 2162 } 2163 2164 /** 2165 * The stall current of the motor at 12 V output. 2166 * 2167 * <ul> 2168 * <li> <b>Minimum Value:</b> 0.0 2169 * <li> <b>Maximum Value:</b> 1023.0 2170 * <li> <b>Default Value:</b> 0 2171 * <li> <b>Units:</b> A 2172 * </ul> 2173 * 2174 * Default Rates: 2175 * <ul> 2176 * <li> <b>CAN:</b> 4.0 Hz 2177 * </ul> 2178 * <p> 2179 * This refreshes and returns a cached StatusSignal object. 2180 * 2181 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2182 * @return MotorStallCurrent Status Signal Object 2183 */ 2184 @Override 2185 public StatusSignal<Current> getMotorStallCurrent(boolean refresh) 2186 { 2187 @SuppressWarnings("unchecked") 2188 var retval = super.lookupStatusSignal(SpnValue.TalonFX_MotorConstants_StallCurrent.value, Current.class, val -> Amps.of(val), "MotorStallCurrent", true, refresh); 2189 return retval; 2190 } 2191 2192 /** 2193 * The applied output of the bridge. 2194 * 2195 * 2196 * Default Rates: 2197 * <ul> 2198 * <li> <b>CAN 2.0:</b> 100.0 Hz 2199 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 2200 * </ul> 2201 * <p> 2202 * This refreshes and returns a cached StatusSignal object. 2203 * 2204 * @return BridgeOutput Status Signal Object 2205 */ 2206 @Override 2207 public StatusSignal<BridgeOutputValue> getBridgeOutput() 2208 { 2209 return getBridgeOutput(true); 2210 } 2211 2212 /** 2213 * The applied output of the bridge. 2214 * 2215 * 2216 * Default Rates: 2217 * <ul> 2218 * <li> <b>CAN 2.0:</b> 100.0 Hz 2219 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 2220 * </ul> 2221 * <p> 2222 * This refreshes and returns a cached StatusSignal object. 2223 * 2224 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2225 * @return BridgeOutput Status Signal Object 2226 */ 2227 @Override 2228 public StatusSignal<BridgeOutputValue> getBridgeOutput(boolean refresh) 2229 { 2230 @SuppressWarnings("unchecked") 2231 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_BridgeType_Public.value, BridgeOutputValue.class, val -> BridgeOutputValue.valueOf((int)val), "BridgeOutput", true, refresh); 2232 return retval; 2233 } 2234 2235 /** 2236 * Whether the device is Phoenix Pro licensed. 2237 * 2238 * <ul> 2239 * <li> <b>Default Value:</b> False 2240 * </ul> 2241 * 2242 * Default Rates: 2243 * <ul> 2244 * <li> <b>CAN:</b> 4.0 Hz 2245 * </ul> 2246 * <p> 2247 * This refreshes and returns a cached StatusSignal object. 2248 * 2249 * @return IsProLicensed Status Signal Object 2250 */ 2251 @Override 2252 public StatusSignal<Boolean> getIsProLicensed() 2253 { 2254 return getIsProLicensed(true); 2255 } 2256 2257 /** 2258 * Whether the device is Phoenix Pro licensed. 2259 * 2260 * <ul> 2261 * <li> <b>Default Value:</b> False 2262 * </ul> 2263 * 2264 * Default Rates: 2265 * <ul> 2266 * <li> <b>CAN:</b> 4.0 Hz 2267 * </ul> 2268 * <p> 2269 * This refreshes and returns a cached StatusSignal object. 2270 * 2271 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2272 * @return IsProLicensed Status Signal Object 2273 */ 2274 @Override 2275 public StatusSignal<Boolean> getIsProLicensed(boolean refresh) 2276 { 2277 @SuppressWarnings("unchecked") 2278 var retval = super.lookupStatusSignal(SpnValue.Version_IsProLicensed.value, Boolean.class, val -> val != 0, "IsProLicensed", true, refresh); 2279 return retval; 2280 } 2281 2282 /** 2283 * Temperature of device from second sensor. 2284 * <p> 2285 * Newer versions of Talon have multiple temperature measurement 2286 * methods. 2287 * 2288 * <ul> 2289 * <li> <b>Minimum Value:</b> 0.0 2290 * <li> <b>Maximum Value:</b> 255.0 2291 * <li> <b>Default Value:</b> 0 2292 * <li> <b>Units:</b> ℃ 2293 * </ul> 2294 * 2295 * Default Rates: 2296 * <ul> 2297 * <li> <b>CAN 2.0:</b> 4.0 Hz 2298 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 2299 * </ul> 2300 * <p> 2301 * This refreshes and returns a cached StatusSignal object. 2302 * 2303 * @return AncillaryDeviceTemp Status Signal Object 2304 */ 2305 @Override 2306 public StatusSignal<Temperature> getAncillaryDeviceTemp() 2307 { 2308 return getAncillaryDeviceTemp(true); 2309 } 2310 2311 /** 2312 * Temperature of device from second sensor. 2313 * <p> 2314 * Newer versions of Talon have multiple temperature measurement 2315 * methods. 2316 * 2317 * <ul> 2318 * <li> <b>Minimum Value:</b> 0.0 2319 * <li> <b>Maximum Value:</b> 255.0 2320 * <li> <b>Default Value:</b> 0 2321 * <li> <b>Units:</b> ℃ 2322 * </ul> 2323 * 2324 * Default Rates: 2325 * <ul> 2326 * <li> <b>CAN 2.0:</b> 4.0 Hz 2327 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 2328 * </ul> 2329 * <p> 2330 * This refreshes and returns a cached StatusSignal object. 2331 * 2332 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2333 * @return AncillaryDeviceTemp Status Signal Object 2334 */ 2335 @Override 2336 public StatusSignal<Temperature> getAncillaryDeviceTemp(boolean refresh) 2337 { 2338 @SuppressWarnings("unchecked") 2339 var retval = super.lookupStatusSignal(SpnValue.PRO_SupplyAndTemp_DeviceTemp2.value, Temperature.class, val -> Celsius.of(val), "AncillaryDeviceTemp", true, refresh); 2340 return retval; 2341 } 2342 2343 /** 2344 * The type of motor attached to the Talon. 2345 * <p> 2346 * This can be used to determine what motor is attached to the Talon 2347 * FX. Return will be "Unknown" if firmware is too old or device is 2348 * not present. 2349 * 2350 * 2351 * Default Rates: 2352 * <ul> 2353 * <li> <b>CAN 2.0:</b> 4.0 Hz 2354 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 2355 * </ul> 2356 * <p> 2357 * This refreshes and returns a cached StatusSignal object. 2358 * 2359 * @return ConnectedMotor Status Signal Object 2360 */ 2361 @Override 2362 public StatusSignal<ConnectedMotorValue> getConnectedMotor() 2363 { 2364 return getConnectedMotor(true); 2365 } 2366 2367 /** 2368 * The type of motor attached to the Talon. 2369 * <p> 2370 * This can be used to determine what motor is attached to the Talon 2371 * FX. Return will be "Unknown" if firmware is too old or device is 2372 * not present. 2373 * 2374 * 2375 * Default Rates: 2376 * <ul> 2377 * <li> <b>CAN 2.0:</b> 4.0 Hz 2378 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 2379 * </ul> 2380 * <p> 2381 * This refreshes and returns a cached StatusSignal object. 2382 * 2383 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2384 * @return ConnectedMotor Status Signal Object 2385 */ 2386 @Override 2387 public StatusSignal<ConnectedMotorValue> getConnectedMotor(boolean refresh) 2388 { 2389 @SuppressWarnings("unchecked") 2390 var retval = super.lookupStatusSignal(SpnValue.TalonFX_ConnectedMotor.value, ConnectedMotorValue.class, val -> ConnectedMotorValue.valueOf((int)val), "ConnectedMotor", true, refresh); 2391 return retval; 2392 } 2393 2394 /** 2395 * Hardware fault occurred 2396 * 2397 * <ul> 2398 * <li> <b>Default Value:</b> False 2399 * </ul> 2400 * 2401 * Default Rates: 2402 * <ul> 2403 * <li> <b>CAN:</b> 4.0 Hz 2404 * </ul> 2405 * <p> 2406 * This refreshes and returns a cached StatusSignal object. 2407 * 2408 * @return Fault_Hardware Status Signal Object 2409 */ 2410 @Override 2411 public StatusSignal<Boolean> getFault_Hardware() 2412 { 2413 return getFault_Hardware(true); 2414 } 2415 2416 /** 2417 * Hardware fault occurred 2418 * 2419 * <ul> 2420 * <li> <b>Default Value:</b> False 2421 * </ul> 2422 * 2423 * Default Rates: 2424 * <ul> 2425 * <li> <b>CAN:</b> 4.0 Hz 2426 * </ul> 2427 * <p> 2428 * This refreshes and returns a cached StatusSignal object. 2429 * 2430 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2431 * @return Fault_Hardware Status Signal Object 2432 */ 2433 @Override 2434 public StatusSignal<Boolean> getFault_Hardware(boolean refresh) 2435 { 2436 @SuppressWarnings("unchecked") 2437 var retval = super.lookupStatusSignal(SpnValue.Fault_Hardware.value, Boolean.class, val -> val != 0, "Fault_Hardware", true, refresh); 2438 return retval; 2439 } 2440 2441 /** 2442 * Hardware fault occurred 2443 * 2444 * <ul> 2445 * <li> <b>Default Value:</b> False 2446 * </ul> 2447 * 2448 * Default Rates: 2449 * <ul> 2450 * <li> <b>CAN:</b> 4.0 Hz 2451 * </ul> 2452 * <p> 2453 * This refreshes and returns a cached StatusSignal object. 2454 * 2455 * @return StickyFault_Hardware Status Signal Object 2456 */ 2457 @Override 2458 public StatusSignal<Boolean> getStickyFault_Hardware() 2459 { 2460 return getStickyFault_Hardware(true); 2461 } 2462 2463 /** 2464 * Hardware fault occurred 2465 * 2466 * <ul> 2467 * <li> <b>Default Value:</b> False 2468 * </ul> 2469 * 2470 * Default Rates: 2471 * <ul> 2472 * <li> <b>CAN:</b> 4.0 Hz 2473 * </ul> 2474 * <p> 2475 * This refreshes and returns a cached StatusSignal object. 2476 * 2477 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2478 * @return StickyFault_Hardware Status Signal Object 2479 */ 2480 @Override 2481 public StatusSignal<Boolean> getStickyFault_Hardware(boolean refresh) 2482 { 2483 @SuppressWarnings("unchecked") 2484 var retval = super.lookupStatusSignal(SpnValue.StickyFault_Hardware.value, Boolean.class, val -> val != 0, "StickyFault_Hardware", true, refresh); 2485 return retval; 2486 } 2487 2488 /** 2489 * Processor temperature exceeded limit 2490 * 2491 * <ul> 2492 * <li> <b>Default Value:</b> False 2493 * </ul> 2494 * 2495 * Default Rates: 2496 * <ul> 2497 * <li> <b>CAN:</b> 4.0 Hz 2498 * </ul> 2499 * <p> 2500 * This refreshes and returns a cached StatusSignal object. 2501 * 2502 * @return Fault_ProcTemp Status Signal Object 2503 */ 2504 @Override 2505 public StatusSignal<Boolean> getFault_ProcTemp() 2506 { 2507 return getFault_ProcTemp(true); 2508 } 2509 2510 /** 2511 * Processor temperature exceeded limit 2512 * 2513 * <ul> 2514 * <li> <b>Default Value:</b> False 2515 * </ul> 2516 * 2517 * Default Rates: 2518 * <ul> 2519 * <li> <b>CAN:</b> 4.0 Hz 2520 * </ul> 2521 * <p> 2522 * This refreshes and returns a cached StatusSignal object. 2523 * 2524 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2525 * @return Fault_ProcTemp Status Signal Object 2526 */ 2527 @Override 2528 public StatusSignal<Boolean> getFault_ProcTemp(boolean refresh) 2529 { 2530 @SuppressWarnings("unchecked") 2531 var retval = super.lookupStatusSignal(SpnValue.Fault_ProcTemp.value, Boolean.class, val -> val != 0, "Fault_ProcTemp", true, refresh); 2532 return retval; 2533 } 2534 2535 /** 2536 * Processor temperature exceeded limit 2537 * 2538 * <ul> 2539 * <li> <b>Default Value:</b> False 2540 * </ul> 2541 * 2542 * Default Rates: 2543 * <ul> 2544 * <li> <b>CAN:</b> 4.0 Hz 2545 * </ul> 2546 * <p> 2547 * This refreshes and returns a cached StatusSignal object. 2548 * 2549 * @return StickyFault_ProcTemp Status Signal Object 2550 */ 2551 @Override 2552 public StatusSignal<Boolean> getStickyFault_ProcTemp() 2553 { 2554 return getStickyFault_ProcTemp(true); 2555 } 2556 2557 /** 2558 * Processor temperature exceeded limit 2559 * 2560 * <ul> 2561 * <li> <b>Default Value:</b> False 2562 * </ul> 2563 * 2564 * Default Rates: 2565 * <ul> 2566 * <li> <b>CAN:</b> 4.0 Hz 2567 * </ul> 2568 * <p> 2569 * This refreshes and returns a cached StatusSignal object. 2570 * 2571 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2572 * @return StickyFault_ProcTemp Status Signal Object 2573 */ 2574 @Override 2575 public StatusSignal<Boolean> getStickyFault_ProcTemp(boolean refresh) 2576 { 2577 @SuppressWarnings("unchecked") 2578 var retval = super.lookupStatusSignal(SpnValue.StickyFault_ProcTemp.value, Boolean.class, val -> val != 0, "StickyFault_ProcTemp", true, refresh); 2579 return retval; 2580 } 2581 2582 /** 2583 * Device temperature exceeded limit 2584 * 2585 * <ul> 2586 * <li> <b>Default Value:</b> False 2587 * </ul> 2588 * 2589 * Default Rates: 2590 * <ul> 2591 * <li> <b>CAN:</b> 4.0 Hz 2592 * </ul> 2593 * <p> 2594 * This refreshes and returns a cached StatusSignal object. 2595 * 2596 * @return Fault_DeviceTemp Status Signal Object 2597 */ 2598 @Override 2599 public StatusSignal<Boolean> getFault_DeviceTemp() 2600 { 2601 return getFault_DeviceTemp(true); 2602 } 2603 2604 /** 2605 * Device temperature exceeded limit 2606 * 2607 * <ul> 2608 * <li> <b>Default Value:</b> False 2609 * </ul> 2610 * 2611 * Default Rates: 2612 * <ul> 2613 * <li> <b>CAN:</b> 4.0 Hz 2614 * </ul> 2615 * <p> 2616 * This refreshes and returns a cached StatusSignal object. 2617 * 2618 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2619 * @return Fault_DeviceTemp Status Signal Object 2620 */ 2621 @Override 2622 public StatusSignal<Boolean> getFault_DeviceTemp(boolean refresh) 2623 { 2624 @SuppressWarnings("unchecked") 2625 var retval = super.lookupStatusSignal(SpnValue.Fault_DeviceTemp.value, Boolean.class, val -> val != 0, "Fault_DeviceTemp", true, refresh); 2626 return retval; 2627 } 2628 2629 /** 2630 * Device temperature exceeded limit 2631 * 2632 * <ul> 2633 * <li> <b>Default Value:</b> False 2634 * </ul> 2635 * 2636 * Default Rates: 2637 * <ul> 2638 * <li> <b>CAN:</b> 4.0 Hz 2639 * </ul> 2640 * <p> 2641 * This refreshes and returns a cached StatusSignal object. 2642 * 2643 * @return StickyFault_DeviceTemp Status Signal Object 2644 */ 2645 @Override 2646 public StatusSignal<Boolean> getStickyFault_DeviceTemp() 2647 { 2648 return getStickyFault_DeviceTemp(true); 2649 } 2650 2651 /** 2652 * Device temperature exceeded limit 2653 * 2654 * <ul> 2655 * <li> <b>Default Value:</b> False 2656 * </ul> 2657 * 2658 * Default Rates: 2659 * <ul> 2660 * <li> <b>CAN:</b> 4.0 Hz 2661 * </ul> 2662 * <p> 2663 * This refreshes and returns a cached StatusSignal object. 2664 * 2665 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2666 * @return StickyFault_DeviceTemp Status Signal Object 2667 */ 2668 @Override 2669 public StatusSignal<Boolean> getStickyFault_DeviceTemp(boolean refresh) 2670 { 2671 @SuppressWarnings("unchecked") 2672 var retval = super.lookupStatusSignal(SpnValue.StickyFault_DeviceTemp.value, Boolean.class, val -> val != 0, "StickyFault_DeviceTemp", true, refresh); 2673 return retval; 2674 } 2675 2676 /** 2677 * Device supply voltage dropped to near brownout levels 2678 * 2679 * <ul> 2680 * <li> <b>Default Value:</b> False 2681 * </ul> 2682 * 2683 * Default Rates: 2684 * <ul> 2685 * <li> <b>CAN:</b> 4.0 Hz 2686 * </ul> 2687 * <p> 2688 * This refreshes and returns a cached StatusSignal object. 2689 * 2690 * @return Fault_Undervoltage Status Signal Object 2691 */ 2692 @Override 2693 public StatusSignal<Boolean> getFault_Undervoltage() 2694 { 2695 return getFault_Undervoltage(true); 2696 } 2697 2698 /** 2699 * Device supply voltage dropped to near brownout levels 2700 * 2701 * <ul> 2702 * <li> <b>Default Value:</b> False 2703 * </ul> 2704 * 2705 * Default Rates: 2706 * <ul> 2707 * <li> <b>CAN:</b> 4.0 Hz 2708 * </ul> 2709 * <p> 2710 * This refreshes and returns a cached StatusSignal object. 2711 * 2712 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2713 * @return Fault_Undervoltage Status Signal Object 2714 */ 2715 @Override 2716 public StatusSignal<Boolean> getFault_Undervoltage(boolean refresh) 2717 { 2718 @SuppressWarnings("unchecked") 2719 var retval = super.lookupStatusSignal(SpnValue.Fault_Undervoltage.value, Boolean.class, val -> val != 0, "Fault_Undervoltage", true, refresh); 2720 return retval; 2721 } 2722 2723 /** 2724 * Device supply voltage dropped to near brownout levels 2725 * 2726 * <ul> 2727 * <li> <b>Default Value:</b> False 2728 * </ul> 2729 * 2730 * Default Rates: 2731 * <ul> 2732 * <li> <b>CAN:</b> 4.0 Hz 2733 * </ul> 2734 * <p> 2735 * This refreshes and returns a cached StatusSignal object. 2736 * 2737 * @return StickyFault_Undervoltage Status Signal Object 2738 */ 2739 @Override 2740 public StatusSignal<Boolean> getStickyFault_Undervoltage() 2741 { 2742 return getStickyFault_Undervoltage(true); 2743 } 2744 2745 /** 2746 * Device supply voltage dropped to near brownout levels 2747 * 2748 * <ul> 2749 * <li> <b>Default Value:</b> False 2750 * </ul> 2751 * 2752 * Default Rates: 2753 * <ul> 2754 * <li> <b>CAN:</b> 4.0 Hz 2755 * </ul> 2756 * <p> 2757 * This refreshes and returns a cached StatusSignal object. 2758 * 2759 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2760 * @return StickyFault_Undervoltage Status Signal Object 2761 */ 2762 @Override 2763 public StatusSignal<Boolean> getStickyFault_Undervoltage(boolean refresh) 2764 { 2765 @SuppressWarnings("unchecked") 2766 var retval = super.lookupStatusSignal(SpnValue.StickyFault_Undervoltage.value, Boolean.class, val -> val != 0, "StickyFault_Undervoltage", true, refresh); 2767 return retval; 2768 } 2769 2770 /** 2771 * Device boot while detecting the enable signal 2772 * 2773 * <ul> 2774 * <li> <b>Default Value:</b> False 2775 * </ul> 2776 * 2777 * Default Rates: 2778 * <ul> 2779 * <li> <b>CAN:</b> 4.0 Hz 2780 * </ul> 2781 * <p> 2782 * This refreshes and returns a cached StatusSignal object. 2783 * 2784 * @return Fault_BootDuringEnable Status Signal Object 2785 */ 2786 @Override 2787 public StatusSignal<Boolean> getFault_BootDuringEnable() 2788 { 2789 return getFault_BootDuringEnable(true); 2790 } 2791 2792 /** 2793 * Device boot while detecting the enable signal 2794 * 2795 * <ul> 2796 * <li> <b>Default Value:</b> False 2797 * </ul> 2798 * 2799 * Default Rates: 2800 * <ul> 2801 * <li> <b>CAN:</b> 4.0 Hz 2802 * </ul> 2803 * <p> 2804 * This refreshes and returns a cached StatusSignal object. 2805 * 2806 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2807 * @return Fault_BootDuringEnable Status Signal Object 2808 */ 2809 @Override 2810 public StatusSignal<Boolean> getFault_BootDuringEnable(boolean refresh) 2811 { 2812 @SuppressWarnings("unchecked") 2813 var retval = super.lookupStatusSignal(SpnValue.Fault_BootDuringEnable.value, Boolean.class, val -> val != 0, "Fault_BootDuringEnable", true, refresh); 2814 return retval; 2815 } 2816 2817 /** 2818 * Device boot while detecting the enable signal 2819 * 2820 * <ul> 2821 * <li> <b>Default Value:</b> False 2822 * </ul> 2823 * 2824 * Default Rates: 2825 * <ul> 2826 * <li> <b>CAN:</b> 4.0 Hz 2827 * </ul> 2828 * <p> 2829 * This refreshes and returns a cached StatusSignal object. 2830 * 2831 * @return StickyFault_BootDuringEnable Status Signal Object 2832 */ 2833 @Override 2834 public StatusSignal<Boolean> getStickyFault_BootDuringEnable() 2835 { 2836 return getStickyFault_BootDuringEnable(true); 2837 } 2838 2839 /** 2840 * Device boot while detecting the enable signal 2841 * 2842 * <ul> 2843 * <li> <b>Default Value:</b> False 2844 * </ul> 2845 * 2846 * Default Rates: 2847 * <ul> 2848 * <li> <b>CAN:</b> 4.0 Hz 2849 * </ul> 2850 * <p> 2851 * This refreshes and returns a cached StatusSignal object. 2852 * 2853 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2854 * @return StickyFault_BootDuringEnable Status Signal Object 2855 */ 2856 @Override 2857 public StatusSignal<Boolean> getStickyFault_BootDuringEnable(boolean refresh) 2858 { 2859 @SuppressWarnings("unchecked") 2860 var retval = super.lookupStatusSignal(SpnValue.StickyFault_BootDuringEnable.value, Boolean.class, val -> val != 0, "StickyFault_BootDuringEnable", true, refresh); 2861 return retval; 2862 } 2863 2864 /** 2865 * An unlicensed feature is in use, device may not behave as expected. 2866 * 2867 * <ul> 2868 * <li> <b>Default Value:</b> False 2869 * </ul> 2870 * 2871 * Default Rates: 2872 * <ul> 2873 * <li> <b>CAN:</b> 4.0 Hz 2874 * </ul> 2875 * <p> 2876 * This refreshes and returns a cached StatusSignal object. 2877 * 2878 * @return Fault_UnlicensedFeatureInUse Status Signal Object 2879 */ 2880 @Override 2881 public StatusSignal<Boolean> getFault_UnlicensedFeatureInUse() 2882 { 2883 return getFault_UnlicensedFeatureInUse(true); 2884 } 2885 2886 /** 2887 * An unlicensed feature is in use, device may not behave as expected. 2888 * 2889 * <ul> 2890 * <li> <b>Default Value:</b> False 2891 * </ul> 2892 * 2893 * Default Rates: 2894 * <ul> 2895 * <li> <b>CAN:</b> 4.0 Hz 2896 * </ul> 2897 * <p> 2898 * This refreshes and returns a cached StatusSignal object. 2899 * 2900 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2901 * @return Fault_UnlicensedFeatureInUse Status Signal Object 2902 */ 2903 @Override 2904 public StatusSignal<Boolean> getFault_UnlicensedFeatureInUse(boolean refresh) 2905 { 2906 @SuppressWarnings("unchecked") 2907 var retval = super.lookupStatusSignal(SpnValue.Fault_UnlicensedFeatureInUse.value, Boolean.class, val -> val != 0, "Fault_UnlicensedFeatureInUse", true, refresh); 2908 return retval; 2909 } 2910 2911 /** 2912 * An unlicensed feature is in use, device may not behave as expected. 2913 * 2914 * <ul> 2915 * <li> <b>Default Value:</b> False 2916 * </ul> 2917 * 2918 * Default Rates: 2919 * <ul> 2920 * <li> <b>CAN:</b> 4.0 Hz 2921 * </ul> 2922 * <p> 2923 * This refreshes and returns a cached StatusSignal object. 2924 * 2925 * @return StickyFault_UnlicensedFeatureInUse Status Signal Object 2926 */ 2927 @Override 2928 public StatusSignal<Boolean> getStickyFault_UnlicensedFeatureInUse() 2929 { 2930 return getStickyFault_UnlicensedFeatureInUse(true); 2931 } 2932 2933 /** 2934 * An unlicensed feature is in use, device may not behave as expected. 2935 * 2936 * <ul> 2937 * <li> <b>Default Value:</b> False 2938 * </ul> 2939 * 2940 * Default Rates: 2941 * <ul> 2942 * <li> <b>CAN:</b> 4.0 Hz 2943 * </ul> 2944 * <p> 2945 * This refreshes and returns a cached StatusSignal object. 2946 * 2947 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2948 * @return StickyFault_UnlicensedFeatureInUse Status Signal Object 2949 */ 2950 @Override 2951 public StatusSignal<Boolean> getStickyFault_UnlicensedFeatureInUse(boolean refresh) 2952 { 2953 @SuppressWarnings("unchecked") 2954 var retval = super.lookupStatusSignal(SpnValue.StickyFault_UnlicensedFeatureInUse.value, Boolean.class, val -> val != 0, "StickyFault_UnlicensedFeatureInUse", true, refresh); 2955 return retval; 2956 } 2957 2958 /** 2959 * Bridge was disabled most likely due to supply voltage dropping too 2960 * low. 2961 * 2962 * <ul> 2963 * <li> <b>Default Value:</b> False 2964 * </ul> 2965 * 2966 * Default Rates: 2967 * <ul> 2968 * <li> <b>CAN:</b> 4.0 Hz 2969 * </ul> 2970 * <p> 2971 * This refreshes and returns a cached StatusSignal object. 2972 * 2973 * @return Fault_BridgeBrownout Status Signal Object 2974 */ 2975 @Override 2976 public StatusSignal<Boolean> getFault_BridgeBrownout() 2977 { 2978 return getFault_BridgeBrownout(true); 2979 } 2980 2981 /** 2982 * Bridge was disabled most likely due to supply voltage dropping too 2983 * low. 2984 * 2985 * <ul> 2986 * <li> <b>Default Value:</b> False 2987 * </ul> 2988 * 2989 * Default Rates: 2990 * <ul> 2991 * <li> <b>CAN:</b> 4.0 Hz 2992 * </ul> 2993 * <p> 2994 * This refreshes and returns a cached StatusSignal object. 2995 * 2996 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 2997 * @return Fault_BridgeBrownout Status Signal Object 2998 */ 2999 @Override 3000 public StatusSignal<Boolean> getFault_BridgeBrownout(boolean refresh) 3001 { 3002 @SuppressWarnings("unchecked") 3003 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_BridgeBrownout.value, Boolean.class, val -> val != 0, "Fault_BridgeBrownout", true, refresh); 3004 return retval; 3005 } 3006 3007 /** 3008 * Bridge was disabled most likely due to supply voltage dropping too 3009 * low. 3010 * 3011 * <ul> 3012 * <li> <b>Default Value:</b> False 3013 * </ul> 3014 * 3015 * Default Rates: 3016 * <ul> 3017 * <li> <b>CAN:</b> 4.0 Hz 3018 * </ul> 3019 * <p> 3020 * This refreshes and returns a cached StatusSignal object. 3021 * 3022 * @return StickyFault_BridgeBrownout Status Signal Object 3023 */ 3024 @Override 3025 public StatusSignal<Boolean> getStickyFault_BridgeBrownout() 3026 { 3027 return getStickyFault_BridgeBrownout(true); 3028 } 3029 3030 /** 3031 * Bridge was disabled most likely due to supply voltage dropping too 3032 * low. 3033 * 3034 * <ul> 3035 * <li> <b>Default Value:</b> False 3036 * </ul> 3037 * 3038 * Default Rates: 3039 * <ul> 3040 * <li> <b>CAN:</b> 4.0 Hz 3041 * </ul> 3042 * <p> 3043 * This refreshes and returns a cached StatusSignal object. 3044 * 3045 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3046 * @return StickyFault_BridgeBrownout Status Signal Object 3047 */ 3048 @Override 3049 public StatusSignal<Boolean> getStickyFault_BridgeBrownout(boolean refresh) 3050 { 3051 @SuppressWarnings("unchecked") 3052 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_BridgeBrownout.value, Boolean.class, val -> val != 0, "StickyFault_BridgeBrownout", true, refresh); 3053 return retval; 3054 } 3055 3056 /** 3057 * The remote sensor has reset. 3058 * 3059 * <ul> 3060 * <li> <b>Default Value:</b> False 3061 * </ul> 3062 * 3063 * Default Rates: 3064 * <ul> 3065 * <li> <b>CAN:</b> 4.0 Hz 3066 * </ul> 3067 * <p> 3068 * This refreshes and returns a cached StatusSignal object. 3069 * 3070 * @return Fault_RemoteSensorReset Status Signal Object 3071 */ 3072 @Override 3073 public StatusSignal<Boolean> getFault_RemoteSensorReset() 3074 { 3075 return getFault_RemoteSensorReset(true); 3076 } 3077 3078 /** 3079 * The remote sensor has reset. 3080 * 3081 * <ul> 3082 * <li> <b>Default Value:</b> False 3083 * </ul> 3084 * 3085 * Default Rates: 3086 * <ul> 3087 * <li> <b>CAN:</b> 4.0 Hz 3088 * </ul> 3089 * <p> 3090 * This refreshes and returns a cached StatusSignal object. 3091 * 3092 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3093 * @return Fault_RemoteSensorReset Status Signal Object 3094 */ 3095 @Override 3096 public StatusSignal<Boolean> getFault_RemoteSensorReset(boolean refresh) 3097 { 3098 @SuppressWarnings("unchecked") 3099 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_RemoteSensorReset.value, Boolean.class, val -> val != 0, "Fault_RemoteSensorReset", true, refresh); 3100 return retval; 3101 } 3102 3103 /** 3104 * The remote sensor has reset. 3105 * 3106 * <ul> 3107 * <li> <b>Default Value:</b> False 3108 * </ul> 3109 * 3110 * Default Rates: 3111 * <ul> 3112 * <li> <b>CAN:</b> 4.0 Hz 3113 * </ul> 3114 * <p> 3115 * This refreshes and returns a cached StatusSignal object. 3116 * 3117 * @return StickyFault_RemoteSensorReset Status Signal Object 3118 */ 3119 @Override 3120 public StatusSignal<Boolean> getStickyFault_RemoteSensorReset() 3121 { 3122 return getStickyFault_RemoteSensorReset(true); 3123 } 3124 3125 /** 3126 * The remote sensor has reset. 3127 * 3128 * <ul> 3129 * <li> <b>Default Value:</b> False 3130 * </ul> 3131 * 3132 * Default Rates: 3133 * <ul> 3134 * <li> <b>CAN:</b> 4.0 Hz 3135 * </ul> 3136 * <p> 3137 * This refreshes and returns a cached StatusSignal object. 3138 * 3139 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3140 * @return StickyFault_RemoteSensorReset Status Signal Object 3141 */ 3142 @Override 3143 public StatusSignal<Boolean> getStickyFault_RemoteSensorReset(boolean refresh) 3144 { 3145 @SuppressWarnings("unchecked") 3146 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_RemoteSensorReset.value, Boolean.class, val -> val != 0, "StickyFault_RemoteSensorReset", true, refresh); 3147 return retval; 3148 } 3149 3150 /** 3151 * The remote Talon used for differential control is not present on 3152 * CAN Bus. 3153 * 3154 * <ul> 3155 * <li> <b>Default Value:</b> False 3156 * </ul> 3157 * 3158 * Default Rates: 3159 * <ul> 3160 * <li> <b>CAN:</b> 4.0 Hz 3161 * </ul> 3162 * <p> 3163 * This refreshes and returns a cached StatusSignal object. 3164 * 3165 * @return Fault_MissingDifferentialFX Status Signal Object 3166 */ 3167 @Override 3168 public StatusSignal<Boolean> getFault_MissingDifferentialFX() 3169 { 3170 return getFault_MissingDifferentialFX(true); 3171 } 3172 3173 /** 3174 * The remote Talon used for differential control is not present on 3175 * CAN Bus. 3176 * 3177 * <ul> 3178 * <li> <b>Default Value:</b> False 3179 * </ul> 3180 * 3181 * Default Rates: 3182 * <ul> 3183 * <li> <b>CAN:</b> 4.0 Hz 3184 * </ul> 3185 * <p> 3186 * This refreshes and returns a cached StatusSignal object. 3187 * 3188 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3189 * @return Fault_MissingDifferentialFX Status Signal Object 3190 */ 3191 @Override 3192 public StatusSignal<Boolean> getFault_MissingDifferentialFX(boolean refresh) 3193 { 3194 @SuppressWarnings("unchecked") 3195 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_MissingDifferentialFX.value, Boolean.class, val -> val != 0, "Fault_MissingDifferentialFX", true, refresh); 3196 return retval; 3197 } 3198 3199 /** 3200 * The remote Talon used for differential control is not present on 3201 * CAN Bus. 3202 * 3203 * <ul> 3204 * <li> <b>Default Value:</b> False 3205 * </ul> 3206 * 3207 * Default Rates: 3208 * <ul> 3209 * <li> <b>CAN:</b> 4.0 Hz 3210 * </ul> 3211 * <p> 3212 * This refreshes and returns a cached StatusSignal object. 3213 * 3214 * @return StickyFault_MissingDifferentialFX Status Signal Object 3215 */ 3216 @Override 3217 public StatusSignal<Boolean> getStickyFault_MissingDifferentialFX() 3218 { 3219 return getStickyFault_MissingDifferentialFX(true); 3220 } 3221 3222 /** 3223 * The remote Talon used for differential control is not present on 3224 * CAN Bus. 3225 * 3226 * <ul> 3227 * <li> <b>Default Value:</b> False 3228 * </ul> 3229 * 3230 * Default Rates: 3231 * <ul> 3232 * <li> <b>CAN:</b> 4.0 Hz 3233 * </ul> 3234 * <p> 3235 * This refreshes and returns a cached StatusSignal object. 3236 * 3237 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3238 * @return StickyFault_MissingDifferentialFX Status Signal Object 3239 */ 3240 @Override 3241 public StatusSignal<Boolean> getStickyFault_MissingDifferentialFX(boolean refresh) 3242 { 3243 @SuppressWarnings("unchecked") 3244 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_MissingDifferentialFX.value, Boolean.class, val -> val != 0, "StickyFault_MissingDifferentialFX", true, refresh); 3245 return retval; 3246 } 3247 3248 /** 3249 * The remote sensor position has overflowed. Because of the nature of 3250 * remote sensors, it is possible for the remote sensor position to 3251 * overflow beyond what is supported by the status signal frame. 3252 * However, this is rare and cannot occur over the course of an FRC 3253 * match under normal use. 3254 * 3255 * <ul> 3256 * <li> <b>Default Value:</b> False 3257 * </ul> 3258 * 3259 * Default Rates: 3260 * <ul> 3261 * <li> <b>CAN:</b> 4.0 Hz 3262 * </ul> 3263 * <p> 3264 * This refreshes and returns a cached StatusSignal object. 3265 * 3266 * @return Fault_RemoteSensorPosOverflow Status Signal Object 3267 */ 3268 @Override 3269 public StatusSignal<Boolean> getFault_RemoteSensorPosOverflow() 3270 { 3271 return getFault_RemoteSensorPosOverflow(true); 3272 } 3273 3274 /** 3275 * The remote sensor position has overflowed. Because of the nature of 3276 * remote sensors, it is possible for the remote sensor position to 3277 * overflow beyond what is supported by the status signal frame. 3278 * However, this is rare and cannot occur over the course of an FRC 3279 * match under normal use. 3280 * 3281 * <ul> 3282 * <li> <b>Default Value:</b> False 3283 * </ul> 3284 * 3285 * Default Rates: 3286 * <ul> 3287 * <li> <b>CAN:</b> 4.0 Hz 3288 * </ul> 3289 * <p> 3290 * This refreshes and returns a cached StatusSignal object. 3291 * 3292 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3293 * @return Fault_RemoteSensorPosOverflow Status Signal Object 3294 */ 3295 @Override 3296 public StatusSignal<Boolean> getFault_RemoteSensorPosOverflow(boolean refresh) 3297 { 3298 @SuppressWarnings("unchecked") 3299 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_RemoteSensorPosOverflow.value, Boolean.class, val -> val != 0, "Fault_RemoteSensorPosOverflow", true, refresh); 3300 return retval; 3301 } 3302 3303 /** 3304 * The remote sensor position has overflowed. Because of the nature of 3305 * remote sensors, it is possible for the remote sensor position to 3306 * overflow beyond what is supported by the status signal frame. 3307 * However, this is rare and cannot occur over the course of an FRC 3308 * match under normal use. 3309 * 3310 * <ul> 3311 * <li> <b>Default Value:</b> False 3312 * </ul> 3313 * 3314 * Default Rates: 3315 * <ul> 3316 * <li> <b>CAN:</b> 4.0 Hz 3317 * </ul> 3318 * <p> 3319 * This refreshes and returns a cached StatusSignal object. 3320 * 3321 * @return StickyFault_RemoteSensorPosOverflow Status Signal Object 3322 */ 3323 @Override 3324 public StatusSignal<Boolean> getStickyFault_RemoteSensorPosOverflow() 3325 { 3326 return getStickyFault_RemoteSensorPosOverflow(true); 3327 } 3328 3329 /** 3330 * The remote sensor position has overflowed. Because of the nature of 3331 * remote sensors, it is possible for the remote sensor position to 3332 * overflow beyond what is supported by the status signal frame. 3333 * However, this is rare and cannot occur over the course of an FRC 3334 * match under normal use. 3335 * 3336 * <ul> 3337 * <li> <b>Default Value:</b> False 3338 * </ul> 3339 * 3340 * Default Rates: 3341 * <ul> 3342 * <li> <b>CAN:</b> 4.0 Hz 3343 * </ul> 3344 * <p> 3345 * This refreshes and returns a cached StatusSignal object. 3346 * 3347 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3348 * @return StickyFault_RemoteSensorPosOverflow Status Signal Object 3349 */ 3350 @Override 3351 public StatusSignal<Boolean> getStickyFault_RemoteSensorPosOverflow(boolean refresh) 3352 { 3353 @SuppressWarnings("unchecked") 3354 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_RemoteSensorPosOverflow.value, Boolean.class, val -> val != 0, "StickyFault_RemoteSensorPosOverflow", true, refresh); 3355 return retval; 3356 } 3357 3358 /** 3359 * Supply Voltage has exceeded the maximum voltage rating of device. 3360 * 3361 * <ul> 3362 * <li> <b>Default Value:</b> False 3363 * </ul> 3364 * 3365 * Default Rates: 3366 * <ul> 3367 * <li> <b>CAN:</b> 4.0 Hz 3368 * </ul> 3369 * <p> 3370 * This refreshes and returns a cached StatusSignal object. 3371 * 3372 * @return Fault_OverSupplyV Status Signal Object 3373 */ 3374 @Override 3375 public StatusSignal<Boolean> getFault_OverSupplyV() 3376 { 3377 return getFault_OverSupplyV(true); 3378 } 3379 3380 /** 3381 * Supply Voltage has exceeded the maximum voltage rating of device. 3382 * 3383 * <ul> 3384 * <li> <b>Default Value:</b> False 3385 * </ul> 3386 * 3387 * Default Rates: 3388 * <ul> 3389 * <li> <b>CAN:</b> 4.0 Hz 3390 * </ul> 3391 * <p> 3392 * This refreshes and returns a cached StatusSignal object. 3393 * 3394 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3395 * @return Fault_OverSupplyV Status Signal Object 3396 */ 3397 @Override 3398 public StatusSignal<Boolean> getFault_OverSupplyV(boolean refresh) 3399 { 3400 @SuppressWarnings("unchecked") 3401 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_OverSupplyV.value, Boolean.class, val -> val != 0, "Fault_OverSupplyV", true, refresh); 3402 return retval; 3403 } 3404 3405 /** 3406 * Supply Voltage has exceeded the maximum voltage rating of device. 3407 * 3408 * <ul> 3409 * <li> <b>Default Value:</b> False 3410 * </ul> 3411 * 3412 * Default Rates: 3413 * <ul> 3414 * <li> <b>CAN:</b> 4.0 Hz 3415 * </ul> 3416 * <p> 3417 * This refreshes and returns a cached StatusSignal object. 3418 * 3419 * @return StickyFault_OverSupplyV Status Signal Object 3420 */ 3421 @Override 3422 public StatusSignal<Boolean> getStickyFault_OverSupplyV() 3423 { 3424 return getStickyFault_OverSupplyV(true); 3425 } 3426 3427 /** 3428 * Supply Voltage has exceeded the maximum voltage rating of device. 3429 * 3430 * <ul> 3431 * <li> <b>Default Value:</b> False 3432 * </ul> 3433 * 3434 * Default Rates: 3435 * <ul> 3436 * <li> <b>CAN:</b> 4.0 Hz 3437 * </ul> 3438 * <p> 3439 * This refreshes and returns a cached StatusSignal object. 3440 * 3441 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3442 * @return StickyFault_OverSupplyV Status Signal Object 3443 */ 3444 @Override 3445 public StatusSignal<Boolean> getStickyFault_OverSupplyV(boolean refresh) 3446 { 3447 @SuppressWarnings("unchecked") 3448 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_OverSupplyV.value, Boolean.class, val -> val != 0, "StickyFault_OverSupplyV", true, refresh); 3449 return retval; 3450 } 3451 3452 /** 3453 * Supply Voltage is unstable. Ensure you are using a battery and 3454 * current limited power supply. 3455 * 3456 * <ul> 3457 * <li> <b>Default Value:</b> False 3458 * </ul> 3459 * 3460 * Default Rates: 3461 * <ul> 3462 * <li> <b>CAN:</b> 4.0 Hz 3463 * </ul> 3464 * <p> 3465 * This refreshes and returns a cached StatusSignal object. 3466 * 3467 * @return Fault_UnstableSupplyV Status Signal Object 3468 */ 3469 @Override 3470 public StatusSignal<Boolean> getFault_UnstableSupplyV() 3471 { 3472 return getFault_UnstableSupplyV(true); 3473 } 3474 3475 /** 3476 * Supply Voltage is unstable. Ensure you are using a battery and 3477 * current limited power supply. 3478 * 3479 * <ul> 3480 * <li> <b>Default Value:</b> False 3481 * </ul> 3482 * 3483 * Default Rates: 3484 * <ul> 3485 * <li> <b>CAN:</b> 4.0 Hz 3486 * </ul> 3487 * <p> 3488 * This refreshes and returns a cached StatusSignal object. 3489 * 3490 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3491 * @return Fault_UnstableSupplyV Status Signal Object 3492 */ 3493 @Override 3494 public StatusSignal<Boolean> getFault_UnstableSupplyV(boolean refresh) 3495 { 3496 @SuppressWarnings("unchecked") 3497 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_UnstableSupplyV.value, Boolean.class, val -> val != 0, "Fault_UnstableSupplyV", true, refresh); 3498 return retval; 3499 } 3500 3501 /** 3502 * Supply Voltage is unstable. Ensure you are using a battery and 3503 * current limited power supply. 3504 * 3505 * <ul> 3506 * <li> <b>Default Value:</b> False 3507 * </ul> 3508 * 3509 * Default Rates: 3510 * <ul> 3511 * <li> <b>CAN:</b> 4.0 Hz 3512 * </ul> 3513 * <p> 3514 * This refreshes and returns a cached StatusSignal object. 3515 * 3516 * @return StickyFault_UnstableSupplyV Status Signal Object 3517 */ 3518 @Override 3519 public StatusSignal<Boolean> getStickyFault_UnstableSupplyV() 3520 { 3521 return getStickyFault_UnstableSupplyV(true); 3522 } 3523 3524 /** 3525 * Supply Voltage is unstable. Ensure you are using a battery and 3526 * current limited power supply. 3527 * 3528 * <ul> 3529 * <li> <b>Default Value:</b> False 3530 * </ul> 3531 * 3532 * Default Rates: 3533 * <ul> 3534 * <li> <b>CAN:</b> 4.0 Hz 3535 * </ul> 3536 * <p> 3537 * This refreshes and returns a cached StatusSignal object. 3538 * 3539 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3540 * @return StickyFault_UnstableSupplyV Status Signal Object 3541 */ 3542 @Override 3543 public StatusSignal<Boolean> getStickyFault_UnstableSupplyV(boolean refresh) 3544 { 3545 @SuppressWarnings("unchecked") 3546 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_UnstableSupplyV.value, Boolean.class, val -> val != 0, "StickyFault_UnstableSupplyV", true, refresh); 3547 return retval; 3548 } 3549 3550 /** 3551 * Reverse limit switch has been asserted. Output is set to neutral. 3552 * 3553 * <ul> 3554 * <li> <b>Default Value:</b> False 3555 * </ul> 3556 * 3557 * Default Rates: 3558 * <ul> 3559 * <li> <b>CAN:</b> 4.0 Hz 3560 * </ul> 3561 * <p> 3562 * This refreshes and returns a cached StatusSignal object. 3563 * 3564 * @return Fault_ReverseHardLimit Status Signal Object 3565 */ 3566 @Override 3567 public StatusSignal<Boolean> getFault_ReverseHardLimit() 3568 { 3569 return getFault_ReverseHardLimit(true); 3570 } 3571 3572 /** 3573 * Reverse limit switch has been asserted. Output is set to neutral. 3574 * 3575 * <ul> 3576 * <li> <b>Default Value:</b> False 3577 * </ul> 3578 * 3579 * Default Rates: 3580 * <ul> 3581 * <li> <b>CAN:</b> 4.0 Hz 3582 * </ul> 3583 * <p> 3584 * This refreshes and returns a cached StatusSignal object. 3585 * 3586 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3587 * @return Fault_ReverseHardLimit Status Signal Object 3588 */ 3589 @Override 3590 public StatusSignal<Boolean> getFault_ReverseHardLimit(boolean refresh) 3591 { 3592 @SuppressWarnings("unchecked") 3593 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_ReverseHardLimit.value, Boolean.class, val -> val != 0, "Fault_ReverseHardLimit", true, refresh); 3594 return retval; 3595 } 3596 3597 /** 3598 * Reverse limit switch has been asserted. Output is set to neutral. 3599 * 3600 * <ul> 3601 * <li> <b>Default Value:</b> False 3602 * </ul> 3603 * 3604 * Default Rates: 3605 * <ul> 3606 * <li> <b>CAN:</b> 4.0 Hz 3607 * </ul> 3608 * <p> 3609 * This refreshes and returns a cached StatusSignal object. 3610 * 3611 * @return StickyFault_ReverseHardLimit Status Signal Object 3612 */ 3613 @Override 3614 public StatusSignal<Boolean> getStickyFault_ReverseHardLimit() 3615 { 3616 return getStickyFault_ReverseHardLimit(true); 3617 } 3618 3619 /** 3620 * Reverse limit switch has been asserted. Output is set to neutral. 3621 * 3622 * <ul> 3623 * <li> <b>Default Value:</b> False 3624 * </ul> 3625 * 3626 * Default Rates: 3627 * <ul> 3628 * <li> <b>CAN:</b> 4.0 Hz 3629 * </ul> 3630 * <p> 3631 * This refreshes and returns a cached StatusSignal object. 3632 * 3633 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3634 * @return StickyFault_ReverseHardLimit Status Signal Object 3635 */ 3636 @Override 3637 public StatusSignal<Boolean> getStickyFault_ReverseHardLimit(boolean refresh) 3638 { 3639 @SuppressWarnings("unchecked") 3640 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_ReverseHardLimit.value, Boolean.class, val -> val != 0, "StickyFault_ReverseHardLimit", true, refresh); 3641 return retval; 3642 } 3643 3644 /** 3645 * Forward limit switch has been asserted. Output is set to neutral. 3646 * 3647 * <ul> 3648 * <li> <b>Default Value:</b> False 3649 * </ul> 3650 * 3651 * Default Rates: 3652 * <ul> 3653 * <li> <b>CAN:</b> 4.0 Hz 3654 * </ul> 3655 * <p> 3656 * This refreshes and returns a cached StatusSignal object. 3657 * 3658 * @return Fault_ForwardHardLimit Status Signal Object 3659 */ 3660 @Override 3661 public StatusSignal<Boolean> getFault_ForwardHardLimit() 3662 { 3663 return getFault_ForwardHardLimit(true); 3664 } 3665 3666 /** 3667 * Forward limit switch has been asserted. Output is set to neutral. 3668 * 3669 * <ul> 3670 * <li> <b>Default Value:</b> False 3671 * </ul> 3672 * 3673 * Default Rates: 3674 * <ul> 3675 * <li> <b>CAN:</b> 4.0 Hz 3676 * </ul> 3677 * <p> 3678 * This refreshes and returns a cached StatusSignal object. 3679 * 3680 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3681 * @return Fault_ForwardHardLimit Status Signal Object 3682 */ 3683 @Override 3684 public StatusSignal<Boolean> getFault_ForwardHardLimit(boolean refresh) 3685 { 3686 @SuppressWarnings("unchecked") 3687 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_ForwardHardLimit.value, Boolean.class, val -> val != 0, "Fault_ForwardHardLimit", true, refresh); 3688 return retval; 3689 } 3690 3691 /** 3692 * Forward limit switch has been asserted. Output is set to neutral. 3693 * 3694 * <ul> 3695 * <li> <b>Default Value:</b> False 3696 * </ul> 3697 * 3698 * Default Rates: 3699 * <ul> 3700 * <li> <b>CAN:</b> 4.0 Hz 3701 * </ul> 3702 * <p> 3703 * This refreshes and returns a cached StatusSignal object. 3704 * 3705 * @return StickyFault_ForwardHardLimit Status Signal Object 3706 */ 3707 @Override 3708 public StatusSignal<Boolean> getStickyFault_ForwardHardLimit() 3709 { 3710 return getStickyFault_ForwardHardLimit(true); 3711 } 3712 3713 /** 3714 * Forward limit switch has been asserted. Output is set to neutral. 3715 * 3716 * <ul> 3717 * <li> <b>Default Value:</b> False 3718 * </ul> 3719 * 3720 * Default Rates: 3721 * <ul> 3722 * <li> <b>CAN:</b> 4.0 Hz 3723 * </ul> 3724 * <p> 3725 * This refreshes and returns a cached StatusSignal object. 3726 * 3727 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3728 * @return StickyFault_ForwardHardLimit Status Signal Object 3729 */ 3730 @Override 3731 public StatusSignal<Boolean> getStickyFault_ForwardHardLimit(boolean refresh) 3732 { 3733 @SuppressWarnings("unchecked") 3734 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_ForwardHardLimit.value, Boolean.class, val -> val != 0, "StickyFault_ForwardHardLimit", true, refresh); 3735 return retval; 3736 } 3737 3738 /** 3739 * Reverse soft limit has been asserted. Output is set to neutral. 3740 * 3741 * <ul> 3742 * <li> <b>Default Value:</b> False 3743 * </ul> 3744 * 3745 * Default Rates: 3746 * <ul> 3747 * <li> <b>CAN:</b> 4.0 Hz 3748 * </ul> 3749 * <p> 3750 * This refreshes and returns a cached StatusSignal object. 3751 * 3752 * @return Fault_ReverseSoftLimit Status Signal Object 3753 */ 3754 @Override 3755 public StatusSignal<Boolean> getFault_ReverseSoftLimit() 3756 { 3757 return getFault_ReverseSoftLimit(true); 3758 } 3759 3760 /** 3761 * Reverse soft limit has been asserted. Output is set to neutral. 3762 * 3763 * <ul> 3764 * <li> <b>Default Value:</b> False 3765 * </ul> 3766 * 3767 * Default Rates: 3768 * <ul> 3769 * <li> <b>CAN:</b> 4.0 Hz 3770 * </ul> 3771 * <p> 3772 * This refreshes and returns a cached StatusSignal object. 3773 * 3774 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3775 * @return Fault_ReverseSoftLimit Status Signal Object 3776 */ 3777 @Override 3778 public StatusSignal<Boolean> getFault_ReverseSoftLimit(boolean refresh) 3779 { 3780 @SuppressWarnings("unchecked") 3781 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_ReverseSoftLimit.value, Boolean.class, val -> val != 0, "Fault_ReverseSoftLimit", true, refresh); 3782 return retval; 3783 } 3784 3785 /** 3786 * Reverse soft limit has been asserted. Output is set to neutral. 3787 * 3788 * <ul> 3789 * <li> <b>Default Value:</b> False 3790 * </ul> 3791 * 3792 * Default Rates: 3793 * <ul> 3794 * <li> <b>CAN:</b> 4.0 Hz 3795 * </ul> 3796 * <p> 3797 * This refreshes and returns a cached StatusSignal object. 3798 * 3799 * @return StickyFault_ReverseSoftLimit Status Signal Object 3800 */ 3801 @Override 3802 public StatusSignal<Boolean> getStickyFault_ReverseSoftLimit() 3803 { 3804 return getStickyFault_ReverseSoftLimit(true); 3805 } 3806 3807 /** 3808 * Reverse soft limit has been asserted. Output is set to neutral. 3809 * 3810 * <ul> 3811 * <li> <b>Default Value:</b> False 3812 * </ul> 3813 * 3814 * Default Rates: 3815 * <ul> 3816 * <li> <b>CAN:</b> 4.0 Hz 3817 * </ul> 3818 * <p> 3819 * This refreshes and returns a cached StatusSignal object. 3820 * 3821 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3822 * @return StickyFault_ReverseSoftLimit Status Signal Object 3823 */ 3824 @Override 3825 public StatusSignal<Boolean> getStickyFault_ReverseSoftLimit(boolean refresh) 3826 { 3827 @SuppressWarnings("unchecked") 3828 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_ReverseSoftLimit.value, Boolean.class, val -> val != 0, "StickyFault_ReverseSoftLimit", true, refresh); 3829 return retval; 3830 } 3831 3832 /** 3833 * Forward soft limit has been asserted. Output is set to neutral. 3834 * 3835 * <ul> 3836 * <li> <b>Default Value:</b> False 3837 * </ul> 3838 * 3839 * Default Rates: 3840 * <ul> 3841 * <li> <b>CAN:</b> 4.0 Hz 3842 * </ul> 3843 * <p> 3844 * This refreshes and returns a cached StatusSignal object. 3845 * 3846 * @return Fault_ForwardSoftLimit Status Signal Object 3847 */ 3848 @Override 3849 public StatusSignal<Boolean> getFault_ForwardSoftLimit() 3850 { 3851 return getFault_ForwardSoftLimit(true); 3852 } 3853 3854 /** 3855 * Forward soft limit has been asserted. Output is set to neutral. 3856 * 3857 * <ul> 3858 * <li> <b>Default Value:</b> False 3859 * </ul> 3860 * 3861 * Default Rates: 3862 * <ul> 3863 * <li> <b>CAN:</b> 4.0 Hz 3864 * </ul> 3865 * <p> 3866 * This refreshes and returns a cached StatusSignal object. 3867 * 3868 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3869 * @return Fault_ForwardSoftLimit Status Signal Object 3870 */ 3871 @Override 3872 public StatusSignal<Boolean> getFault_ForwardSoftLimit(boolean refresh) 3873 { 3874 @SuppressWarnings("unchecked") 3875 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_ForwardSoftLimit.value, Boolean.class, val -> val != 0, "Fault_ForwardSoftLimit", true, refresh); 3876 return retval; 3877 } 3878 3879 /** 3880 * Forward soft limit has been asserted. Output is set to neutral. 3881 * 3882 * <ul> 3883 * <li> <b>Default Value:</b> False 3884 * </ul> 3885 * 3886 * Default Rates: 3887 * <ul> 3888 * <li> <b>CAN:</b> 4.0 Hz 3889 * </ul> 3890 * <p> 3891 * This refreshes and returns a cached StatusSignal object. 3892 * 3893 * @return StickyFault_ForwardSoftLimit Status Signal Object 3894 */ 3895 @Override 3896 public StatusSignal<Boolean> getStickyFault_ForwardSoftLimit() 3897 { 3898 return getStickyFault_ForwardSoftLimit(true); 3899 } 3900 3901 /** 3902 * Forward soft limit has been asserted. Output is set to neutral. 3903 * 3904 * <ul> 3905 * <li> <b>Default Value:</b> False 3906 * </ul> 3907 * 3908 * Default Rates: 3909 * <ul> 3910 * <li> <b>CAN:</b> 4.0 Hz 3911 * </ul> 3912 * <p> 3913 * This refreshes and returns a cached StatusSignal object. 3914 * 3915 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3916 * @return StickyFault_ForwardSoftLimit Status Signal Object 3917 */ 3918 @Override 3919 public StatusSignal<Boolean> getStickyFault_ForwardSoftLimit(boolean refresh) 3920 { 3921 @SuppressWarnings("unchecked") 3922 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_ForwardSoftLimit.value, Boolean.class, val -> val != 0, "StickyFault_ForwardSoftLimit", true, refresh); 3923 return retval; 3924 } 3925 3926 /** 3927 * The remote soft limit device is not present on CAN Bus. 3928 * 3929 * <ul> 3930 * <li> <b>Default Value:</b> False 3931 * </ul> 3932 * 3933 * Default Rates: 3934 * <ul> 3935 * <li> <b>CAN:</b> 4.0 Hz 3936 * </ul> 3937 * <p> 3938 * This refreshes and returns a cached StatusSignal object. 3939 * 3940 * @return Fault_MissingSoftLimitRemote Status Signal Object 3941 */ 3942 @Override 3943 public StatusSignal<Boolean> getFault_MissingSoftLimitRemote() 3944 { 3945 return getFault_MissingSoftLimitRemote(true); 3946 } 3947 3948 /** 3949 * The remote soft limit device is not present on CAN Bus. 3950 * 3951 * <ul> 3952 * <li> <b>Default Value:</b> False 3953 * </ul> 3954 * 3955 * Default Rates: 3956 * <ul> 3957 * <li> <b>CAN:</b> 4.0 Hz 3958 * </ul> 3959 * <p> 3960 * This refreshes and returns a cached StatusSignal object. 3961 * 3962 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 3963 * @return Fault_MissingSoftLimitRemote Status Signal Object 3964 */ 3965 @Override 3966 public StatusSignal<Boolean> getFault_MissingSoftLimitRemote(boolean refresh) 3967 { 3968 @SuppressWarnings("unchecked") 3969 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_MissingRemSoftLim.value, Boolean.class, val -> val != 0, "Fault_MissingSoftLimitRemote", true, refresh); 3970 return retval; 3971 } 3972 3973 /** 3974 * The remote soft limit device is not present on CAN Bus. 3975 * 3976 * <ul> 3977 * <li> <b>Default Value:</b> False 3978 * </ul> 3979 * 3980 * Default Rates: 3981 * <ul> 3982 * <li> <b>CAN:</b> 4.0 Hz 3983 * </ul> 3984 * <p> 3985 * This refreshes and returns a cached StatusSignal object. 3986 * 3987 * @return StickyFault_MissingSoftLimitRemote Status Signal Object 3988 */ 3989 @Override 3990 public StatusSignal<Boolean> getStickyFault_MissingSoftLimitRemote() 3991 { 3992 return getStickyFault_MissingSoftLimitRemote(true); 3993 } 3994 3995 /** 3996 * The remote soft limit device is not present on CAN Bus. 3997 * 3998 * <ul> 3999 * <li> <b>Default Value:</b> False 4000 * </ul> 4001 * 4002 * Default Rates: 4003 * <ul> 4004 * <li> <b>CAN:</b> 4.0 Hz 4005 * </ul> 4006 * <p> 4007 * This refreshes and returns a cached StatusSignal object. 4008 * 4009 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4010 * @return StickyFault_MissingSoftLimitRemote Status Signal Object 4011 */ 4012 @Override 4013 public StatusSignal<Boolean> getStickyFault_MissingSoftLimitRemote(boolean refresh) 4014 { 4015 @SuppressWarnings("unchecked") 4016 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_MissingRemSoftLim.value, Boolean.class, val -> val != 0, "StickyFault_MissingSoftLimitRemote", true, refresh); 4017 return retval; 4018 } 4019 4020 /** 4021 * The remote limit switch device is not present on CAN Bus. 4022 * 4023 * <ul> 4024 * <li> <b>Default Value:</b> False 4025 * </ul> 4026 * 4027 * Default Rates: 4028 * <ul> 4029 * <li> <b>CAN:</b> 4.0 Hz 4030 * </ul> 4031 * <p> 4032 * This refreshes and returns a cached StatusSignal object. 4033 * 4034 * @return Fault_MissingHardLimitRemote Status Signal Object 4035 */ 4036 @Override 4037 public StatusSignal<Boolean> getFault_MissingHardLimitRemote() 4038 { 4039 return getFault_MissingHardLimitRemote(true); 4040 } 4041 4042 /** 4043 * The remote limit switch device is not present on CAN Bus. 4044 * 4045 * <ul> 4046 * <li> <b>Default Value:</b> False 4047 * </ul> 4048 * 4049 * Default Rates: 4050 * <ul> 4051 * <li> <b>CAN:</b> 4.0 Hz 4052 * </ul> 4053 * <p> 4054 * This refreshes and returns a cached StatusSignal object. 4055 * 4056 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4057 * @return Fault_MissingHardLimitRemote Status Signal Object 4058 */ 4059 @Override 4060 public StatusSignal<Boolean> getFault_MissingHardLimitRemote(boolean refresh) 4061 { 4062 @SuppressWarnings("unchecked") 4063 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_MissingRemHardLim.value, Boolean.class, val -> val != 0, "Fault_MissingHardLimitRemote", true, refresh); 4064 return retval; 4065 } 4066 4067 /** 4068 * The remote limit switch device is not present on CAN Bus. 4069 * 4070 * <ul> 4071 * <li> <b>Default Value:</b> False 4072 * </ul> 4073 * 4074 * Default Rates: 4075 * <ul> 4076 * <li> <b>CAN:</b> 4.0 Hz 4077 * </ul> 4078 * <p> 4079 * This refreshes and returns a cached StatusSignal object. 4080 * 4081 * @return StickyFault_MissingHardLimitRemote Status Signal Object 4082 */ 4083 @Override 4084 public StatusSignal<Boolean> getStickyFault_MissingHardLimitRemote() 4085 { 4086 return getStickyFault_MissingHardLimitRemote(true); 4087 } 4088 4089 /** 4090 * The remote limit switch device is not present on CAN Bus. 4091 * 4092 * <ul> 4093 * <li> <b>Default Value:</b> False 4094 * </ul> 4095 * 4096 * Default Rates: 4097 * <ul> 4098 * <li> <b>CAN:</b> 4.0 Hz 4099 * </ul> 4100 * <p> 4101 * This refreshes and returns a cached StatusSignal object. 4102 * 4103 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4104 * @return StickyFault_MissingHardLimitRemote Status Signal Object 4105 */ 4106 @Override 4107 public StatusSignal<Boolean> getStickyFault_MissingHardLimitRemote(boolean refresh) 4108 { 4109 @SuppressWarnings("unchecked") 4110 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_MissingRemHardLim.value, Boolean.class, val -> val != 0, "StickyFault_MissingHardLimitRemote", true, refresh); 4111 return retval; 4112 } 4113 4114 /** 4115 * The remote sensor's data is no longer trusted. This can happen if 4116 * the remote sensor disappears from the CAN bus or if the remote 4117 * sensor indicates its data is no longer valid, such as when a 4118 * CANcoder's magnet strength falls into the "red" range. 4119 * 4120 * <ul> 4121 * <li> <b>Default Value:</b> False 4122 * </ul> 4123 * 4124 * Default Rates: 4125 * <ul> 4126 * <li> <b>CAN:</b> 4.0 Hz 4127 * </ul> 4128 * <p> 4129 * This refreshes and returns a cached StatusSignal object. 4130 * 4131 * @return Fault_RemoteSensorDataInvalid Status Signal Object 4132 */ 4133 @Override 4134 public StatusSignal<Boolean> getFault_RemoteSensorDataInvalid() 4135 { 4136 return getFault_RemoteSensorDataInvalid(true); 4137 } 4138 4139 /** 4140 * The remote sensor's data is no longer trusted. This can happen if 4141 * the remote sensor disappears from the CAN bus or if the remote 4142 * sensor indicates its data is no longer valid, such as when a 4143 * CANcoder's magnet strength falls into the "red" range. 4144 * 4145 * <ul> 4146 * <li> <b>Default Value:</b> False 4147 * </ul> 4148 * 4149 * Default Rates: 4150 * <ul> 4151 * <li> <b>CAN:</b> 4.0 Hz 4152 * </ul> 4153 * <p> 4154 * This refreshes and returns a cached StatusSignal object. 4155 * 4156 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4157 * @return Fault_RemoteSensorDataInvalid Status Signal Object 4158 */ 4159 @Override 4160 public StatusSignal<Boolean> getFault_RemoteSensorDataInvalid(boolean refresh) 4161 { 4162 @SuppressWarnings("unchecked") 4163 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_MissingRemoteSensor.value, Boolean.class, val -> val != 0, "Fault_RemoteSensorDataInvalid", true, refresh); 4164 return retval; 4165 } 4166 4167 /** 4168 * The remote sensor's data is no longer trusted. This can happen if 4169 * the remote sensor disappears from the CAN bus or if the remote 4170 * sensor indicates its data is no longer valid, such as when a 4171 * CANcoder's magnet strength falls into the "red" range. 4172 * 4173 * <ul> 4174 * <li> <b>Default Value:</b> False 4175 * </ul> 4176 * 4177 * Default Rates: 4178 * <ul> 4179 * <li> <b>CAN:</b> 4.0 Hz 4180 * </ul> 4181 * <p> 4182 * This refreshes and returns a cached StatusSignal object. 4183 * 4184 * @return StickyFault_RemoteSensorDataInvalid Status Signal Object 4185 */ 4186 @Override 4187 public StatusSignal<Boolean> getStickyFault_RemoteSensorDataInvalid() 4188 { 4189 return getStickyFault_RemoteSensorDataInvalid(true); 4190 } 4191 4192 /** 4193 * The remote sensor's data is no longer trusted. This can happen if 4194 * the remote sensor disappears from the CAN bus or if the remote 4195 * sensor indicates its data is no longer valid, such as when a 4196 * CANcoder's magnet strength falls into the "red" range. 4197 * 4198 * <ul> 4199 * <li> <b>Default Value:</b> False 4200 * </ul> 4201 * 4202 * Default Rates: 4203 * <ul> 4204 * <li> <b>CAN:</b> 4.0 Hz 4205 * </ul> 4206 * <p> 4207 * This refreshes and returns a cached StatusSignal object. 4208 * 4209 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4210 * @return StickyFault_RemoteSensorDataInvalid Status Signal Object 4211 */ 4212 @Override 4213 public StatusSignal<Boolean> getStickyFault_RemoteSensorDataInvalid(boolean refresh) 4214 { 4215 @SuppressWarnings("unchecked") 4216 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_MissingRemoteSensor.value, Boolean.class, val -> val != 0, "StickyFault_RemoteSensorDataInvalid", true, refresh); 4217 return retval; 4218 } 4219 4220 /** 4221 * The remote sensor used for fusion has fallen out of sync to the 4222 * local sensor. A re-synchronization has occurred, which may cause a 4223 * discontinuity. This typically happens if there is significant slop 4224 * in the mechanism, or if the RotorToSensorRatio configuration 4225 * parameter is incorrect. 4226 * 4227 * <ul> 4228 * <li> <b>Default Value:</b> False 4229 * </ul> 4230 * 4231 * Default Rates: 4232 * <ul> 4233 * <li> <b>CAN:</b> 4.0 Hz 4234 * </ul> 4235 * <p> 4236 * This refreshes and returns a cached StatusSignal object. 4237 * 4238 * @return Fault_FusedSensorOutOfSync Status Signal Object 4239 */ 4240 @Override 4241 public StatusSignal<Boolean> getFault_FusedSensorOutOfSync() 4242 { 4243 return getFault_FusedSensorOutOfSync(true); 4244 } 4245 4246 /** 4247 * The remote sensor used for fusion has fallen out of sync to the 4248 * local sensor. A re-synchronization has occurred, which may cause a 4249 * discontinuity. This typically happens if there is significant slop 4250 * in the mechanism, or if the RotorToSensorRatio configuration 4251 * parameter is incorrect. 4252 * 4253 * <ul> 4254 * <li> <b>Default Value:</b> False 4255 * </ul> 4256 * 4257 * Default Rates: 4258 * <ul> 4259 * <li> <b>CAN:</b> 4.0 Hz 4260 * </ul> 4261 * <p> 4262 * This refreshes and returns a cached StatusSignal object. 4263 * 4264 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4265 * @return Fault_FusedSensorOutOfSync Status Signal Object 4266 */ 4267 @Override 4268 public StatusSignal<Boolean> getFault_FusedSensorOutOfSync(boolean refresh) 4269 { 4270 @SuppressWarnings("unchecked") 4271 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_FusedSensorOutOfSync.value, Boolean.class, val -> val != 0, "Fault_FusedSensorOutOfSync", true, refresh); 4272 return retval; 4273 } 4274 4275 /** 4276 * The remote sensor used for fusion has fallen out of sync to the 4277 * local sensor. A re-synchronization has occurred, which may cause a 4278 * discontinuity. This typically happens if there is significant slop 4279 * in the mechanism, or if the RotorToSensorRatio configuration 4280 * parameter is incorrect. 4281 * 4282 * <ul> 4283 * <li> <b>Default Value:</b> False 4284 * </ul> 4285 * 4286 * Default Rates: 4287 * <ul> 4288 * <li> <b>CAN:</b> 4.0 Hz 4289 * </ul> 4290 * <p> 4291 * This refreshes and returns a cached StatusSignal object. 4292 * 4293 * @return StickyFault_FusedSensorOutOfSync Status Signal Object 4294 */ 4295 @Override 4296 public StatusSignal<Boolean> getStickyFault_FusedSensorOutOfSync() 4297 { 4298 return getStickyFault_FusedSensorOutOfSync(true); 4299 } 4300 4301 /** 4302 * The remote sensor used for fusion has fallen out of sync to the 4303 * local sensor. A re-synchronization has occurred, which may cause a 4304 * discontinuity. This typically happens if there is significant slop 4305 * in the mechanism, or if the RotorToSensorRatio configuration 4306 * parameter is incorrect. 4307 * 4308 * <ul> 4309 * <li> <b>Default Value:</b> False 4310 * </ul> 4311 * 4312 * Default Rates: 4313 * <ul> 4314 * <li> <b>CAN:</b> 4.0 Hz 4315 * </ul> 4316 * <p> 4317 * This refreshes and returns a cached StatusSignal object. 4318 * 4319 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4320 * @return StickyFault_FusedSensorOutOfSync Status Signal Object 4321 */ 4322 @Override 4323 public StatusSignal<Boolean> getStickyFault_FusedSensorOutOfSync(boolean refresh) 4324 { 4325 @SuppressWarnings("unchecked") 4326 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_FusedSensorOutOfSync.value, Boolean.class, val -> val != 0, "StickyFault_FusedSensorOutOfSync", true, refresh); 4327 return retval; 4328 } 4329 4330 /** 4331 * Stator current limit occured. 4332 * 4333 * <ul> 4334 * <li> <b>Default Value:</b> False 4335 * </ul> 4336 * 4337 * Default Rates: 4338 * <ul> 4339 * <li> <b>CAN:</b> 4.0 Hz 4340 * </ul> 4341 * <p> 4342 * This refreshes and returns a cached StatusSignal object. 4343 * 4344 * @return Fault_StatorCurrLimit Status Signal Object 4345 */ 4346 @Override 4347 public StatusSignal<Boolean> getFault_StatorCurrLimit() 4348 { 4349 return getFault_StatorCurrLimit(true); 4350 } 4351 4352 /** 4353 * Stator current limit occured. 4354 * 4355 * <ul> 4356 * <li> <b>Default Value:</b> False 4357 * </ul> 4358 * 4359 * Default Rates: 4360 * <ul> 4361 * <li> <b>CAN:</b> 4.0 Hz 4362 * </ul> 4363 * <p> 4364 * This refreshes and returns a cached StatusSignal object. 4365 * 4366 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4367 * @return Fault_StatorCurrLimit Status Signal Object 4368 */ 4369 @Override 4370 public StatusSignal<Boolean> getFault_StatorCurrLimit(boolean refresh) 4371 { 4372 @SuppressWarnings("unchecked") 4373 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_StatorCurrLimit.value, Boolean.class, val -> val != 0, "Fault_StatorCurrLimit", true, refresh); 4374 return retval; 4375 } 4376 4377 /** 4378 * Stator current limit occured. 4379 * 4380 * <ul> 4381 * <li> <b>Default Value:</b> False 4382 * </ul> 4383 * 4384 * Default Rates: 4385 * <ul> 4386 * <li> <b>CAN:</b> 4.0 Hz 4387 * </ul> 4388 * <p> 4389 * This refreshes and returns a cached StatusSignal object. 4390 * 4391 * @return StickyFault_StatorCurrLimit Status Signal Object 4392 */ 4393 @Override 4394 public StatusSignal<Boolean> getStickyFault_StatorCurrLimit() 4395 { 4396 return getStickyFault_StatorCurrLimit(true); 4397 } 4398 4399 /** 4400 * Stator current limit occured. 4401 * 4402 * <ul> 4403 * <li> <b>Default Value:</b> False 4404 * </ul> 4405 * 4406 * Default Rates: 4407 * <ul> 4408 * <li> <b>CAN:</b> 4.0 Hz 4409 * </ul> 4410 * <p> 4411 * This refreshes and returns a cached StatusSignal object. 4412 * 4413 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4414 * @return StickyFault_StatorCurrLimit Status Signal Object 4415 */ 4416 @Override 4417 public StatusSignal<Boolean> getStickyFault_StatorCurrLimit(boolean refresh) 4418 { 4419 @SuppressWarnings("unchecked") 4420 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_StatorCurrLimit.value, Boolean.class, val -> val != 0, "StickyFault_StatorCurrLimit", true, refresh); 4421 return retval; 4422 } 4423 4424 /** 4425 * Supply current limit occured. 4426 * 4427 * <ul> 4428 * <li> <b>Default Value:</b> False 4429 * </ul> 4430 * 4431 * Default Rates: 4432 * <ul> 4433 * <li> <b>CAN:</b> 4.0 Hz 4434 * </ul> 4435 * <p> 4436 * This refreshes and returns a cached StatusSignal object. 4437 * 4438 * @return Fault_SupplyCurrLimit Status Signal Object 4439 */ 4440 @Override 4441 public StatusSignal<Boolean> getFault_SupplyCurrLimit() 4442 { 4443 return getFault_SupplyCurrLimit(true); 4444 } 4445 4446 /** 4447 * Supply current limit occured. 4448 * 4449 * <ul> 4450 * <li> <b>Default Value:</b> False 4451 * </ul> 4452 * 4453 * Default Rates: 4454 * <ul> 4455 * <li> <b>CAN:</b> 4.0 Hz 4456 * </ul> 4457 * <p> 4458 * This refreshes and returns a cached StatusSignal object. 4459 * 4460 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4461 * @return Fault_SupplyCurrLimit Status Signal Object 4462 */ 4463 @Override 4464 public StatusSignal<Boolean> getFault_SupplyCurrLimit(boolean refresh) 4465 { 4466 @SuppressWarnings("unchecked") 4467 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_SupplyCurrLimit.value, Boolean.class, val -> val != 0, "Fault_SupplyCurrLimit", true, refresh); 4468 return retval; 4469 } 4470 4471 /** 4472 * Supply current limit occured. 4473 * 4474 * <ul> 4475 * <li> <b>Default Value:</b> False 4476 * </ul> 4477 * 4478 * Default Rates: 4479 * <ul> 4480 * <li> <b>CAN:</b> 4.0 Hz 4481 * </ul> 4482 * <p> 4483 * This refreshes and returns a cached StatusSignal object. 4484 * 4485 * @return StickyFault_SupplyCurrLimit Status Signal Object 4486 */ 4487 @Override 4488 public StatusSignal<Boolean> getStickyFault_SupplyCurrLimit() 4489 { 4490 return getStickyFault_SupplyCurrLimit(true); 4491 } 4492 4493 /** 4494 * Supply current limit occured. 4495 * 4496 * <ul> 4497 * <li> <b>Default Value:</b> False 4498 * </ul> 4499 * 4500 * Default Rates: 4501 * <ul> 4502 * <li> <b>CAN:</b> 4.0 Hz 4503 * </ul> 4504 * <p> 4505 * This refreshes and returns a cached StatusSignal object. 4506 * 4507 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4508 * @return StickyFault_SupplyCurrLimit Status Signal Object 4509 */ 4510 @Override 4511 public StatusSignal<Boolean> getStickyFault_SupplyCurrLimit(boolean refresh) 4512 { 4513 @SuppressWarnings("unchecked") 4514 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_SupplyCurrLimit.value, Boolean.class, val -> val != 0, "StickyFault_SupplyCurrLimit", true, refresh); 4515 return retval; 4516 } 4517 4518 /** 4519 * Using Fused CANcoder feature while unlicensed. Device has fallen 4520 * back to remote CANcoder. 4521 * 4522 * <ul> 4523 * <li> <b>Default Value:</b> False 4524 * </ul> 4525 * 4526 * Default Rates: 4527 * <ul> 4528 * <li> <b>CAN:</b> 4.0 Hz 4529 * </ul> 4530 * <p> 4531 * This refreshes and returns a cached StatusSignal object. 4532 * 4533 * @return Fault_UsingFusedCANcoderWhileUnlicensed Status Signal Object 4534 */ 4535 @Override 4536 public StatusSignal<Boolean> getFault_UsingFusedCANcoderWhileUnlicensed() 4537 { 4538 return getFault_UsingFusedCANcoderWhileUnlicensed(true); 4539 } 4540 4541 /** 4542 * Using Fused CANcoder feature while unlicensed. Device has fallen 4543 * back to remote CANcoder. 4544 * 4545 * <ul> 4546 * <li> <b>Default Value:</b> False 4547 * </ul> 4548 * 4549 * Default Rates: 4550 * <ul> 4551 * <li> <b>CAN:</b> 4.0 Hz 4552 * </ul> 4553 * <p> 4554 * This refreshes and returns a cached StatusSignal object. 4555 * 4556 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4557 * @return Fault_UsingFusedCANcoderWhileUnlicensed Status Signal Object 4558 */ 4559 @Override 4560 public StatusSignal<Boolean> getFault_UsingFusedCANcoderWhileUnlicensed(boolean refresh) 4561 { 4562 @SuppressWarnings("unchecked") 4563 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_UsingFusedCCWhileUnlicensed.value, Boolean.class, val -> val != 0, "Fault_UsingFusedCANcoderWhileUnlicensed", true, refresh); 4564 return retval; 4565 } 4566 4567 /** 4568 * Using Fused CANcoder feature while unlicensed. Device has fallen 4569 * back to remote CANcoder. 4570 * 4571 * <ul> 4572 * <li> <b>Default Value:</b> False 4573 * </ul> 4574 * 4575 * Default Rates: 4576 * <ul> 4577 * <li> <b>CAN:</b> 4.0 Hz 4578 * </ul> 4579 * <p> 4580 * This refreshes and returns a cached StatusSignal object. 4581 * 4582 * @return StickyFault_UsingFusedCANcoderWhileUnlicensed Status Signal Object 4583 */ 4584 @Override 4585 public StatusSignal<Boolean> getStickyFault_UsingFusedCANcoderWhileUnlicensed() 4586 { 4587 return getStickyFault_UsingFusedCANcoderWhileUnlicensed(true); 4588 } 4589 4590 /** 4591 * Using Fused CANcoder feature while unlicensed. Device has fallen 4592 * back to remote CANcoder. 4593 * 4594 * <ul> 4595 * <li> <b>Default Value:</b> False 4596 * </ul> 4597 * 4598 * Default Rates: 4599 * <ul> 4600 * <li> <b>CAN:</b> 4.0 Hz 4601 * </ul> 4602 * <p> 4603 * This refreshes and returns a cached StatusSignal object. 4604 * 4605 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4606 * @return StickyFault_UsingFusedCANcoderWhileUnlicensed Status Signal Object 4607 */ 4608 @Override 4609 public StatusSignal<Boolean> getStickyFault_UsingFusedCANcoderWhileUnlicensed(boolean refresh) 4610 { 4611 @SuppressWarnings("unchecked") 4612 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_UsingFusedCCWhileUnlicensed.value, Boolean.class, val -> val != 0, "StickyFault_UsingFusedCANcoderWhileUnlicensed", true, refresh); 4613 return retval; 4614 } 4615 4616 /** 4617 * Static brake was momentarily disabled due to excessive braking 4618 * current while disabled. 4619 * 4620 * <ul> 4621 * <li> <b>Default Value:</b> False 4622 * </ul> 4623 * 4624 * Default Rates: 4625 * <ul> 4626 * <li> <b>CAN:</b> 4.0 Hz 4627 * </ul> 4628 * <p> 4629 * This refreshes and returns a cached StatusSignal object. 4630 * 4631 * @return Fault_StaticBrakeDisabled Status Signal Object 4632 */ 4633 @Override 4634 public StatusSignal<Boolean> getFault_StaticBrakeDisabled() 4635 { 4636 return getFault_StaticBrakeDisabled(true); 4637 } 4638 4639 /** 4640 * Static brake was momentarily disabled due to excessive braking 4641 * current while disabled. 4642 * 4643 * <ul> 4644 * <li> <b>Default Value:</b> False 4645 * </ul> 4646 * 4647 * Default Rates: 4648 * <ul> 4649 * <li> <b>CAN:</b> 4.0 Hz 4650 * </ul> 4651 * <p> 4652 * This refreshes and returns a cached StatusSignal object. 4653 * 4654 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4655 * @return Fault_StaticBrakeDisabled Status Signal Object 4656 */ 4657 @Override 4658 public StatusSignal<Boolean> getFault_StaticBrakeDisabled(boolean refresh) 4659 { 4660 @SuppressWarnings("unchecked") 4661 var retval = super.lookupStatusSignal(SpnValue.Fault_TALONFX_StaticBrakeDisabled.value, Boolean.class, val -> val != 0, "Fault_StaticBrakeDisabled", true, refresh); 4662 return retval; 4663 } 4664 4665 /** 4666 * Static brake was momentarily disabled due to excessive braking 4667 * current while disabled. 4668 * 4669 * <ul> 4670 * <li> <b>Default Value:</b> False 4671 * </ul> 4672 * 4673 * Default Rates: 4674 * <ul> 4675 * <li> <b>CAN:</b> 4.0 Hz 4676 * </ul> 4677 * <p> 4678 * This refreshes and returns a cached StatusSignal object. 4679 * 4680 * @return StickyFault_StaticBrakeDisabled Status Signal Object 4681 */ 4682 @Override 4683 public StatusSignal<Boolean> getStickyFault_StaticBrakeDisabled() 4684 { 4685 return getStickyFault_StaticBrakeDisabled(true); 4686 } 4687 4688 /** 4689 * Static brake was momentarily disabled due to excessive braking 4690 * current while disabled. 4691 * 4692 * <ul> 4693 * <li> <b>Default Value:</b> False 4694 * </ul> 4695 * 4696 * Default Rates: 4697 * <ul> 4698 * <li> <b>CAN:</b> 4.0 Hz 4699 * </ul> 4700 * <p> 4701 * This refreshes and returns a cached StatusSignal object. 4702 * 4703 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4704 * @return StickyFault_StaticBrakeDisabled Status Signal Object 4705 */ 4706 @Override 4707 public StatusSignal<Boolean> getStickyFault_StaticBrakeDisabled(boolean refresh) 4708 { 4709 @SuppressWarnings("unchecked") 4710 var retval = super.lookupStatusSignal(SpnValue.StickyFault_TALONFX_StaticBrakeDisabled.value, Boolean.class, val -> val != 0, "StickyFault_StaticBrakeDisabled", true, refresh); 4711 return retval; 4712 } 4713 4714 /** 4715 * Closed loop proportional component 4716 * <p> 4717 * The portion of the closed loop output that is the proportional to 4718 * the error. Alternatively, the p-Contribution of the closed loop 4719 * output. 4720 * 4721 * Default Rates: 4722 * <ul> 4723 * <li> <b>CAN 2.0:</b> 4.0 Hz 4724 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4725 * </ul> 4726 * <p> 4727 * This refreshes and returns a cached StatusSignal object. 4728 * 4729 * @return ClosedLoopProportionalOutput Status Signal object 4730 */ 4731 @Override 4732 public StatusSignal<Double> getClosedLoopProportionalOutput() 4733 { 4734 return getClosedLoopProportionalOutput(true); 4735 } 4736 4737 /** 4738 * Closed loop proportional component 4739 * <p> 4740 * The portion of the closed loop output that is the proportional to 4741 * the error. Alternatively, the p-Contribution of the closed loop 4742 * output. 4743 * 4744 * Default Rates: 4745 * <ul> 4746 * <li> <b>CAN 2.0:</b> 4.0 Hz 4747 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4748 * </ul> 4749 * <p> 4750 * This refreshes and returns a cached StatusSignal object. 4751 * 4752 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4753 * @return ClosedLoopProportionalOutput Status Signal object 4754 */ 4755 @Override 4756 public StatusSignal<Double> getClosedLoopProportionalOutput(boolean refresh) 4757 { 4758 MapGenerator<Double> mapFiller = () -> { 4759 var toAdd = new HashMap<Integer, String>(); 4760 toAdd.put(SpnValue.PRO_PIDOutput_ProportionalOutput_DC.value, ""); 4761 toAdd.put(SpnValue.PRO_PIDOutput_ProportionalOutput_V.value, ""); 4762 toAdd.put(SpnValue.PRO_PIDOutput_ProportionalOutput_A.value, ""); 4763 return toAdd; 4764 }; 4765 4766 @SuppressWarnings("unchecked") 4767 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDOutput_ProportionalOutput_DC.value, Double.class, val -> val, mapFiller, "ClosedLoopProportionalOutput", true, refresh); 4768 return retval; 4769 } 4770 4771 /** 4772 * Closed loop integrated component 4773 * <p> 4774 * The portion of the closed loop output that is proportional to the 4775 * integrated error. Alternatively, the i-Contribution of the closed 4776 * loop output. 4777 * 4778 * Default Rates: 4779 * <ul> 4780 * <li> <b>CAN 2.0:</b> 4.0 Hz 4781 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4782 * </ul> 4783 * <p> 4784 * This refreshes and returns a cached StatusSignal object. 4785 * 4786 * @return ClosedLoopIntegratedOutput Status Signal object 4787 */ 4788 @Override 4789 public StatusSignal<Double> getClosedLoopIntegratedOutput() 4790 { 4791 return getClosedLoopIntegratedOutput(true); 4792 } 4793 4794 /** 4795 * Closed loop integrated component 4796 * <p> 4797 * The portion of the closed loop output that is proportional to the 4798 * integrated error. Alternatively, the i-Contribution of the closed 4799 * loop output. 4800 * 4801 * Default Rates: 4802 * <ul> 4803 * <li> <b>CAN 2.0:</b> 4.0 Hz 4804 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4805 * </ul> 4806 * <p> 4807 * This refreshes and returns a cached StatusSignal object. 4808 * 4809 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4810 * @return ClosedLoopIntegratedOutput Status Signal object 4811 */ 4812 @Override 4813 public StatusSignal<Double> getClosedLoopIntegratedOutput(boolean refresh) 4814 { 4815 MapGenerator<Double> mapFiller = () -> { 4816 var toAdd = new HashMap<Integer, String>(); 4817 toAdd.put(SpnValue.PRO_PIDStateEnables_IntegratedAccum_DC.value, ""); 4818 toAdd.put(SpnValue.PRO_PIDStateEnables_IntegratedAccum_V.value, ""); 4819 toAdd.put(SpnValue.PRO_PIDStateEnables_IntegratedAccum_A.value, ""); 4820 return toAdd; 4821 }; 4822 4823 @SuppressWarnings("unchecked") 4824 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDStateEnables_IntegratedAccum_DC.value, Double.class, val -> val, mapFiller, "ClosedLoopIntegratedOutput", true, refresh); 4825 return retval; 4826 } 4827 4828 /** 4829 * Feedforward passed by the user 4830 * <p> 4831 * This is the general feedforward that the user provides for the 4832 * closed loop. 4833 * 4834 * Default Rates: 4835 * <ul> 4836 * <li> <b>CAN 2.0:</b> 4.0 Hz 4837 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4838 * </ul> 4839 * <p> 4840 * This refreshes and returns a cached StatusSignal object. 4841 * 4842 * @return ClosedLoopFeedForward Status Signal object 4843 */ 4844 @Override 4845 public StatusSignal<Double> getClosedLoopFeedForward() 4846 { 4847 return getClosedLoopFeedForward(true); 4848 } 4849 4850 /** 4851 * Feedforward passed by the user 4852 * <p> 4853 * This is the general feedforward that the user provides for the 4854 * closed loop. 4855 * 4856 * Default Rates: 4857 * <ul> 4858 * <li> <b>CAN 2.0:</b> 4.0 Hz 4859 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4860 * </ul> 4861 * <p> 4862 * This refreshes and returns a cached StatusSignal object. 4863 * 4864 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4865 * @return ClosedLoopFeedForward Status Signal object 4866 */ 4867 @Override 4868 public StatusSignal<Double> getClosedLoopFeedForward(boolean refresh) 4869 { 4870 MapGenerator<Double> mapFiller = () -> { 4871 var toAdd = new HashMap<Integer, String>(); 4872 toAdd.put(SpnValue.PRO_PIDStateEnables_FeedForward_DC.value, ""); 4873 toAdd.put(SpnValue.PRO_PIDStateEnables_FeedForward_V.value, ""); 4874 toAdd.put(SpnValue.PRO_PIDStateEnables_FeedForward_A.value, ""); 4875 return toAdd; 4876 }; 4877 4878 @SuppressWarnings("unchecked") 4879 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDStateEnables_FeedForward_DC.value, Double.class, val -> val, mapFiller, "ClosedLoopFeedForward", true, refresh); 4880 return retval; 4881 } 4882 4883 /** 4884 * Closed loop derivative component 4885 * <p> 4886 * The portion of the closed loop output that is the proportional to 4887 * the deriviative the error. Alternatively, the d-Contribution of the 4888 * closed loop output. 4889 * 4890 * Default Rates: 4891 * <ul> 4892 * <li> <b>CAN 2.0:</b> 4.0 Hz 4893 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4894 * </ul> 4895 * <p> 4896 * This refreshes and returns a cached StatusSignal object. 4897 * 4898 * @return ClosedLoopDerivativeOutput Status Signal object 4899 */ 4900 @Override 4901 public StatusSignal<Double> getClosedLoopDerivativeOutput() 4902 { 4903 return getClosedLoopDerivativeOutput(true); 4904 } 4905 4906 /** 4907 * Closed loop derivative component 4908 * <p> 4909 * The portion of the closed loop output that is the proportional to 4910 * the deriviative the error. Alternatively, the d-Contribution of the 4911 * closed loop output. 4912 * 4913 * Default Rates: 4914 * <ul> 4915 * <li> <b>CAN 2.0:</b> 4.0 Hz 4916 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4917 * </ul> 4918 * <p> 4919 * This refreshes and returns a cached StatusSignal object. 4920 * 4921 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4922 * @return ClosedLoopDerivativeOutput Status Signal object 4923 */ 4924 @Override 4925 public StatusSignal<Double> getClosedLoopDerivativeOutput(boolean refresh) 4926 { 4927 MapGenerator<Double> mapFiller = () -> { 4928 var toAdd = new HashMap<Integer, String>(); 4929 toAdd.put(SpnValue.PRO_PIDOutput_DerivativeOutput_DC.value, ""); 4930 toAdd.put(SpnValue.PRO_PIDOutput_DerivativeOutput_V.value, ""); 4931 toAdd.put(SpnValue.PRO_PIDOutput_DerivativeOutput_A.value, ""); 4932 return toAdd; 4933 }; 4934 4935 @SuppressWarnings("unchecked") 4936 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDOutput_DerivativeOutput_DC.value, Double.class, val -> val, mapFiller, "ClosedLoopDerivativeOutput", true, refresh); 4937 return retval; 4938 } 4939 4940 /** 4941 * Closed loop total output 4942 * <p> 4943 * The total output of the closed loop output. 4944 * 4945 * Default Rates: 4946 * <ul> 4947 * <li> <b>CAN 2.0:</b> 4.0 Hz 4948 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4949 * </ul> 4950 * <p> 4951 * This refreshes and returns a cached StatusSignal object. 4952 * 4953 * @return ClosedLoopOutput Status Signal object 4954 */ 4955 @Override 4956 public StatusSignal<Double> getClosedLoopOutput() 4957 { 4958 return getClosedLoopOutput(true); 4959 } 4960 4961 /** 4962 * Closed loop total output 4963 * <p> 4964 * The total output of the closed loop output. 4965 * 4966 * Default Rates: 4967 * <ul> 4968 * <li> <b>CAN 2.0:</b> 4.0 Hz 4969 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 4970 * </ul> 4971 * <p> 4972 * This refreshes and returns a cached StatusSignal object. 4973 * 4974 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 4975 * @return ClosedLoopOutput Status Signal object 4976 */ 4977 @Override 4978 public StatusSignal<Double> getClosedLoopOutput(boolean refresh) 4979 { 4980 MapGenerator<Double> mapFiller = () -> { 4981 var toAdd = new HashMap<Integer, String>(); 4982 toAdd.put(SpnValue.PRO_PIDOutput_Output_DC.value, ""); 4983 toAdd.put(SpnValue.PRO_PIDOutput_Output_V.value, ""); 4984 toAdd.put(SpnValue.PRO_PIDOutput_Output_A.value, ""); 4985 return toAdd; 4986 }; 4987 4988 @SuppressWarnings("unchecked") 4989 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDOutput_Output_DC.value, Double.class, val -> val, mapFiller, "ClosedLoopOutput", true, refresh); 4990 return retval; 4991 } 4992 4993 /** 4994 * Value that the closed loop is targeting 4995 * <p> 4996 * This is the value that the closed loop PID controller targets. 4997 * 4998 * Default Rates: 4999 * <ul> 5000 * <li> <b>CAN 2.0:</b> 4.0 Hz 5001 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5002 * </ul> 5003 * <p> 5004 * This refreshes and returns a cached StatusSignal object. 5005 * 5006 * @return ClosedLoopReference Status Signal object 5007 */ 5008 @Override 5009 public StatusSignal<Double> getClosedLoopReference() 5010 { 5011 return getClosedLoopReference(true); 5012 } 5013 5014 /** 5015 * Value that the closed loop is targeting 5016 * <p> 5017 * This is the value that the closed loop PID controller targets. 5018 * 5019 * Default Rates: 5020 * <ul> 5021 * <li> <b>CAN 2.0:</b> 4.0 Hz 5022 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5023 * </ul> 5024 * <p> 5025 * This refreshes and returns a cached StatusSignal object. 5026 * 5027 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5028 * @return ClosedLoopReference Status Signal object 5029 */ 5030 @Override 5031 public StatusSignal<Double> getClosedLoopReference(boolean refresh) 5032 { 5033 MapGenerator<Double> mapFiller = () -> { 5034 var toAdd = new HashMap<Integer, String>(); 5035 toAdd.put(SpnValue.PRO_PIDRefPIDErr_PIDRef_Position.value, ""); 5036 toAdd.put(SpnValue.PRO_PIDRefPIDErr_PIDRef_Velocity.value, ""); 5037 return toAdd; 5038 }; 5039 5040 @SuppressWarnings("unchecked") 5041 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDRefPIDErr_PIDRef_Position.value, Double.class, val -> val, mapFiller, "ClosedLoopReference", true, refresh); 5042 return retval; 5043 } 5044 5045 /** 5046 * Derivative of the target that the closed loop is targeting 5047 * <p> 5048 * This is the change in the closed loop reference. This may be used 5049 * in the feed-forward calculation, the derivative-error, or in 5050 * application of the signage for kS. Typically, this represents the 5051 * target velocity during Motion Magic®. 5052 * 5053 * Default Rates: 5054 * <ul> 5055 * <li> <b>CAN 2.0:</b> 4.0 Hz 5056 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5057 * </ul> 5058 * <p> 5059 * This refreshes and returns a cached StatusSignal object. 5060 * 5061 * @return ClosedLoopReferenceSlope Status Signal object 5062 */ 5063 @Override 5064 public StatusSignal<Double> getClosedLoopReferenceSlope() 5065 { 5066 return getClosedLoopReferenceSlope(true); 5067 } 5068 5069 /** 5070 * Derivative of the target that the closed loop is targeting 5071 * <p> 5072 * This is the change in the closed loop reference. This may be used 5073 * in the feed-forward calculation, the derivative-error, or in 5074 * application of the signage for kS. Typically, this represents the 5075 * target velocity during Motion Magic®. 5076 * 5077 * Default Rates: 5078 * <ul> 5079 * <li> <b>CAN 2.0:</b> 4.0 Hz 5080 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5081 * </ul> 5082 * <p> 5083 * This refreshes and returns a cached StatusSignal object. 5084 * 5085 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5086 * @return ClosedLoopReferenceSlope Status Signal object 5087 */ 5088 @Override 5089 public StatusSignal<Double> getClosedLoopReferenceSlope(boolean refresh) 5090 { 5091 MapGenerator<Double> mapFiller = () -> { 5092 var toAdd = new HashMap<Integer, String>(); 5093 toAdd.put(SpnValue.PRO_PIDRefSlopeECUTime_ReferenceSlope_Position.value, ""); 5094 toAdd.put(SpnValue.PRO_PIDRefSlopeECUTime_ReferenceSlope_Velocity.value, ""); 5095 return toAdd; 5096 }; 5097 5098 @SuppressWarnings("unchecked") 5099 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDRefSlopeECUTime_ReferenceSlope_Position.value, Double.class, val -> val, mapFiller, "ClosedLoopReferenceSlope", true, refresh); 5100 return retval; 5101 } 5102 5103 /** 5104 * The difference between target reference and current measurement 5105 * <p> 5106 * This is the value that is treated as the error in the PID loop. 5107 * 5108 * Default Rates: 5109 * <ul> 5110 * <li> <b>CAN 2.0:</b> 4.0 Hz 5111 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5112 * </ul> 5113 * <p> 5114 * This refreshes and returns a cached StatusSignal object. 5115 * 5116 * @return ClosedLoopError Status Signal object 5117 */ 5118 @Override 5119 public StatusSignal<Double> getClosedLoopError() 5120 { 5121 return getClosedLoopError(true); 5122 } 5123 5124 /** 5125 * The difference between target reference and current measurement 5126 * <p> 5127 * This is the value that is treated as the error in the PID loop. 5128 * 5129 * Default Rates: 5130 * <ul> 5131 * <li> <b>CAN 2.0:</b> 4.0 Hz 5132 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5133 * </ul> 5134 * <p> 5135 * This refreshes and returns a cached StatusSignal object. 5136 * 5137 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5138 * @return ClosedLoopError Status Signal object 5139 */ 5140 @Override 5141 public StatusSignal<Double> getClosedLoopError(boolean refresh) 5142 { 5143 MapGenerator<Double> mapFiller = () -> { 5144 var toAdd = new HashMap<Integer, String>(); 5145 toAdd.put(SpnValue.PRO_PIDRefPIDErr_PIDErr_Position.value, ""); 5146 toAdd.put(SpnValue.PRO_PIDRefPIDErr_PIDErr_Velocity.value, ""); 5147 return toAdd; 5148 }; 5149 5150 @SuppressWarnings("unchecked") 5151 var retval = super.lookupStatusSignal(SpnValue.PRO_PIDRefPIDErr_PIDErr_Position.value, Double.class, val -> val, mapFiller, "ClosedLoopError", true, refresh); 5152 return retval; 5153 } 5154 5155 /** 5156 * The calculated motor output for differential followers. 5157 * <p> 5158 * This is a torque request when using the TorqueCurrentFOC control 5159 * output type, and a duty cycle in all other control types. 5160 * 5161 * Default Rates: 5162 * <ul> 5163 * <li> <b>CAN 2.0:</b> 100.0 Hz 5164 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5165 * </ul> 5166 * <p> 5167 * This refreshes and returns a cached StatusSignal object. 5168 * 5169 * @return DifferentialOutput Status Signal object 5170 */ 5171 @Override 5172 public StatusSignal<Double> getDifferentialOutput() 5173 { 5174 return getDifferentialOutput(true); 5175 } 5176 5177 /** 5178 * The calculated motor output for differential followers. 5179 * <p> 5180 * This is a torque request when using the TorqueCurrentFOC control 5181 * output type, and a duty cycle in all other control types. 5182 * 5183 * Default Rates: 5184 * <ul> 5185 * <li> <b>CAN 2.0:</b> 100.0 Hz 5186 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5187 * </ul> 5188 * <p> 5189 * This refreshes and returns a cached StatusSignal object. 5190 * 5191 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5192 * @return DifferentialOutput Status Signal object 5193 */ 5194 @Override 5195 public StatusSignal<Double> getDifferentialOutput(boolean refresh) 5196 { 5197 MapGenerator<Double> mapFiller = () -> { 5198 var toAdd = new HashMap<Integer, String>(); 5199 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_DutyCycle.value, ""); 5200 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_TorqueCurrent.value, ""); 5201 return toAdd; 5202 }; 5203 5204 @SuppressWarnings("unchecked") 5205 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_PIDState_Diff_DutyCycle.value, Double.class, val -> val, mapFiller, "DifferentialOutput", true, refresh); 5206 return retval; 5207 } 5208 5209 /** 5210 * Differential closed loop proportional component 5211 * <p> 5212 * The portion of the differential closed loop output that is the 5213 * proportional to the error. Alternatively, the p-Contribution of the 5214 * closed loop output. 5215 * 5216 * Default Rates: 5217 * <ul> 5218 * <li> <b>CAN 2.0:</b> 4.0 Hz 5219 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5220 * </ul> 5221 * <p> 5222 * This refreshes and returns a cached StatusSignal object. 5223 * 5224 * @return DifferentialClosedLoopProportionalOutput Status Signal object 5225 */ 5226 @Override 5227 public StatusSignal<Double> getDifferentialClosedLoopProportionalOutput() 5228 { 5229 return getDifferentialClosedLoopProportionalOutput(true); 5230 } 5231 5232 /** 5233 * Differential closed loop proportional component 5234 * <p> 5235 * The portion of the differential closed loop output that is the 5236 * proportional to the error. Alternatively, the p-Contribution of the 5237 * closed loop output. 5238 * 5239 * Default Rates: 5240 * <ul> 5241 * <li> <b>CAN 2.0:</b> 4.0 Hz 5242 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5243 * </ul> 5244 * <p> 5245 * This refreshes and returns a cached StatusSignal object. 5246 * 5247 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5248 * @return DifferentialClosedLoopProportionalOutput Status Signal object 5249 */ 5250 @Override 5251 public StatusSignal<Double> getDifferentialClosedLoopProportionalOutput(boolean refresh) 5252 { 5253 MapGenerator<Double> mapFiller = () -> { 5254 var toAdd = new HashMap<Integer, String>(); 5255 toAdd.put(SpnValue.PRO_DiffPIDOutput_ProportionalOutput_DC.value, ""); 5256 toAdd.put(SpnValue.PRO_DiffPIDOutput_ProportionalOutput_V.value, ""); 5257 toAdd.put(SpnValue.PRO_DiffPIDOutput_ProportionalOutput_A.value, ""); 5258 return toAdd; 5259 }; 5260 5261 @SuppressWarnings("unchecked") 5262 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPIDOutput_ProportionalOutput_DC.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopProportionalOutput", true, refresh); 5263 return retval; 5264 } 5265 5266 /** 5267 * Differential closed loop integrated component 5268 * <p> 5269 * The portion of the differential closed loop output that is 5270 * proportional to the integrated error. Alternatively, the 5271 * i-Contribution of the closed loop output. 5272 * 5273 * Default Rates: 5274 * <ul> 5275 * <li> <b>CAN 2.0:</b> 100.0 Hz 5276 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5277 * </ul> 5278 * <p> 5279 * This refreshes and returns a cached StatusSignal object. 5280 * 5281 * @return DifferentialClosedLoopIntegratedOutput Status Signal object 5282 */ 5283 @Override 5284 public StatusSignal<Double> getDifferentialClosedLoopIntegratedOutput() 5285 { 5286 return getDifferentialClosedLoopIntegratedOutput(true); 5287 } 5288 5289 /** 5290 * Differential closed loop integrated component 5291 * <p> 5292 * The portion of the differential closed loop output that is 5293 * proportional to the integrated error. Alternatively, the 5294 * i-Contribution of the closed loop output. 5295 * 5296 * Default Rates: 5297 * <ul> 5298 * <li> <b>CAN 2.0:</b> 100.0 Hz 5299 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5300 * </ul> 5301 * <p> 5302 * This refreshes and returns a cached StatusSignal object. 5303 * 5304 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5305 * @return DifferentialClosedLoopIntegratedOutput Status Signal object 5306 */ 5307 @Override 5308 public StatusSignal<Double> getDifferentialClosedLoopIntegratedOutput(boolean refresh) 5309 { 5310 MapGenerator<Double> mapFiller = () -> { 5311 var toAdd = new HashMap<Integer, String>(); 5312 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_IntegratedAccum_DC.value, ""); 5313 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_IntegratedAccum_V.value, ""); 5314 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_IntegratedAccum_A.value, ""); 5315 return toAdd; 5316 }; 5317 5318 @SuppressWarnings("unchecked") 5319 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_PIDState_Diff_IntegratedAccum_DC.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopIntegratedOutput", true, refresh); 5320 return retval; 5321 } 5322 5323 /** 5324 * Differential Feedforward passed by the user 5325 * <p> 5326 * This is the general feedforward that the user provides for the 5327 * differential closed loop. 5328 * 5329 * Default Rates: 5330 * <ul> 5331 * <li> <b>CAN 2.0:</b> 100.0 Hz 5332 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5333 * </ul> 5334 * <p> 5335 * This refreshes and returns a cached StatusSignal object. 5336 * 5337 * @return DifferentialClosedLoopFeedForward Status Signal object 5338 */ 5339 @Override 5340 public StatusSignal<Double> getDifferentialClosedLoopFeedForward() 5341 { 5342 return getDifferentialClosedLoopFeedForward(true); 5343 } 5344 5345 /** 5346 * Differential Feedforward passed by the user 5347 * <p> 5348 * This is the general feedforward that the user provides for the 5349 * differential closed loop. 5350 * 5351 * Default Rates: 5352 * <ul> 5353 * <li> <b>CAN 2.0:</b> 100.0 Hz 5354 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5355 * </ul> 5356 * <p> 5357 * This refreshes and returns a cached StatusSignal object. 5358 * 5359 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5360 * @return DifferentialClosedLoopFeedForward Status Signal object 5361 */ 5362 @Override 5363 public StatusSignal<Double> getDifferentialClosedLoopFeedForward(boolean refresh) 5364 { 5365 MapGenerator<Double> mapFiller = () -> { 5366 var toAdd = new HashMap<Integer, String>(); 5367 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_FeedForward_DC.value, ""); 5368 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_FeedForward_V.value, ""); 5369 toAdd.put(SpnValue.PRO_MotorOutput_PIDState_Diff_FeedForward_A.value, ""); 5370 return toAdd; 5371 }; 5372 5373 @SuppressWarnings("unchecked") 5374 var retval = super.lookupStatusSignal(SpnValue.PRO_MotorOutput_PIDState_Diff_FeedForward_DC.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopFeedForward", true, refresh); 5375 return retval; 5376 } 5377 5378 /** 5379 * Differential closed loop derivative component 5380 * <p> 5381 * The portion of the differential closed loop output that is the 5382 * proportional to the deriviative the error. Alternatively, the 5383 * d-Contribution of the closed loop output. 5384 * 5385 * Default Rates: 5386 * <ul> 5387 * <li> <b>CAN 2.0:</b> 4.0 Hz 5388 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5389 * </ul> 5390 * <p> 5391 * This refreshes and returns a cached StatusSignal object. 5392 * 5393 * @return DifferentialClosedLoopDerivativeOutput Status Signal object 5394 */ 5395 @Override 5396 public StatusSignal<Double> getDifferentialClosedLoopDerivativeOutput() 5397 { 5398 return getDifferentialClosedLoopDerivativeOutput(true); 5399 } 5400 5401 /** 5402 * Differential closed loop derivative component 5403 * <p> 5404 * The portion of the differential closed loop output that is the 5405 * proportional to the deriviative the error. Alternatively, the 5406 * d-Contribution of the closed loop output. 5407 * 5408 * Default Rates: 5409 * <ul> 5410 * <li> <b>CAN 2.0:</b> 4.0 Hz 5411 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5412 * </ul> 5413 * <p> 5414 * This refreshes and returns a cached StatusSignal object. 5415 * 5416 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5417 * @return DifferentialClosedLoopDerivativeOutput Status Signal object 5418 */ 5419 @Override 5420 public StatusSignal<Double> getDifferentialClosedLoopDerivativeOutput(boolean refresh) 5421 { 5422 MapGenerator<Double> mapFiller = () -> { 5423 var toAdd = new HashMap<Integer, String>(); 5424 toAdd.put(SpnValue.PRO_DiffPIDOutput_DerivativeOutput_DC.value, ""); 5425 toAdd.put(SpnValue.PRO_DiffPIDOutput_DerivativeOutput_V.value, ""); 5426 toAdd.put(SpnValue.PRO_DiffPIDOutput_DerivativeOutput_A.value, ""); 5427 return toAdd; 5428 }; 5429 5430 @SuppressWarnings("unchecked") 5431 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPIDOutput_DerivativeOutput_DC.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopDerivativeOutput", true, refresh); 5432 return retval; 5433 } 5434 5435 /** 5436 * Differential closed loop total output 5437 * <p> 5438 * The total output of the differential closed loop output. 5439 * 5440 * Default Rates: 5441 * <ul> 5442 * <li> <b>CAN 2.0:</b> 4.0 Hz 5443 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5444 * </ul> 5445 * <p> 5446 * This refreshes and returns a cached StatusSignal object. 5447 * 5448 * @return DifferentialClosedLoopOutput Status Signal object 5449 */ 5450 @Override 5451 public StatusSignal<Double> getDifferentialClosedLoopOutput() 5452 { 5453 return getDifferentialClosedLoopOutput(true); 5454 } 5455 5456 /** 5457 * Differential closed loop total output 5458 * <p> 5459 * The total output of the differential closed loop output. 5460 * 5461 * Default Rates: 5462 * <ul> 5463 * <li> <b>CAN 2.0:</b> 4.0 Hz 5464 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5465 * </ul> 5466 * <p> 5467 * This refreshes and returns a cached StatusSignal object. 5468 * 5469 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5470 * @return DifferentialClosedLoopOutput Status Signal object 5471 */ 5472 @Override 5473 public StatusSignal<Double> getDifferentialClosedLoopOutput(boolean refresh) 5474 { 5475 MapGenerator<Double> mapFiller = () -> { 5476 var toAdd = new HashMap<Integer, String>(); 5477 toAdd.put(SpnValue.PRO_DiffPIDOutput_Output_DC.value, ""); 5478 toAdd.put(SpnValue.PRO_DiffPIDOutput_Output_V.value, ""); 5479 toAdd.put(SpnValue.PRO_DiffPIDOutput_Output_A.value, ""); 5480 return toAdd; 5481 }; 5482 5483 @SuppressWarnings("unchecked") 5484 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPIDOutput_Output_DC.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopOutput", true, refresh); 5485 return retval; 5486 } 5487 5488 /** 5489 * Value that the differential closed loop is targeting 5490 * <p> 5491 * This is the value that the differential closed loop PID controller 5492 * targets. 5493 * 5494 * Default Rates: 5495 * <ul> 5496 * <li> <b>CAN 2.0:</b> 4.0 Hz 5497 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5498 * </ul> 5499 * <p> 5500 * This refreshes and returns a cached StatusSignal object. 5501 * 5502 * @return DifferentialClosedLoopReference Status Signal object 5503 */ 5504 @Override 5505 public StatusSignal<Double> getDifferentialClosedLoopReference() 5506 { 5507 return getDifferentialClosedLoopReference(true); 5508 } 5509 5510 /** 5511 * Value that the differential closed loop is targeting 5512 * <p> 5513 * This is the value that the differential closed loop PID controller 5514 * targets. 5515 * 5516 * Default Rates: 5517 * <ul> 5518 * <li> <b>CAN 2.0:</b> 4.0 Hz 5519 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5520 * </ul> 5521 * <p> 5522 * This refreshes and returns a cached StatusSignal object. 5523 * 5524 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5525 * @return DifferentialClosedLoopReference Status Signal object 5526 */ 5527 @Override 5528 public StatusSignal<Double> getDifferentialClosedLoopReference(boolean refresh) 5529 { 5530 MapGenerator<Double> mapFiller = () -> { 5531 var toAdd = new HashMap<Integer, String>(); 5532 toAdd.put(SpnValue.PRO_DiffPIDRefPIDErr_PIDRef_Position.value, ""); 5533 toAdd.put(SpnValue.PRO_DiffPIDRefPIDErr_PIDRef_Velocity.value, ""); 5534 return toAdd; 5535 }; 5536 5537 @SuppressWarnings("unchecked") 5538 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPIDRefPIDErr_PIDRef_Position.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopReference", true, refresh); 5539 return retval; 5540 } 5541 5542 /** 5543 * Derivative of the target that the differential closed loop is 5544 * targeting 5545 * <p> 5546 * This is the change in the closed loop reference. This may be used 5547 * in the feed-forward calculation, the derivative-error, or in 5548 * application of the signage for kS. Typically, this represents the 5549 * target velocity during Motion Magic®. 5550 * 5551 * Default Rates: 5552 * <ul> 5553 * <li> <b>CAN 2.0:</b> 4.0 Hz 5554 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5555 * </ul> 5556 * <p> 5557 * This refreshes and returns a cached StatusSignal object. 5558 * 5559 * @return DifferentialClosedLoopReferenceSlope Status Signal object 5560 */ 5561 @Override 5562 public StatusSignal<Double> getDifferentialClosedLoopReferenceSlope() 5563 { 5564 return getDifferentialClosedLoopReferenceSlope(true); 5565 } 5566 5567 /** 5568 * Derivative of the target that the differential closed loop is 5569 * targeting 5570 * <p> 5571 * This is the change in the closed loop reference. This may be used 5572 * in the feed-forward calculation, the derivative-error, or in 5573 * application of the signage for kS. Typically, this represents the 5574 * target velocity during Motion Magic®. 5575 * 5576 * Default Rates: 5577 * <ul> 5578 * <li> <b>CAN 2.0:</b> 4.0 Hz 5579 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5580 * </ul> 5581 * <p> 5582 * This refreshes and returns a cached StatusSignal object. 5583 * 5584 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5585 * @return DifferentialClosedLoopReferenceSlope Status Signal object 5586 */ 5587 @Override 5588 public StatusSignal<Double> getDifferentialClosedLoopReferenceSlope(boolean refresh) 5589 { 5590 MapGenerator<Double> mapFiller = () -> { 5591 var toAdd = new HashMap<Integer, String>(); 5592 toAdd.put(SpnValue.PRO_DiffPIDRefSlopeECUTime_ReferenceSlope_Position.value, ""); 5593 toAdd.put(SpnValue.PRO_DiffPIDRefSlopeECUTime_ReferenceSlope_Velocity.value, ""); 5594 return toAdd; 5595 }; 5596 5597 @SuppressWarnings("unchecked") 5598 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPIDRefSlopeECUTime_ReferenceSlope_Position.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopReferenceSlope", true, refresh); 5599 return retval; 5600 } 5601 5602 /** 5603 * The difference between target differential reference and current 5604 * measurement 5605 * <p> 5606 * This is the value that is treated as the error in the differential 5607 * PID loop. 5608 * 5609 * Default Rates: 5610 * <ul> 5611 * <li> <b>CAN 2.0:</b> 4.0 Hz 5612 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5613 * </ul> 5614 * <p> 5615 * This refreshes and returns a cached StatusSignal object. 5616 * 5617 * @return DifferentialClosedLoopError Status Signal object 5618 */ 5619 @Override 5620 public StatusSignal<Double> getDifferentialClosedLoopError() 5621 { 5622 return getDifferentialClosedLoopError(true); 5623 } 5624 5625 /** 5626 * The difference between target differential reference and current 5627 * measurement 5628 * <p> 5629 * This is the value that is treated as the error in the differential 5630 * PID loop. 5631 * 5632 * Default Rates: 5633 * <ul> 5634 * <li> <b>CAN 2.0:</b> 4.0 Hz 5635 * <li> <b>CAN FD:</b> 100.0 Hz (TimeSynced with Pro) 5636 * </ul> 5637 * <p> 5638 * This refreshes and returns a cached StatusSignal object. 5639 * 5640 * @param refresh Whether to refresh the StatusSignal before returning it; defaults to true 5641 * @return DifferentialClosedLoopError Status Signal object 5642 */ 5643 @Override 5644 public StatusSignal<Double> getDifferentialClosedLoopError(boolean refresh) 5645 { 5646 MapGenerator<Double> mapFiller = () -> { 5647 var toAdd = new HashMap<Integer, String>(); 5648 toAdd.put(SpnValue.PRO_DiffPIDRefPIDErr_PIDErr_Position.value, ""); 5649 toAdd.put(SpnValue.PRO_DiffPIDRefPIDErr_PIDErr_Velocity.value, ""); 5650 return toAdd; 5651 }; 5652 5653 @SuppressWarnings("unchecked") 5654 var retval = super.lookupStatusSignal(SpnValue.PRO_DiffPIDRefPIDErr_PIDErr_Position.value, Double.class, val -> val, mapFiller, "DifferentialClosedLoopError", true, refresh); 5655 return retval; 5656 } 5657 5658 5659 /** 5660 * Request a specified motor duty cycle. 5661 * <p> 5662 * This control mode will output a proportion of the supplied voltage 5663 * which is supplied by the user. 5664 * <ul> 5665 * <li> <b>DutyCycleOut Parameters:</b> 5666 * <ul> 5667 * <li> <b>Output:</b> Proportion of supply voltage to apply in fractional 5668 * units between -1 and +1 5669 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 5670 * Pro), which increases peak power by ~15% on supported 5671 * devices (see {@link SupportsFOC}). Set to false to 5672 * use trapezoidal commutation. 5673 * <p> 5674 * FOC improves motor performance by leveraging torque 5675 * (current) control. However, this may be inconvenient 5676 * for applications that require specifying duty cycle 5677 * or voltage. CTR-Electronics has developed a hybrid 5678 * method that combines the performances gains of FOC 5679 * while still allowing applications to provide duty 5680 * cycle or voltage demand. This not to be confused 5681 * with simple sinusoidal control or phase voltage 5682 * control which lacks the performance gains. 5683 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 5684 * when output is zero (or within 5685 * deadband). Set to false to use the 5686 * NeutralMode configuration setting 5687 * (default). This flag exists to provide 5688 * the fundamental behavior of this 5689 * control when output is zero, which is 5690 * to provide 0V to the motor. 5691 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 5692 * allows users to use other limit switch 5693 * sensors connected to robot controller. This 5694 * also allows use of active sensors that 5695 * require external power. 5696 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 5697 * allows users to use other limit switch 5698 * sensors connected to robot controller. This 5699 * also allows use of active sensors that 5700 * require external power. 5701 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 5702 * switches and the LimitForwardMotion and 5703 * LimitReverseMotion parameters, instead 5704 * allowing motion. 5705 * <p> 5706 * This can be useful on mechanisms such as 5707 * an intake/feeder, where a limit switch 5708 * stops motion while intaking but should be 5709 * ignored when feeding to a shooter. 5710 * <p> 5711 * The hardware limit faults and 5712 * Forward/ReverseLimit signals will still 5713 * report the values of the limit switches 5714 * regardless of this parameter. 5715 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 5716 * until a timesync boundary (requires Phoenix Pro and 5717 * CANivore). This eliminates the impact of 5718 * nondeterministic network delays in exchange for a 5719 * larger but deterministic control latency. 5720 * <p> 5721 * This requires setting the ControlTimesyncFreqHz 5722 * config in MotorOutputConfigs. Additionally, when 5723 * this is enabled, the UpdateFreqHz of this request 5724 * should be set to 0 Hz. 5725 * </ul> 5726 * </ul> 5727 * 5728 * @param request Control object to request of the device 5729 * @return Code response of the request 5730 */ 5731 @Override 5732 public StatusCode setControl(DutyCycleOut request) 5733 { 5734 return setControlPrivate(request); 5735 } 5736 5737 /** 5738 * Request a specified motor current (field oriented control). 5739 * <p> 5740 * This control request will drive the motor to the requested motor 5741 * (stator) current value. This leverages field oriented control 5742 * (FOC), which means greater peak power than what is documented. 5743 * This scales to torque based on Motor's kT constant. 5744 * <ul> 5745 * <li> <b>TorqueCurrentFOC Parameters:</b> 5746 * <ul> 5747 * <li> <b>Output:</b> Amount of motor current in Amperes 5748 * <li> <b>MaxAbsDutyCycle:</b> The maximum absolute motor output that can be 5749 * applied, which effectively limits the velocity. 5750 * For example, 0.50 means no more than 50% output 5751 * in either direction. This is useful for 5752 * preventing the motor from spinning to its 5753 * terminal velocity when there is no external 5754 * torque applied unto the rotor. Note this is 5755 * absolute maximum, so the value should be 5756 * between zero and one. 5757 * <li> <b>Deadband:</b> Deadband in Amperes. If torque request is within 5758 * deadband, the bridge output is neutral. If deadband is 5759 * set to zero then there is effectively no deadband. 5760 * Note if deadband is zero, a free spinning motor will 5761 * spin for quite a while as the firmware attempts to 5762 * hold the motor's bemf. If user expects motor to cease 5763 * spinning quickly with a demand of zero, we recommend a 5764 * deadband of one Ampere. This value will be converted 5765 * to an integral value of amps. 5766 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 5767 * output is zero (or within deadband). 5768 * Set to false to use the NeutralMode 5769 * configuration setting (default). This 5770 * flag exists to provide the fundamental 5771 * behavior of this control when output is 5772 * zero, which is to provide 0A (zero 5773 * torque). 5774 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 5775 * allows users to use other limit switch 5776 * sensors connected to robot controller. This 5777 * also allows use of active sensors that 5778 * require external power. 5779 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 5780 * allows users to use other limit switch 5781 * sensors connected to robot controller. This 5782 * also allows use of active sensors that 5783 * require external power. 5784 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 5785 * switches and the LimitForwardMotion and 5786 * LimitReverseMotion parameters, instead 5787 * allowing motion. 5788 * <p> 5789 * This can be useful on mechanisms such as 5790 * an intake/feeder, where a limit switch 5791 * stops motion while intaking but should be 5792 * ignored when feeding to a shooter. 5793 * <p> 5794 * The hardware limit faults and 5795 * Forward/ReverseLimit signals will still 5796 * report the values of the limit switches 5797 * regardless of this parameter. 5798 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 5799 * until a timesync boundary (requires Phoenix Pro and 5800 * CANivore). This eliminates the impact of 5801 * nondeterministic network delays in exchange for a 5802 * larger but deterministic control latency. 5803 * <p> 5804 * This requires setting the ControlTimesyncFreqHz 5805 * config in MotorOutputConfigs. Additionally, when 5806 * this is enabled, the UpdateFreqHz of this request 5807 * should be set to 0 Hz. 5808 * </ul> 5809 * </ul> 5810 * 5811 * @param request Control object to request of the device 5812 * @return Code response of the request 5813 */ 5814 @Override 5815 public StatusCode setControl(TorqueCurrentFOC request) 5816 { 5817 return setControlPrivate(request); 5818 } 5819 5820 /** 5821 * Request a specified voltage. 5822 * <p> 5823 * This control mode will attempt to apply the specified voltage to 5824 * the motor. If the supply voltage is below the requested voltage, 5825 * the motor controller will output the supply voltage. 5826 * <ul> 5827 * <li> <b>VoltageOut Parameters:</b> 5828 * <ul> 5829 * <li> <b>Output:</b> Voltage to attempt to drive at 5830 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 5831 * Pro), which increases peak power by ~15% on supported 5832 * devices (see {@link SupportsFOC}). Set to false to 5833 * use trapezoidal commutation. 5834 * <p> 5835 * FOC improves motor performance by leveraging torque 5836 * (current) control. However, this may be inconvenient 5837 * for applications that require specifying duty cycle 5838 * or voltage. CTR-Electronics has developed a hybrid 5839 * method that combines the performances gains of FOC 5840 * while still allowing applications to provide duty 5841 * cycle or voltage demand. This not to be confused 5842 * with simple sinusoidal control or phase voltage 5843 * control which lacks the performance gains. 5844 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 5845 * when output is zero (or within 5846 * deadband). Set to false to use the 5847 * NeutralMode configuration setting 5848 * (default). This flag exists to provide 5849 * the fundamental behavior of this 5850 * control when output is zero, which is 5851 * to provide 0V to the motor. 5852 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 5853 * allows users to use other limit switch 5854 * sensors connected to robot controller. This 5855 * also allows use of active sensors that 5856 * require external power. 5857 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 5858 * allows users to use other limit switch 5859 * sensors connected to robot controller. This 5860 * also allows use of active sensors that 5861 * require external power. 5862 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 5863 * switches and the LimitForwardMotion and 5864 * LimitReverseMotion parameters, instead 5865 * allowing motion. 5866 * <p> 5867 * This can be useful on mechanisms such as 5868 * an intake/feeder, where a limit switch 5869 * stops motion while intaking but should be 5870 * ignored when feeding to a shooter. 5871 * <p> 5872 * The hardware limit faults and 5873 * Forward/ReverseLimit signals will still 5874 * report the values of the limit switches 5875 * regardless of this parameter. 5876 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 5877 * until a timesync boundary (requires Phoenix Pro and 5878 * CANivore). This eliminates the impact of 5879 * nondeterministic network delays in exchange for a 5880 * larger but deterministic control latency. 5881 * <p> 5882 * This requires setting the ControlTimesyncFreqHz 5883 * config in MotorOutputConfigs. Additionally, when 5884 * this is enabled, the UpdateFreqHz of this request 5885 * should be set to 0 Hz. 5886 * </ul> 5887 * </ul> 5888 * 5889 * @param request Control object to request of the device 5890 * @return Code response of the request 5891 */ 5892 @Override 5893 public StatusCode setControl(VoltageOut request) 5894 { 5895 return setControlPrivate(request); 5896 } 5897 5898 /** 5899 * Request PID to target position with duty cycle feedforward. 5900 * <p> 5901 * This control mode will set the motor's position setpoint to the 5902 * position specified by the user. In addition, it will apply an 5903 * additional duty cycle as an arbitrary feedforward value. 5904 * <ul> 5905 * <li> <b>PositionDutyCycle Parameters:</b> 5906 * <ul> 5907 * <li> <b>Position:</b> Position to drive toward in rotations. 5908 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. This 5909 * is typically used for motion profiles generated by the 5910 * robot program. 5911 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 5912 * Pro), which increases peak power by ~15% on supported 5913 * devices (see {@link SupportsFOC}). Set to false to 5914 * use trapezoidal commutation. 5915 * <p> 5916 * FOC improves motor performance by leveraging torque 5917 * (current) control. However, this may be inconvenient 5918 * for applications that require specifying duty cycle 5919 * or voltage. CTR-Electronics has developed a hybrid 5920 * method that combines the performances gains of FOC 5921 * while still allowing applications to provide duty 5922 * cycle or voltage demand. This not to be confused 5923 * with simple sinusoidal control or phase voltage 5924 * control which lacks the performance gains. 5925 * <li> <b>FeedForward:</b> Feedforward to apply in fractional units between -1 5926 * and +1. 5927 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 5928 * the configuration api to set the gain values for the 5929 * selected slot before enabling this feature. Slot must be 5930 * within [0,2]. 5931 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 5932 * when output is zero (or within 5933 * deadband). Set to false to use the 5934 * NeutralMode configuration setting 5935 * (default). This flag exists to provide 5936 * the fundamental behavior of this 5937 * control when output is zero, which is 5938 * to provide 0V to the motor. 5939 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 5940 * allows users to use other limit switch 5941 * sensors connected to robot controller. This 5942 * also allows use of active sensors that 5943 * require external power. 5944 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 5945 * allows users to use other limit switch 5946 * sensors connected to robot controller. This 5947 * also allows use of active sensors that 5948 * require external power. 5949 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 5950 * switches and the LimitForwardMotion and 5951 * LimitReverseMotion parameters, instead 5952 * allowing motion. 5953 * <p> 5954 * This can be useful on mechanisms such as 5955 * an intake/feeder, where a limit switch 5956 * stops motion while intaking but should be 5957 * ignored when feeding to a shooter. 5958 * <p> 5959 * The hardware limit faults and 5960 * Forward/ReverseLimit signals will still 5961 * report the values of the limit switches 5962 * regardless of this parameter. 5963 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 5964 * until a timesync boundary (requires Phoenix Pro and 5965 * CANivore). This eliminates the impact of 5966 * nondeterministic network delays in exchange for a 5967 * larger but deterministic control latency. 5968 * <p> 5969 * This requires setting the ControlTimesyncFreqHz 5970 * config in MotorOutputConfigs. Additionally, when 5971 * this is enabled, the UpdateFreqHz of this request 5972 * should be set to 0 Hz. 5973 * </ul> 5974 * </ul> 5975 * 5976 * @param request Control object to request of the device 5977 * @return Code response of the request 5978 */ 5979 @Override 5980 public StatusCode setControl(PositionDutyCycle request) 5981 { 5982 return setControlPrivate(request); 5983 } 5984 5985 /** 5986 * Request PID to target position with voltage feedforward 5987 * <p> 5988 * This control mode will set the motor's position setpoint to the 5989 * position specified by the user. In addition, it will apply an 5990 * additional voltage as an arbitrary feedforward value. 5991 * <ul> 5992 * <li> <b>PositionVoltage Parameters:</b> 5993 * <ul> 5994 * <li> <b>Position:</b> Position to drive toward in rotations. 5995 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. This 5996 * is typically used for motion profiles generated by the 5997 * robot program. 5998 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 5999 * Pro), which increases peak power by ~15% on supported 6000 * devices (see {@link SupportsFOC}). Set to false to 6001 * use trapezoidal commutation. 6002 * <p> 6003 * FOC improves motor performance by leveraging torque 6004 * (current) control. However, this may be inconvenient 6005 * for applications that require specifying duty cycle 6006 * or voltage. CTR-Electronics has developed a hybrid 6007 * method that combines the performances gains of FOC 6008 * while still allowing applications to provide duty 6009 * cycle or voltage demand. This not to be confused 6010 * with simple sinusoidal control or phase voltage 6011 * control which lacks the performance gains. 6012 * <li> <b>FeedForward:</b> Feedforward to apply in volts 6013 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6014 * the configuration api to set the gain values for the 6015 * selected slot before enabling this feature. Slot must be 6016 * within [0,2]. 6017 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6018 * when output is zero (or within 6019 * deadband). Set to false to use the 6020 * NeutralMode configuration setting 6021 * (default). This flag exists to provide 6022 * the fundamental behavior of this 6023 * control when output is zero, which is 6024 * to provide 0V to the motor. 6025 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6026 * allows users to use other limit switch 6027 * sensors connected to robot controller. This 6028 * also allows use of active sensors that 6029 * require external power. 6030 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6031 * allows users to use other limit switch 6032 * sensors connected to robot controller. This 6033 * also allows use of active sensors that 6034 * require external power. 6035 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6036 * switches and the LimitForwardMotion and 6037 * LimitReverseMotion parameters, instead 6038 * allowing motion. 6039 * <p> 6040 * This can be useful on mechanisms such as 6041 * an intake/feeder, where a limit switch 6042 * stops motion while intaking but should be 6043 * ignored when feeding to a shooter. 6044 * <p> 6045 * The hardware limit faults and 6046 * Forward/ReverseLimit signals will still 6047 * report the values of the limit switches 6048 * regardless of this parameter. 6049 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6050 * until a timesync boundary (requires Phoenix Pro and 6051 * CANivore). This eliminates the impact of 6052 * nondeterministic network delays in exchange for a 6053 * larger but deterministic control latency. 6054 * <p> 6055 * This requires setting the ControlTimesyncFreqHz 6056 * config in MotorOutputConfigs. Additionally, when 6057 * this is enabled, the UpdateFreqHz of this request 6058 * should be set to 0 Hz. 6059 * </ul> 6060 * </ul> 6061 * 6062 * @param request Control object to request of the device 6063 * @return Code response of the request 6064 */ 6065 @Override 6066 public StatusCode setControl(PositionVoltage request) 6067 { 6068 return setControlPrivate(request); 6069 } 6070 6071 /** 6072 * Request PID to target position with torque current feedforward. 6073 * <p> 6074 * This control mode will set the motor's position setpoint to the 6075 * position specified by the user. In addition, it will apply an 6076 * additional torque current as an arbitrary feedforward value. 6077 * <ul> 6078 * <li> <b>PositionTorqueCurrentFOC Parameters:</b> 6079 * <ul> 6080 * <li> <b>Position:</b> Position to drive toward in rotations. 6081 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. This 6082 * is typically used for motion profiles generated by the 6083 * robot program. 6084 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in Amperes. 6085 * User can use motor's kT to scale Newton-meter to 6086 * Amperes. 6087 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6088 * the configuration api to set the gain values for the 6089 * selected slot before enabling this feature. Slot must be 6090 * within [0,2]. 6091 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 6092 * output is zero (or within deadband). 6093 * Set to false to use the NeutralMode 6094 * configuration setting (default). This 6095 * flag exists to provide the fundamental 6096 * behavior of this control when output is 6097 * zero, which is to provide 0A (zero 6098 * torque). 6099 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6100 * allows users to use other limit switch 6101 * sensors connected to robot controller. This 6102 * also allows use of active sensors that 6103 * require external power. 6104 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6105 * allows users to use other limit switch 6106 * sensors connected to robot controller. This 6107 * also allows use of active sensors that 6108 * require external power. 6109 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6110 * switches and the LimitForwardMotion and 6111 * LimitReverseMotion parameters, instead 6112 * allowing motion. 6113 * <p> 6114 * This can be useful on mechanisms such as 6115 * an intake/feeder, where a limit switch 6116 * stops motion while intaking but should be 6117 * ignored when feeding to a shooter. 6118 * <p> 6119 * The hardware limit faults and 6120 * Forward/ReverseLimit signals will still 6121 * report the values of the limit switches 6122 * regardless of this parameter. 6123 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6124 * until a timesync boundary (requires Phoenix Pro and 6125 * CANivore). This eliminates the impact of 6126 * nondeterministic network delays in exchange for a 6127 * larger but deterministic control latency. 6128 * <p> 6129 * This requires setting the ControlTimesyncFreqHz 6130 * config in MotorOutputConfigs. Additionally, when 6131 * this is enabled, the UpdateFreqHz of this request 6132 * should be set to 0 Hz. 6133 * </ul> 6134 * </ul> 6135 * 6136 * @param request Control object to request of the device 6137 * @return Code response of the request 6138 */ 6139 @Override 6140 public StatusCode setControl(PositionTorqueCurrentFOC request) 6141 { 6142 return setControlPrivate(request); 6143 } 6144 6145 /** 6146 * Request PID to target velocity with duty cycle feedforward. 6147 * <p> 6148 * This control mode will set the motor's velocity setpoint to the 6149 * velocity specified by the user. In addition, it will apply an 6150 * additional voltage as an arbitrary feedforward value. 6151 * <ul> 6152 * <li> <b>VelocityDutyCycle Parameters:</b> 6153 * <ul> 6154 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. 6155 * <li> <b>Acceleration:</b> Acceleration to drive toward in rotations per 6156 * second squared. This is typically used for motion 6157 * profiles generated by the robot program. 6158 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6159 * Pro), which increases peak power by ~15% on supported 6160 * devices (see {@link SupportsFOC}). Set to false to 6161 * use trapezoidal commutation. 6162 * <p> 6163 * FOC improves motor performance by leveraging torque 6164 * (current) control. However, this may be inconvenient 6165 * for applications that require specifying duty cycle 6166 * or voltage. CTR-Electronics has developed a hybrid 6167 * method that combines the performances gains of FOC 6168 * while still allowing applications to provide duty 6169 * cycle or voltage demand. This not to be confused 6170 * with simple sinusoidal control or phase voltage 6171 * control which lacks the performance gains. 6172 * <li> <b>FeedForward:</b> Feedforward to apply in fractional units between -1 6173 * and +1. 6174 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6175 * the configuration api to set the gain values for the 6176 * selected slot before enabling this feature. Slot must be 6177 * within [0,2]. 6178 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6179 * when output is zero (or within 6180 * deadband). Set to false to use the 6181 * NeutralMode configuration setting 6182 * (default). This flag exists to provide 6183 * the fundamental behavior of this 6184 * control when output is zero, which is 6185 * to provide 0V to the motor. 6186 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6187 * allows users to use other limit switch 6188 * sensors connected to robot controller. This 6189 * also allows use of active sensors that 6190 * require external power. 6191 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6192 * allows users to use other limit switch 6193 * sensors connected to robot controller. This 6194 * also allows use of active sensors that 6195 * require external power. 6196 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6197 * switches and the LimitForwardMotion and 6198 * LimitReverseMotion parameters, instead 6199 * allowing motion. 6200 * <p> 6201 * This can be useful on mechanisms such as 6202 * an intake/feeder, where a limit switch 6203 * stops motion while intaking but should be 6204 * ignored when feeding to a shooter. 6205 * <p> 6206 * The hardware limit faults and 6207 * Forward/ReverseLimit signals will still 6208 * report the values of the limit switches 6209 * regardless of this parameter. 6210 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6211 * until a timesync boundary (requires Phoenix Pro and 6212 * CANivore). This eliminates the impact of 6213 * nondeterministic network delays in exchange for a 6214 * larger but deterministic control latency. 6215 * <p> 6216 * This requires setting the ControlTimesyncFreqHz 6217 * config in MotorOutputConfigs. Additionally, when 6218 * this is enabled, the UpdateFreqHz of this request 6219 * should be set to 0 Hz. 6220 * </ul> 6221 * </ul> 6222 * 6223 * @param request Control object to request of the device 6224 * @return Code response of the request 6225 */ 6226 @Override 6227 public StatusCode setControl(VelocityDutyCycle request) 6228 { 6229 return setControlPrivate(request); 6230 } 6231 6232 /** 6233 * Request PID to target velocity with voltage feedforward. 6234 * <p> 6235 * This control mode will set the motor's velocity setpoint to the 6236 * velocity specified by the user. In addition, it will apply an 6237 * additional voltage as an arbitrary feedforward value. 6238 * <ul> 6239 * <li> <b>VelocityVoltage Parameters:</b> 6240 * <ul> 6241 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. 6242 * <li> <b>Acceleration:</b> Acceleration to drive toward in rotations per 6243 * second squared. This is typically used for motion 6244 * profiles generated by the robot program. 6245 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6246 * Pro), which increases peak power by ~15% on supported 6247 * devices (see {@link SupportsFOC}). Set to false to 6248 * use trapezoidal commutation. 6249 * <p> 6250 * FOC improves motor performance by leveraging torque 6251 * (current) control. However, this may be inconvenient 6252 * for applications that require specifying duty cycle 6253 * or voltage. CTR-Electronics has developed a hybrid 6254 * method that combines the performances gains of FOC 6255 * while still allowing applications to provide duty 6256 * cycle or voltage demand. This not to be confused 6257 * with simple sinusoidal control or phase voltage 6258 * control which lacks the performance gains. 6259 * <li> <b>FeedForward:</b> Feedforward to apply in volts 6260 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6261 * the configuration api to set the gain values for the 6262 * selected slot before enabling this feature. Slot must be 6263 * within [0,2]. 6264 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6265 * when output is zero (or within 6266 * deadband). Set to false to use the 6267 * NeutralMode configuration setting 6268 * (default). This flag exists to provide 6269 * the fundamental behavior of this 6270 * control when output is zero, which is 6271 * to provide 0V to the motor. 6272 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6273 * allows users to use other limit switch 6274 * sensors connected to robot controller. This 6275 * also allows use of active sensors that 6276 * require external power. 6277 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6278 * allows users to use other limit switch 6279 * sensors connected to robot controller. This 6280 * also allows use of active sensors that 6281 * require external power. 6282 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6283 * switches and the LimitForwardMotion and 6284 * LimitReverseMotion parameters, instead 6285 * allowing motion. 6286 * <p> 6287 * This can be useful on mechanisms such as 6288 * an intake/feeder, where a limit switch 6289 * stops motion while intaking but should be 6290 * ignored when feeding to a shooter. 6291 * <p> 6292 * The hardware limit faults and 6293 * Forward/ReverseLimit signals will still 6294 * report the values of the limit switches 6295 * regardless of this parameter. 6296 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6297 * until a timesync boundary (requires Phoenix Pro and 6298 * CANivore). This eliminates the impact of 6299 * nondeterministic network delays in exchange for a 6300 * larger but deterministic control latency. 6301 * <p> 6302 * This requires setting the ControlTimesyncFreqHz 6303 * config in MotorOutputConfigs. Additionally, when 6304 * this is enabled, the UpdateFreqHz of this request 6305 * should be set to 0 Hz. 6306 * </ul> 6307 * </ul> 6308 * 6309 * @param request Control object to request of the device 6310 * @return Code response of the request 6311 */ 6312 @Override 6313 public StatusCode setControl(VelocityVoltage request) 6314 { 6315 return setControlPrivate(request); 6316 } 6317 6318 /** 6319 * Request PID to target velocity with torque current feedforward. 6320 * <p> 6321 * This control mode will set the motor's velocity setpoint to the 6322 * velocity specified by the user. In addition, it will apply an 6323 * additional torque current as an arbitrary feedforward value. 6324 * <ul> 6325 * <li> <b>VelocityTorqueCurrentFOC Parameters:</b> 6326 * <ul> 6327 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. 6328 * <li> <b>Acceleration:</b> Acceleration to drive toward in rotations per 6329 * second squared. This is typically used for motion 6330 * profiles generated by the robot program. 6331 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in Amperes. 6332 * User can use motor's kT to scale Newton-meter to 6333 * Amperes. 6334 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6335 * the configuration api to set the gain values for the 6336 * selected slot before enabling this feature. Slot must be 6337 * within [0,2]. 6338 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 6339 * output is zero (or within deadband). 6340 * Set to false to use the NeutralMode 6341 * configuration setting (default). This 6342 * flag exists to provide the fundamental 6343 * behavior of this control when output is 6344 * zero, which is to provide 0A (zero 6345 * torque). 6346 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6347 * allows users to use other limit switch 6348 * sensors connected to robot controller. This 6349 * also allows use of active sensors that 6350 * require external power. 6351 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6352 * allows users to use other limit switch 6353 * sensors connected to robot controller. This 6354 * also allows use of active sensors that 6355 * require external power. 6356 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6357 * switches and the LimitForwardMotion and 6358 * LimitReverseMotion parameters, instead 6359 * allowing motion. 6360 * <p> 6361 * This can be useful on mechanisms such as 6362 * an intake/feeder, where a limit switch 6363 * stops motion while intaking but should be 6364 * ignored when feeding to a shooter. 6365 * <p> 6366 * The hardware limit faults and 6367 * Forward/ReverseLimit signals will still 6368 * report the values of the limit switches 6369 * regardless of this parameter. 6370 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6371 * until a timesync boundary (requires Phoenix Pro and 6372 * CANivore). This eliminates the impact of 6373 * nondeterministic network delays in exchange for a 6374 * larger but deterministic control latency. 6375 * <p> 6376 * This requires setting the ControlTimesyncFreqHz 6377 * config in MotorOutputConfigs. Additionally, when 6378 * this is enabled, the UpdateFreqHz of this request 6379 * should be set to 0 Hz. 6380 * </ul> 6381 * </ul> 6382 * 6383 * @param request Control object to request of the device 6384 * @return Code response of the request 6385 */ 6386 @Override 6387 public StatusCode setControl(VelocityTorqueCurrentFOC request) 6388 { 6389 return setControlPrivate(request); 6390 } 6391 6392 /** 6393 * Requests Motion Magic® to target a final position using a motion 6394 * profile. Users can optionally provide a duty cycle feedforward. 6395 * <p> 6396 * Motion Magic® produces a motion profile in real-time while 6397 * attempting to honor the Cruise Velocity, Acceleration, and 6398 * (optional) Jerk specified via the Motion Magic® configuration 6399 * values. This control mode does not use the Expo_kV or Expo_kA 6400 * configs. 6401 * <p> 6402 * Target position can be changed on-the-fly and Motion Magic® will do 6403 * its best to adjust the profile. This control mode is duty cycle 6404 * based, so relevant closed-loop gains will use fractional duty cycle 6405 * for the numerator: +1.0 represents full forward output. 6406 * <ul> 6407 * <li> <b>MotionMagicDutyCycle Parameters:</b> 6408 * <ul> 6409 * <li> <b>Position:</b> Position to drive toward in rotations. 6410 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6411 * Pro), which increases peak power by ~15% on supported 6412 * devices (see {@link SupportsFOC}). Set to false to 6413 * use trapezoidal commutation. 6414 * <p> 6415 * FOC improves motor performance by leveraging torque 6416 * (current) control. However, this may be inconvenient 6417 * for applications that require specifying duty cycle 6418 * or voltage. CTR-Electronics has developed a hybrid 6419 * method that combines the performances gains of FOC 6420 * while still allowing applications to provide duty 6421 * cycle or voltage demand. This not to be confused 6422 * with simple sinusoidal control or phase voltage 6423 * control which lacks the performance gains. 6424 * <li> <b>FeedForward:</b> Feedforward to apply in fractional units between -1 6425 * and +1. 6426 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6427 * the configuration api to set the gain values for the 6428 * selected slot before enabling this feature. Slot must be 6429 * within [0,2]. 6430 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6431 * when output is zero (or within 6432 * deadband). Set to false to use the 6433 * NeutralMode configuration setting 6434 * (default). This flag exists to provide 6435 * the fundamental behavior of this 6436 * control when output is zero, which is 6437 * to provide 0V to the motor. 6438 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6439 * allows users to use other limit switch 6440 * sensors connected to robot controller. This 6441 * also allows use of active sensors that 6442 * require external power. 6443 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6444 * allows users to use other limit switch 6445 * sensors connected to robot controller. This 6446 * also allows use of active sensors that 6447 * require external power. 6448 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6449 * switches and the LimitForwardMotion and 6450 * LimitReverseMotion parameters, instead 6451 * allowing motion. 6452 * <p> 6453 * This can be useful on mechanisms such as 6454 * an intake/feeder, where a limit switch 6455 * stops motion while intaking but should be 6456 * ignored when feeding to a shooter. 6457 * <p> 6458 * The hardware limit faults and 6459 * Forward/ReverseLimit signals will still 6460 * report the values of the limit switches 6461 * regardless of this parameter. 6462 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6463 * until a timesync boundary (requires Phoenix Pro and 6464 * CANivore). This eliminates the impact of 6465 * nondeterministic network delays in exchange for a 6466 * larger but deterministic control latency. 6467 * <p> 6468 * This requires setting the ControlTimesyncFreqHz 6469 * config in MotorOutputConfigs. Additionally, when 6470 * this is enabled, the UpdateFreqHz of this request 6471 * should be set to 0 Hz. 6472 * </ul> 6473 * </ul> 6474 * 6475 * @param request Control object to request of the device 6476 * @return Code response of the request 6477 */ 6478 @Override 6479 public StatusCode setControl(MotionMagicDutyCycle request) 6480 { 6481 return setControlPrivate(request); 6482 } 6483 6484 /** 6485 * Requests Motion Magic® to target a final position using a motion 6486 * profile. Users can optionally provide a voltage feedforward. 6487 * <p> 6488 * Motion Magic® produces a motion profile in real-time while 6489 * attempting to honor the Cruise Velocity, Acceleration, and 6490 * (optional) Jerk specified via the Motion Magic® configuration 6491 * values. This control mode does not use the Expo_kV or Expo_kA 6492 * configs. 6493 * <p> 6494 * Target position can be changed on-the-fly and Motion Magic® will do 6495 * its best to adjust the profile. This control mode is 6496 * voltage-based, so relevant closed-loop gains will use Volts for the 6497 * numerator. 6498 * <ul> 6499 * <li> <b>MotionMagicVoltage Parameters:</b> 6500 * <ul> 6501 * <li> <b>Position:</b> Position to drive toward in rotations. 6502 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6503 * Pro), which increases peak power by ~15% on supported 6504 * devices (see {@link SupportsFOC}). Set to false to 6505 * use trapezoidal commutation. 6506 * <p> 6507 * FOC improves motor performance by leveraging torque 6508 * (current) control. However, this may be inconvenient 6509 * for applications that require specifying duty cycle 6510 * or voltage. CTR-Electronics has developed a hybrid 6511 * method that combines the performances gains of FOC 6512 * while still allowing applications to provide duty 6513 * cycle or voltage demand. This not to be confused 6514 * with simple sinusoidal control or phase voltage 6515 * control which lacks the performance gains. 6516 * <li> <b>FeedForward:</b> Feedforward to apply in volts 6517 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6518 * the configuration api to set the gain values for the 6519 * selected slot before enabling this feature. Slot must be 6520 * within [0,2]. 6521 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6522 * when output is zero (or within 6523 * deadband). Set to false to use the 6524 * NeutralMode configuration setting 6525 * (default). This flag exists to provide 6526 * the fundamental behavior of this 6527 * control when output is zero, which is 6528 * to provide 0V to the motor. 6529 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6530 * allows users to use other limit switch 6531 * sensors connected to robot controller. This 6532 * also allows use of active sensors that 6533 * require external power. 6534 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6535 * allows users to use other limit switch 6536 * sensors connected to robot controller. This 6537 * also allows use of active sensors that 6538 * require external power. 6539 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6540 * switches and the LimitForwardMotion and 6541 * LimitReverseMotion parameters, instead 6542 * allowing motion. 6543 * <p> 6544 * This can be useful on mechanisms such as 6545 * an intake/feeder, where a limit switch 6546 * stops motion while intaking but should be 6547 * ignored when feeding to a shooter. 6548 * <p> 6549 * The hardware limit faults and 6550 * Forward/ReverseLimit signals will still 6551 * report the values of the limit switches 6552 * regardless of this parameter. 6553 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6554 * until a timesync boundary (requires Phoenix Pro and 6555 * CANivore). This eliminates the impact of 6556 * nondeterministic network delays in exchange for a 6557 * larger but deterministic control latency. 6558 * <p> 6559 * This requires setting the ControlTimesyncFreqHz 6560 * config in MotorOutputConfigs. Additionally, when 6561 * this is enabled, the UpdateFreqHz of this request 6562 * should be set to 0 Hz. 6563 * </ul> 6564 * </ul> 6565 * 6566 * @param request Control object to request of the device 6567 * @return Code response of the request 6568 */ 6569 @Override 6570 public StatusCode setControl(MotionMagicVoltage request) 6571 { 6572 return setControlPrivate(request); 6573 } 6574 6575 /** 6576 * Requests Motion Magic® to target a final position using a motion 6577 * profile. Users can optionally provide a torque current 6578 * feedforward. 6579 * <p> 6580 * Motion Magic® produces a motion profile in real-time while 6581 * attempting to honor the Cruise Velocity, Acceleration, and 6582 * (optional) Jerk specified via the Motion Magic® configuration 6583 * values. This control mode does not use the Expo_kV or Expo_kA 6584 * configs. 6585 * <p> 6586 * Target position can be changed on-the-fly and Motion Magic® will do 6587 * its best to adjust the profile. This control mode is based on 6588 * torque current, so relevant closed-loop gains will use Amperes for 6589 * the numerator. 6590 * <ul> 6591 * <li> <b>MotionMagicTorqueCurrentFOC Parameters:</b> 6592 * <ul> 6593 * <li> <b>Position:</b> Position to drive toward in rotations. 6594 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in Amperes. 6595 * User can use motor's kT to scale Newton-meter to 6596 * Amperes. 6597 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 6598 * the configuration api to set the gain values for the 6599 * selected slot before enabling this feature. Slot must be 6600 * within [0,2]. 6601 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 6602 * output is zero (or within deadband). 6603 * Set to false to use the NeutralMode 6604 * configuration setting (default). This 6605 * flag exists to provide the fundamental 6606 * behavior of this control when output is 6607 * zero, which is to provide 0A (zero 6608 * torque). 6609 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6610 * allows users to use other limit switch 6611 * sensors connected to robot controller. This 6612 * also allows use of active sensors that 6613 * require external power. 6614 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6615 * allows users to use other limit switch 6616 * sensors connected to robot controller. This 6617 * also allows use of active sensors that 6618 * require external power. 6619 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6620 * switches and the LimitForwardMotion and 6621 * LimitReverseMotion parameters, instead 6622 * allowing motion. 6623 * <p> 6624 * This can be useful on mechanisms such as 6625 * an intake/feeder, where a limit switch 6626 * stops motion while intaking but should be 6627 * ignored when feeding to a shooter. 6628 * <p> 6629 * The hardware limit faults and 6630 * Forward/ReverseLimit signals will still 6631 * report the values of the limit switches 6632 * regardless of this parameter. 6633 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6634 * until a timesync boundary (requires Phoenix Pro and 6635 * CANivore). This eliminates the impact of 6636 * nondeterministic network delays in exchange for a 6637 * larger but deterministic control latency. 6638 * <p> 6639 * This requires setting the ControlTimesyncFreqHz 6640 * config in MotorOutputConfigs. Additionally, when 6641 * this is enabled, the UpdateFreqHz of this request 6642 * should be set to 0 Hz. 6643 * </ul> 6644 * </ul> 6645 * 6646 * @param request Control object to request of the device 6647 * @return Code response of the request 6648 */ 6649 @Override 6650 public StatusCode setControl(MotionMagicTorqueCurrentFOC request) 6651 { 6652 return setControlPrivate(request); 6653 } 6654 6655 /** 6656 * Request a specified motor duty cycle with a differential position 6657 * closed-loop. 6658 * <p> 6659 * This control mode will output a proportion of the supplied voltage 6660 * which is supplied by the user. It will also set the motor's 6661 * differential position setpoint to the specified position. 6662 * <ul> 6663 * <li> <b>DifferentialDutyCycle Parameters:</b> 6664 * <ul> 6665 * <li> <b>TargetOutput:</b> Proportion of supply voltage to apply in 6666 * fractional units between -1 and +1 6667 * <li> <b>DifferentialPosition:</b> Differential position to drive towards in 6668 * rotations 6669 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6670 * Pro), which increases peak power by ~15% on supported 6671 * devices (see {@link SupportsFOC}). Set to false to 6672 * use trapezoidal commutation. 6673 * <p> 6674 * FOC improves motor performance by leveraging torque 6675 * (current) control. However, this may be inconvenient 6676 * for applications that require specifying duty cycle 6677 * or voltage. CTR-Electronics has developed a hybrid 6678 * method that combines the performances gains of FOC 6679 * while still allowing applications to provide duty 6680 * cycle or voltage demand. This not to be confused 6681 * with simple sinusoidal control or phase voltage 6682 * control which lacks the performance gains. 6683 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 6684 * differential controller by selecting the slot. 6685 * Use the configuration api to set the gain 6686 * values for the selected slot before enabling 6687 * this feature. Slot must be within [0,2]. 6688 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6689 * when output is zero (or within 6690 * deadband). Set to false to use the 6691 * NeutralMode configuration setting 6692 * (default). This flag exists to provide 6693 * the fundamental behavior of this 6694 * control when output is zero, which is 6695 * to provide 0V to the motor. 6696 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6697 * allows users to use other limit switch 6698 * sensors connected to robot controller. This 6699 * also allows use of active sensors that 6700 * require external power. 6701 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6702 * allows users to use other limit switch 6703 * sensors connected to robot controller. This 6704 * also allows use of active sensors that 6705 * require external power. 6706 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6707 * switches and the LimitForwardMotion and 6708 * LimitReverseMotion parameters, instead 6709 * allowing motion. 6710 * <p> 6711 * This can be useful on mechanisms such as 6712 * an intake/feeder, where a limit switch 6713 * stops motion while intaking but should be 6714 * ignored when feeding to a shooter. 6715 * <p> 6716 * The hardware limit faults and 6717 * Forward/ReverseLimit signals will still 6718 * report the values of the limit switches 6719 * regardless of this parameter. 6720 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6721 * until a timesync boundary (requires Phoenix Pro and 6722 * CANivore). This eliminates the impact of 6723 * nondeterministic network delays in exchange for a 6724 * larger but deterministic control latency. 6725 * <p> 6726 * This requires setting the ControlTimesyncFreqHz 6727 * config in MotorOutputConfigs. Additionally, when 6728 * this is enabled, the UpdateFreqHz of this request 6729 * should be set to 0 Hz. 6730 * </ul> 6731 * </ul> 6732 * 6733 * @param request Control object to request of the device 6734 * @return Code response of the request 6735 */ 6736 @Override 6737 public StatusCode setControl(DifferentialDutyCycle request) 6738 { 6739 return setControlPrivate(request); 6740 } 6741 6742 /** 6743 * Request a specified voltage with a differential position 6744 * closed-loop. 6745 * <p> 6746 * This control mode will attempt to apply the specified voltage to 6747 * the motor. If the supply voltage is below the requested voltage, 6748 * the motor controller will output the supply voltage. It will also 6749 * set the motor's differential position setpoint to the specified 6750 * position. 6751 * <ul> 6752 * <li> <b>DifferentialVoltage Parameters:</b> 6753 * <ul> 6754 * <li> <b>TargetOutput:</b> Voltage to attempt to drive at 6755 * <li> <b>DifferentialPosition:</b> Differential position to drive towards in 6756 * rotations 6757 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6758 * Pro), which increases peak power by ~15% on supported 6759 * devices (see {@link SupportsFOC}). Set to false to 6760 * use trapezoidal commutation. 6761 * <p> 6762 * FOC improves motor performance by leveraging torque 6763 * (current) control. However, this may be inconvenient 6764 * for applications that require specifying duty cycle 6765 * or voltage. CTR-Electronics has developed a hybrid 6766 * method that combines the performances gains of FOC 6767 * while still allowing applications to provide duty 6768 * cycle or voltage demand. This not to be confused 6769 * with simple sinusoidal control or phase voltage 6770 * control which lacks the performance gains. 6771 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 6772 * differential controller by selecting the slot. 6773 * Use the configuration api to set the gain 6774 * values for the selected slot before enabling 6775 * this feature. Slot must be within [0,2]. 6776 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6777 * when output is zero (or within 6778 * deadband). Set to false to use the 6779 * NeutralMode configuration setting 6780 * (default). This flag exists to provide 6781 * the fundamental behavior of this 6782 * control when output is zero, which is 6783 * to provide 0V to the motor. 6784 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6785 * allows users to use other limit switch 6786 * sensors connected to robot controller. This 6787 * also allows use of active sensors that 6788 * require external power. 6789 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6790 * allows users to use other limit switch 6791 * sensors connected to robot controller. This 6792 * also allows use of active sensors that 6793 * require external power. 6794 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6795 * switches and the LimitForwardMotion and 6796 * LimitReverseMotion parameters, instead 6797 * allowing motion. 6798 * <p> 6799 * This can be useful on mechanisms such as 6800 * an intake/feeder, where a limit switch 6801 * stops motion while intaking but should be 6802 * ignored when feeding to a shooter. 6803 * <p> 6804 * The hardware limit faults and 6805 * Forward/ReverseLimit signals will still 6806 * report the values of the limit switches 6807 * regardless of this parameter. 6808 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6809 * until a timesync boundary (requires Phoenix Pro and 6810 * CANivore). This eliminates the impact of 6811 * nondeterministic network delays in exchange for a 6812 * larger but deterministic control latency. 6813 * <p> 6814 * This requires setting the ControlTimesyncFreqHz 6815 * config in MotorOutputConfigs. Additionally, when 6816 * this is enabled, the UpdateFreqHz of this request 6817 * should be set to 0 Hz. 6818 * </ul> 6819 * </ul> 6820 * 6821 * @param request Control object to request of the device 6822 * @return Code response of the request 6823 */ 6824 @Override 6825 public StatusCode setControl(DifferentialVoltage request) 6826 { 6827 return setControlPrivate(request); 6828 } 6829 6830 /** 6831 * Request PID to target position with a differential position 6832 * setpoint. 6833 * <p> 6834 * This control mode will set the motor's position setpoint to the 6835 * position specified by the user. It will also set the motor's 6836 * differential position setpoint to the specified position. 6837 * <ul> 6838 * <li> <b>DifferentialPositionDutyCycle Parameters:</b> 6839 * <ul> 6840 * <li> <b>TargetPosition:</b> Average position to drive toward in rotations. 6841 * <li> <b>DifferentialPosition:</b> Differential position to drive toward in 6842 * rotations. 6843 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6844 * Pro), which increases peak power by ~15% on supported 6845 * devices (see {@link SupportsFOC}). Set to false to 6846 * use trapezoidal commutation. 6847 * <p> 6848 * FOC improves motor performance by leveraging torque 6849 * (current) control. However, this may be inconvenient 6850 * for applications that require specifying duty cycle 6851 * or voltage. CTR-Electronics has developed a hybrid 6852 * method that combines the performances gains of FOC 6853 * while still allowing applications to provide duty 6854 * cycle or voltage demand. This not to be confused 6855 * with simple sinusoidal control or phase voltage 6856 * control which lacks the performance gains. 6857 * <li> <b>TargetSlot:</b> Select which gains are applied to the primary 6858 * controller by selecting the slot. Use the 6859 * configuration api to set the gain values for the 6860 * selected slot before enabling this feature. Slot 6861 * must be within [0,2]. 6862 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 6863 * differential controller by selecting the slot. 6864 * Use the configuration api to set the gain 6865 * values for the selected slot before enabling 6866 * this feature. Slot must be within [0,2]. 6867 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6868 * when output is zero (or within 6869 * deadband). Set to false to use the 6870 * NeutralMode configuration setting 6871 * (default). This flag exists to provide 6872 * the fundamental behavior of this 6873 * control when output is zero, which is 6874 * to provide 0V to the motor. 6875 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6876 * allows users to use other limit switch 6877 * sensors connected to robot controller. This 6878 * also allows use of active sensors that 6879 * require external power. 6880 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6881 * allows users to use other limit switch 6882 * sensors connected to robot controller. This 6883 * also allows use of active sensors that 6884 * require external power. 6885 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6886 * switches and the LimitForwardMotion and 6887 * LimitReverseMotion parameters, instead 6888 * allowing motion. 6889 * <p> 6890 * This can be useful on mechanisms such as 6891 * an intake/feeder, where a limit switch 6892 * stops motion while intaking but should be 6893 * ignored when feeding to a shooter. 6894 * <p> 6895 * The hardware limit faults and 6896 * Forward/ReverseLimit signals will still 6897 * report the values of the limit switches 6898 * regardless of this parameter. 6899 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6900 * until a timesync boundary (requires Phoenix Pro and 6901 * CANivore). This eliminates the impact of 6902 * nondeterministic network delays in exchange for a 6903 * larger but deterministic control latency. 6904 * <p> 6905 * This requires setting the ControlTimesyncFreqHz 6906 * config in MotorOutputConfigs. Additionally, when 6907 * this is enabled, the UpdateFreqHz of this request 6908 * should be set to 0 Hz. 6909 * </ul> 6910 * </ul> 6911 * 6912 * @param request Control object to request of the device 6913 * @return Code response of the request 6914 */ 6915 @Override 6916 public StatusCode setControl(DifferentialPositionDutyCycle request) 6917 { 6918 return setControlPrivate(request); 6919 } 6920 6921 /** 6922 * Request PID to target position with a differential position 6923 * setpoint 6924 * <p> 6925 * This control mode will set the motor's position setpoint to the 6926 * position specified by the user. It will also set the motor's 6927 * differential position setpoint to the specified position. 6928 * <ul> 6929 * <li> <b>DifferentialPositionVoltage Parameters:</b> 6930 * <ul> 6931 * <li> <b>TargetPosition:</b> Average position to drive toward in rotations. 6932 * <li> <b>DifferentialPosition:</b> Differential position to drive toward in 6933 * rotations. 6934 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 6935 * Pro), which increases peak power by ~15% on supported 6936 * devices (see {@link SupportsFOC}). Set to false to 6937 * use trapezoidal commutation. 6938 * <p> 6939 * FOC improves motor performance by leveraging torque 6940 * (current) control. However, this may be inconvenient 6941 * for applications that require specifying duty cycle 6942 * or voltage. CTR-Electronics has developed a hybrid 6943 * method that combines the performances gains of FOC 6944 * while still allowing applications to provide duty 6945 * cycle or voltage demand. This not to be confused 6946 * with simple sinusoidal control or phase voltage 6947 * control which lacks the performance gains. 6948 * <li> <b>TargetSlot:</b> Select which gains are applied to the primary 6949 * controller by selecting the slot. Use the 6950 * configuration api to set the gain values for the 6951 * selected slot before enabling this feature. Slot 6952 * must be within [0,2]. 6953 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 6954 * differential controller by selecting the slot. 6955 * Use the configuration api to set the gain 6956 * values for the selected slot before enabling 6957 * this feature. Slot must be within [0,2]. 6958 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 6959 * when output is zero (or within 6960 * deadband). Set to false to use the 6961 * NeutralMode configuration setting 6962 * (default). This flag exists to provide 6963 * the fundamental behavior of this 6964 * control when output is zero, which is 6965 * to provide 0V to the motor. 6966 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 6967 * allows users to use other limit switch 6968 * sensors connected to robot controller. This 6969 * also allows use of active sensors that 6970 * require external power. 6971 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 6972 * allows users to use other limit switch 6973 * sensors connected to robot controller. This 6974 * also allows use of active sensors that 6975 * require external power. 6976 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 6977 * switches and the LimitForwardMotion and 6978 * LimitReverseMotion parameters, instead 6979 * allowing motion. 6980 * <p> 6981 * This can be useful on mechanisms such as 6982 * an intake/feeder, where a limit switch 6983 * stops motion while intaking but should be 6984 * ignored when feeding to a shooter. 6985 * <p> 6986 * The hardware limit faults and 6987 * Forward/ReverseLimit signals will still 6988 * report the values of the limit switches 6989 * regardless of this parameter. 6990 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 6991 * until a timesync boundary (requires Phoenix Pro and 6992 * CANivore). This eliminates the impact of 6993 * nondeterministic network delays in exchange for a 6994 * larger but deterministic control latency. 6995 * <p> 6996 * This requires setting the ControlTimesyncFreqHz 6997 * config in MotorOutputConfigs. Additionally, when 6998 * this is enabled, the UpdateFreqHz of this request 6999 * should be set to 0 Hz. 7000 * </ul> 7001 * </ul> 7002 * 7003 * @param request Control object to request of the device 7004 * @return Code response of the request 7005 */ 7006 @Override 7007 public StatusCode setControl(DifferentialPositionVoltage request) 7008 { 7009 return setControlPrivate(request); 7010 } 7011 7012 /** 7013 * Request PID to target velocity with a differential position 7014 * setpoint. 7015 * <p> 7016 * This control mode will set the motor's velocity setpoint to the 7017 * velocity specified by the user. It will also set the motor's 7018 * differential position setpoint to the specified position. 7019 * <ul> 7020 * <li> <b>DifferentialVelocityDutyCycle Parameters:</b> 7021 * <ul> 7022 * <li> <b>TargetVelocity:</b> Average velocity to drive toward in rotations 7023 * per second. 7024 * <li> <b>DifferentialPosition:</b> Differential position to drive toward in 7025 * rotations. 7026 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7027 * Pro), which increases peak power by ~15% on supported 7028 * devices (see {@link SupportsFOC}). Set to false to 7029 * use trapezoidal commutation. 7030 * <p> 7031 * FOC improves motor performance by leveraging torque 7032 * (current) control. However, this may be inconvenient 7033 * for applications that require specifying duty cycle 7034 * or voltage. CTR-Electronics has developed a hybrid 7035 * method that combines the performances gains of FOC 7036 * while still allowing applications to provide duty 7037 * cycle or voltage demand. This not to be confused 7038 * with simple sinusoidal control or phase voltage 7039 * control which lacks the performance gains. 7040 * <li> <b>TargetSlot:</b> Select which gains are applied to the primary 7041 * controller by selecting the slot. Use the 7042 * configuration api to set the gain values for the 7043 * selected slot before enabling this feature. Slot 7044 * must be within [0,2]. 7045 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 7046 * differential controller by selecting the slot. 7047 * Use the configuration api to set the gain 7048 * values for the selected slot before enabling 7049 * this feature. Slot must be within [0,2]. 7050 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 7051 * when output is zero (or within 7052 * deadband). Set to false to use the 7053 * NeutralMode configuration setting 7054 * (default). This flag exists to provide 7055 * the fundamental behavior of this 7056 * control when output is zero, which is 7057 * to provide 0V to the motor. 7058 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7059 * allows users to use other limit switch 7060 * sensors connected to robot controller. This 7061 * also allows use of active sensors that 7062 * require external power. 7063 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7064 * allows users to use other limit switch 7065 * sensors connected to robot controller. This 7066 * also allows use of active sensors that 7067 * require external power. 7068 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7069 * switches and the LimitForwardMotion and 7070 * LimitReverseMotion parameters, instead 7071 * allowing motion. 7072 * <p> 7073 * This can be useful on mechanisms such as 7074 * an intake/feeder, where a limit switch 7075 * stops motion while intaking but should be 7076 * ignored when feeding to a shooter. 7077 * <p> 7078 * The hardware limit faults and 7079 * Forward/ReverseLimit signals will still 7080 * report the values of the limit switches 7081 * regardless of this parameter. 7082 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7083 * until a timesync boundary (requires Phoenix Pro and 7084 * CANivore). This eliminates the impact of 7085 * nondeterministic network delays in exchange for a 7086 * larger but deterministic control latency. 7087 * <p> 7088 * This requires setting the ControlTimesyncFreqHz 7089 * config in MotorOutputConfigs. Additionally, when 7090 * this is enabled, the UpdateFreqHz of this request 7091 * should be set to 0 Hz. 7092 * </ul> 7093 * </ul> 7094 * 7095 * @param request Control object to request of the device 7096 * @return Code response of the request 7097 */ 7098 @Override 7099 public StatusCode setControl(DifferentialVelocityDutyCycle request) 7100 { 7101 return setControlPrivate(request); 7102 } 7103 7104 /** 7105 * Request PID to target velocity with a differential position 7106 * setpoint. 7107 * <p> 7108 * This control mode will set the motor's velocity setpoint to the 7109 * velocity specified by the user. It will also set the motor's 7110 * differential position setpoint to the specified position. 7111 * <ul> 7112 * <li> <b>DifferentialVelocityVoltage Parameters:</b> 7113 * <ul> 7114 * <li> <b>TargetVelocity:</b> Average velocity to drive toward in rotations 7115 * per second. 7116 * <li> <b>DifferentialPosition:</b> Differential position to drive toward in 7117 * rotations. 7118 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7119 * Pro), which increases peak power by ~15% on supported 7120 * devices (see {@link SupportsFOC}). Set to false to 7121 * use trapezoidal commutation. 7122 * <p> 7123 * FOC improves motor performance by leveraging torque 7124 * (current) control. However, this may be inconvenient 7125 * for applications that require specifying duty cycle 7126 * or voltage. CTR-Electronics has developed a hybrid 7127 * method that combines the performances gains of FOC 7128 * while still allowing applications to provide duty 7129 * cycle or voltage demand. This not to be confused 7130 * with simple sinusoidal control or phase voltage 7131 * control which lacks the performance gains. 7132 * <li> <b>TargetSlot:</b> Select which gains are applied to the primary 7133 * controller by selecting the slot. Use the 7134 * configuration api to set the gain values for the 7135 * selected slot before enabling this feature. Slot 7136 * must be within [0,2]. 7137 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 7138 * differential controller by selecting the slot. 7139 * Use the configuration api to set the gain 7140 * values for the selected slot before enabling 7141 * this feature. Slot must be within [0,2]. 7142 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 7143 * when output is zero (or within 7144 * deadband). Set to false to use the 7145 * NeutralMode configuration setting 7146 * (default). This flag exists to provide 7147 * the fundamental behavior of this 7148 * control when output is zero, which is 7149 * to provide 0V to the motor. 7150 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7151 * allows users to use other limit switch 7152 * sensors connected to robot controller. This 7153 * also allows use of active sensors that 7154 * require external power. 7155 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7156 * allows users to use other limit switch 7157 * sensors connected to robot controller. This 7158 * also allows use of active sensors that 7159 * require external power. 7160 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7161 * switches and the LimitForwardMotion and 7162 * LimitReverseMotion parameters, instead 7163 * allowing motion. 7164 * <p> 7165 * This can be useful on mechanisms such as 7166 * an intake/feeder, where a limit switch 7167 * stops motion while intaking but should be 7168 * ignored when feeding to a shooter. 7169 * <p> 7170 * The hardware limit faults and 7171 * Forward/ReverseLimit signals will still 7172 * report the values of the limit switches 7173 * regardless of this parameter. 7174 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7175 * until a timesync boundary (requires Phoenix Pro and 7176 * CANivore). This eliminates the impact of 7177 * nondeterministic network delays in exchange for a 7178 * larger but deterministic control latency. 7179 * <p> 7180 * This requires setting the ControlTimesyncFreqHz 7181 * config in MotorOutputConfigs. Additionally, when 7182 * this is enabled, the UpdateFreqHz of this request 7183 * should be set to 0 Hz. 7184 * </ul> 7185 * </ul> 7186 * 7187 * @param request Control object to request of the device 7188 * @return Code response of the request 7189 */ 7190 @Override 7191 public StatusCode setControl(DifferentialVelocityVoltage request) 7192 { 7193 return setControlPrivate(request); 7194 } 7195 7196 /** 7197 * Requests Motion Magic® to target a final position using a motion 7198 * profile, and PID to a differential position setpoint. 7199 * <p> 7200 * Motion Magic® produces a motion profile in real-time while 7201 * attempting to honor the Cruise Velocity, Acceleration, and 7202 * (optional) Jerk specified via the Motion Magic® configuration 7203 * values. This control mode does not use the Expo_kV or Expo_kA 7204 * configs. 7205 * <p> 7206 * Target position can be changed on-the-fly and Motion Magic® will do 7207 * its best to adjust the profile. This control mode is duty cycle 7208 * based, so relevant closed-loop gains will use fractional duty cycle 7209 * for the numerator: +1.0 represents full forward output. 7210 * <ul> 7211 * <li> <b>DifferentialMotionMagicDutyCycle Parameters:</b> 7212 * <ul> 7213 * <li> <b>TargetPosition:</b> Average position to drive toward in rotations. 7214 * <li> <b>DifferentialPosition:</b> Differential position to drive toward in 7215 * rotations. 7216 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7217 * Pro), which increases peak power by ~15% on supported 7218 * devices (see {@link SupportsFOC}). Set to false to 7219 * use trapezoidal commutation. 7220 * <p> 7221 * FOC improves motor performance by leveraging torque 7222 * (current) control. However, this may be inconvenient 7223 * for applications that require specifying duty cycle 7224 * or voltage. CTR-Electronics has developed a hybrid 7225 * method that combines the performances gains of FOC 7226 * while still allowing applications to provide duty 7227 * cycle or voltage demand. This not to be confused 7228 * with simple sinusoidal control or phase voltage 7229 * control which lacks the performance gains. 7230 * <li> <b>TargetSlot:</b> Select which gains are applied to the primary 7231 * controller by selecting the slot. Use the 7232 * configuration api to set the gain values for the 7233 * selected slot before enabling this feature. Slot 7234 * must be within [0,2]. 7235 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 7236 * differential controller by selecting the slot. 7237 * Use the configuration api to set the gain 7238 * values for the selected slot before enabling 7239 * this feature. Slot must be within [0,2]. 7240 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 7241 * when output is zero (or within 7242 * deadband). Set to false to use the 7243 * NeutralMode configuration setting 7244 * (default). This flag exists to provide 7245 * the fundamental behavior of this 7246 * control when output is zero, which is 7247 * to provide 0V to the motor. 7248 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7249 * allows users to use other limit switch 7250 * sensors connected to robot controller. This 7251 * also allows use of active sensors that 7252 * require external power. 7253 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7254 * allows users to use other limit switch 7255 * sensors connected to robot controller. This 7256 * also allows use of active sensors that 7257 * require external power. 7258 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7259 * switches and the LimitForwardMotion and 7260 * LimitReverseMotion parameters, instead 7261 * allowing motion. 7262 * <p> 7263 * This can be useful on mechanisms such as 7264 * an intake/feeder, where a limit switch 7265 * stops motion while intaking but should be 7266 * ignored when feeding to a shooter. 7267 * <p> 7268 * The hardware limit faults and 7269 * Forward/ReverseLimit signals will still 7270 * report the values of the limit switches 7271 * regardless of this parameter. 7272 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7273 * until a timesync boundary (requires Phoenix Pro and 7274 * CANivore). This eliminates the impact of 7275 * nondeterministic network delays in exchange for a 7276 * larger but deterministic control latency. 7277 * <p> 7278 * This requires setting the ControlTimesyncFreqHz 7279 * config in MotorOutputConfigs. Additionally, when 7280 * this is enabled, the UpdateFreqHz of this request 7281 * should be set to 0 Hz. 7282 * </ul> 7283 * </ul> 7284 * 7285 * @param request Control object to request of the device 7286 * @return Code response of the request 7287 */ 7288 @Override 7289 public StatusCode setControl(DifferentialMotionMagicDutyCycle request) 7290 { 7291 return setControlPrivate(request); 7292 } 7293 7294 /** 7295 * Requests Motion Magic® to target a final position using a motion 7296 * profile, and PID to a differential position setpoint. 7297 * <p> 7298 * Motion Magic® produces a motion profile in real-time while 7299 * attempting to honor the Cruise Velocity, Acceleration, and 7300 * (optional) Jerk specified via the Motion Magic® configuration 7301 * values. This control mode does not use the Expo_kV or Expo_kA 7302 * configs. 7303 * <p> 7304 * Target position can be changed on-the-fly and Motion Magic® will do 7305 * its best to adjust the profile. This control mode is 7306 * voltage-based, so relevant closed-loop gains will use Volts for the 7307 * numerator. 7308 * <ul> 7309 * <li> <b>DifferentialMotionMagicVoltage Parameters:</b> 7310 * <ul> 7311 * <li> <b>TargetPosition:</b> Average position to drive toward in rotations. 7312 * <li> <b>DifferentialPosition:</b> Differential position to drive toward in 7313 * rotations. 7314 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7315 * Pro), which increases peak power by ~15% on supported 7316 * devices (see {@link SupportsFOC}). Set to false to 7317 * use trapezoidal commutation. 7318 * <p> 7319 * FOC improves motor performance by leveraging torque 7320 * (current) control. However, this may be inconvenient 7321 * for applications that require specifying duty cycle 7322 * or voltage. CTR-Electronics has developed a hybrid 7323 * method that combines the performances gains of FOC 7324 * while still allowing applications to provide duty 7325 * cycle or voltage demand. This not to be confused 7326 * with simple sinusoidal control or phase voltage 7327 * control which lacks the performance gains. 7328 * <li> <b>TargetSlot:</b> Select which gains are applied to the primary 7329 * controller by selecting the slot. Use the 7330 * configuration api to set the gain values for the 7331 * selected slot before enabling this feature. Slot 7332 * must be within [0,2]. 7333 * <li> <b>DifferentialSlot:</b> Select which gains are applied to the 7334 * differential controller by selecting the slot. 7335 * Use the configuration api to set the gain 7336 * values for the selected slot before enabling 7337 * this feature. Slot must be within [0,2]. 7338 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 7339 * when output is zero (or within 7340 * deadband). Set to false to use the 7341 * NeutralMode configuration setting 7342 * (default). This flag exists to provide 7343 * the fundamental behavior of this 7344 * control when output is zero, which is 7345 * to provide 0V to the motor. 7346 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7347 * allows users to use other limit switch 7348 * sensors connected to robot controller. This 7349 * also allows use of active sensors that 7350 * require external power. 7351 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7352 * allows users to use other limit switch 7353 * sensors connected to robot controller. This 7354 * also allows use of active sensors that 7355 * require external power. 7356 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7357 * switches and the LimitForwardMotion and 7358 * LimitReverseMotion parameters, instead 7359 * allowing motion. 7360 * <p> 7361 * This can be useful on mechanisms such as 7362 * an intake/feeder, where a limit switch 7363 * stops motion while intaking but should be 7364 * ignored when feeding to a shooter. 7365 * <p> 7366 * The hardware limit faults and 7367 * Forward/ReverseLimit signals will still 7368 * report the values of the limit switches 7369 * regardless of this parameter. 7370 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7371 * until a timesync boundary (requires Phoenix Pro and 7372 * CANivore). This eliminates the impact of 7373 * nondeterministic network delays in exchange for a 7374 * larger but deterministic control latency. 7375 * <p> 7376 * This requires setting the ControlTimesyncFreqHz 7377 * config in MotorOutputConfigs. Additionally, when 7378 * this is enabled, the UpdateFreqHz of this request 7379 * should be set to 0 Hz. 7380 * </ul> 7381 * </ul> 7382 * 7383 * @param request Control object to request of the device 7384 * @return Code response of the request 7385 */ 7386 @Override 7387 public StatusCode setControl(DifferentialMotionMagicVoltage request) 7388 { 7389 return setControlPrivate(request); 7390 } 7391 7392 /** 7393 * Follow the motor output of another Talon. 7394 * <p> 7395 * If Talon is in torque control, the torque is copied - which will 7396 * increase the total torque applied. If Talon is in percent supply 7397 * output control, the duty cycle is matched. Motor direction either 7398 * matches master's configured direction or opposes it based on 7399 * OpposeMasterDirection. 7400 * <ul> 7401 * <li> <b>Follower Parameters:</b> 7402 * <ul> 7403 * <li> <b>MasterID:</b> Device ID of the master to follow. 7404 * <li> <b>OpposeMasterDirection:</b> Set to false for motor invert to match 7405 * the master's configured Invert - which is 7406 * typical when master and follower are 7407 * mechanically linked and spin in the same 7408 * direction. Set to true for motor invert 7409 * to oppose the master's configured Invert 7410 * - this is typical where the the master 7411 * and follower mechanically spin in 7412 * opposite directions. 7413 * </ul> 7414 * </ul> 7415 * 7416 * @param request Control object to request of the device 7417 * @return Code response of the request 7418 */ 7419 @Override 7420 public StatusCode setControl(Follower request) 7421 { 7422 return setControlPrivate(request); 7423 } 7424 7425 /** 7426 * Follow the motor output of another Talon while ignoring the 7427 * master's invert setting. 7428 * <p> 7429 * If Talon is in torque control, the torque is copied - which will 7430 * increase the total torque applied. If Talon is in percent supply 7431 * output control, the duty cycle is matched. Motor direction is 7432 * strictly determined by the configured invert and not the master. 7433 * If you want motor direction to match or oppose the master, use 7434 * FollowerRequest instead. 7435 * <ul> 7436 * <li> <b>StrictFollower Parameters:</b> 7437 * <ul> 7438 * <li> <b>MasterID:</b> Device ID of the master to follow. 7439 * </ul> 7440 * </ul> 7441 * 7442 * @param request Control object to request of the device 7443 * @return Code response of the request 7444 */ 7445 @Override 7446 public StatusCode setControl(StrictFollower request) 7447 { 7448 return setControlPrivate(request); 7449 } 7450 7451 /** 7452 * Follow the differential motor output of another Talon. 7453 * <p> 7454 * If Talon is in torque control, the torque is copied - which will 7455 * increase the total torque applied. If Talon is in percent supply 7456 * output control, the duty cycle is matched. Motor direction either 7457 * matches master's configured direction or opposes it based on 7458 * OpposeMasterDirection. 7459 * <ul> 7460 * <li> <b>DifferentialFollower Parameters:</b> 7461 * <ul> 7462 * <li> <b>MasterID:</b> Device ID of the differential master to follow. 7463 * <li> <b>OpposeMasterDirection:</b> Set to false for motor invert to match 7464 * the master's configured Invert - which is 7465 * typical when master and follower are 7466 * mechanically linked and spin in the same 7467 * direction. Set to true for motor invert 7468 * to oppose the master's configured Invert 7469 * - this is typical where the the master 7470 * and follower mechanically spin in 7471 * opposite directions. 7472 * </ul> 7473 * </ul> 7474 * 7475 * @param request Control object to request of the device 7476 * @return Code response of the request 7477 */ 7478 @Override 7479 public StatusCode setControl(DifferentialFollower request) 7480 { 7481 return setControlPrivate(request); 7482 } 7483 7484 /** 7485 * Follow the differential motor output of another Talon while 7486 * ignoring the master's invert setting. 7487 * <p> 7488 * If Talon is in torque control, the torque is copied - which will 7489 * increase the total torque applied. If Talon is in percent supply 7490 * output control, the duty cycle is matched. Motor direction is 7491 * strictly determined by the configured invert and not the master. 7492 * If you want motor direction to match or oppose the master, use 7493 * FollowerRequest instead. 7494 * <ul> 7495 * <li> <b>DifferentialStrictFollower Parameters:</b> 7496 * <ul> 7497 * <li> <b>MasterID:</b> Device ID of the differential master to follow. 7498 * </ul> 7499 * </ul> 7500 * 7501 * @param request Control object to request of the device 7502 * @return Code response of the request 7503 */ 7504 @Override 7505 public StatusCode setControl(DifferentialStrictFollower request) 7506 { 7507 return setControlPrivate(request); 7508 } 7509 7510 /** 7511 * Request neutral output of actuator. The applied brake type is 7512 * determined by the NeutralMode configuration. 7513 * <ul> 7514 * <li> <b>NeutralOut Parameters:</b> 7515 * <ul> 7516 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7517 * until a timesync boundary (requires Phoenix Pro and 7518 * CANivore). This eliminates the impact of 7519 * nondeterministic network delays in exchange for a 7520 * larger but deterministic control latency. 7521 * <p> 7522 * This requires setting the ControlTimesyncFreqHz 7523 * config in MotorOutputConfigs. Additionally, when 7524 * this is enabled, the UpdateFreqHz of this request 7525 * should be set to 0 Hz. 7526 * </ul> 7527 * </ul> 7528 * 7529 * @param request Control object to request of the device 7530 * @return Code response of the request 7531 */ 7532 @Override 7533 public StatusCode setControl(NeutralOut request) 7534 { 7535 return setControlPrivate(request); 7536 } 7537 7538 /** 7539 * Request coast neutral output of actuator. The bridge is disabled 7540 * and the rotor is allowed to coast. 7541 * <ul> 7542 * <li> <b>CoastOut Parameters:</b> 7543 * <ul> 7544 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7545 * until a timesync boundary (requires Phoenix Pro and 7546 * CANivore). This eliminates the impact of 7547 * nondeterministic network delays in exchange for a 7548 * larger but deterministic control latency. 7549 * <p> 7550 * This requires setting the ControlTimesyncFreqHz 7551 * config in MotorOutputConfigs. Additionally, when 7552 * this is enabled, the UpdateFreqHz of this request 7553 * should be set to 0 Hz. 7554 * </ul> 7555 * </ul> 7556 * 7557 * @param request Control object to request of the device 7558 * @return Code response of the request 7559 */ 7560 @Override 7561 public StatusCode setControl(CoastOut request) 7562 { 7563 return setControlPrivate(request); 7564 } 7565 7566 /** 7567 * Applies full neutral-brake by shorting motor leads together. 7568 * <ul> 7569 * <li> <b>StaticBrake Parameters:</b> 7570 * <ul> 7571 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7572 * until a timesync boundary (requires Phoenix Pro and 7573 * CANivore). This eliminates the impact of 7574 * nondeterministic network delays in exchange for a 7575 * larger but deterministic control latency. 7576 * <p> 7577 * This requires setting the ControlTimesyncFreqHz 7578 * config in MotorOutputConfigs. Additionally, when 7579 * this is enabled, the UpdateFreqHz of this request 7580 * should be set to 0 Hz. 7581 * </ul> 7582 * </ul> 7583 * 7584 * @param request Control object to request of the device 7585 * @return Code response of the request 7586 */ 7587 @Override 7588 public StatusCode setControl(StaticBrake request) 7589 { 7590 return setControlPrivate(request); 7591 } 7592 7593 /** 7594 * Plays a single tone at the user specified frequency. 7595 * <ul> 7596 * <li> <b>MusicTone Parameters:</b> 7597 * <ul> 7598 * <li> <b>AudioFrequency:</b> Sound frequency to play. A value of zero will 7599 * silence the device. The effective frequency 7600 * range is 10-20000 Hz. Any nonzero frequency 7601 * less than 10 Hz will be capped to 10 Hz. Any 7602 * frequency above 20 kHz will be capped to 20 kHz. 7603 * </ul> 7604 * </ul> 7605 * 7606 * @param request Control object to request of the device 7607 * @return Code response of the request 7608 */ 7609 @Override 7610 public StatusCode setControl(MusicTone request) 7611 { 7612 return setControlPrivate(request); 7613 } 7614 7615 /** 7616 * Requests Motion Magic® to target a final velocity using a motion 7617 * profile. This allows smooth transitions between velocity set 7618 * points. Users can optionally provide a duty cycle feedforward. 7619 * <p> 7620 * Motion Magic® Velocity produces a motion profile in real-time while 7621 * attempting to honor the specified Acceleration and (optional) Jerk. 7622 * This control mode does not use the CruiseVelocity, Expo_kV, or 7623 * Expo_kA configs. 7624 * <p> 7625 * If the specified acceleration is zero, the Acceleration under 7626 * Motion Magic® configuration parameter is used instead. This allows 7627 * for runtime adjustment of acceleration for advanced users. Jerk is 7628 * also specified in the Motion Magic® persistent configuration 7629 * values. If Jerk is set to zero, Motion Magic® will produce a 7630 * trapezoidal acceleration profile. 7631 * <p> 7632 * Target velocity can also be changed on-the-fly and Motion Magic® 7633 * will do its best to adjust the profile. This control mode is duty 7634 * cycle based, so relevant closed-loop gains will use fractional duty 7635 * cycle for the numerator: +1.0 represents full forward output. 7636 * <ul> 7637 * <li> <b>MotionMagicVelocityDutyCycle Parameters:</b> 7638 * <ul> 7639 * <li> <b>Velocity:</b> Target velocity to drive toward in rotations per 7640 * second. This can be changed on-the fly. 7641 * <li> <b>Acceleration:</b> This is the absolute Acceleration to use 7642 * generating the profile. If this parameter is 7643 * zero, the Acceleration persistent configuration 7644 * parameter is used instead. Acceleration is in 7645 * rotations per second squared. If nonzero, the 7646 * signage does not matter as the absolute value is 7647 * used. 7648 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7649 * Pro), which increases peak power by ~15% on supported 7650 * devices (see {@link SupportsFOC}). Set to false to 7651 * use trapezoidal commutation. 7652 * <p> 7653 * FOC improves motor performance by leveraging torque 7654 * (current) control. However, this may be inconvenient 7655 * for applications that require specifying duty cycle 7656 * or voltage. CTR-Electronics has developed a hybrid 7657 * method that combines the performances gains of FOC 7658 * while still allowing applications to provide duty 7659 * cycle or voltage demand. This not to be confused 7660 * with simple sinusoidal control or phase voltage 7661 * control which lacks the performance gains. 7662 * <li> <b>FeedForward:</b> Feedforward to apply in fractional units between -1 7663 * and +1. 7664 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 7665 * the configuration api to set the gain values for the 7666 * selected slot before enabling this feature. Slot must be 7667 * within [0,2]. 7668 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 7669 * when output is zero (or within 7670 * deadband). Set to false to use the 7671 * NeutralMode configuration setting 7672 * (default). This flag exists to provide 7673 * the fundamental behavior of this 7674 * control when output is zero, which is 7675 * to provide 0V to the motor. 7676 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7677 * allows users to use other limit switch 7678 * sensors connected to robot controller. This 7679 * also allows use of active sensors that 7680 * require external power. 7681 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7682 * allows users to use other limit switch 7683 * sensors connected to robot controller. This 7684 * also allows use of active sensors that 7685 * require external power. 7686 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7687 * switches and the LimitForwardMotion and 7688 * LimitReverseMotion parameters, instead 7689 * allowing motion. 7690 * <p> 7691 * This can be useful on mechanisms such as 7692 * an intake/feeder, where a limit switch 7693 * stops motion while intaking but should be 7694 * ignored when feeding to a shooter. 7695 * <p> 7696 * The hardware limit faults and 7697 * Forward/ReverseLimit signals will still 7698 * report the values of the limit switches 7699 * regardless of this parameter. 7700 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7701 * until a timesync boundary (requires Phoenix Pro and 7702 * CANivore). This eliminates the impact of 7703 * nondeterministic network delays in exchange for a 7704 * larger but deterministic control latency. 7705 * <p> 7706 * This requires setting the ControlTimesyncFreqHz 7707 * config in MotorOutputConfigs. Additionally, when 7708 * this is enabled, the UpdateFreqHz of this request 7709 * should be set to 0 Hz. 7710 * </ul> 7711 * </ul> 7712 * 7713 * @param request Control object to request of the device 7714 * @return Code response of the request 7715 */ 7716 @Override 7717 public StatusCode setControl(MotionMagicVelocityDutyCycle request) 7718 { 7719 return setControlPrivate(request); 7720 } 7721 7722 /** 7723 * Requests Motion Magic® to target a final velocity using a motion 7724 * profile. This allows smooth transitions between velocity set 7725 * points. Users can optionally provide a torque feedforward. 7726 * <p> 7727 * Motion Magic® Velocity produces a motion profile in real-time while 7728 * attempting to honor the specified Acceleration and (optional) Jerk. 7729 * This control mode does not use the CruiseVelocity, Expo_kV, or 7730 * Expo_kA configs. 7731 * <p> 7732 * If the specified acceleration is zero, the Acceleration under 7733 * Motion Magic® configuration parameter is used instead. This allows 7734 * for runtime adjustment of acceleration for advanced users. Jerk is 7735 * also specified in the Motion Magic® persistent configuration 7736 * values. If Jerk is set to zero, Motion Magic® will produce a 7737 * trapezoidal acceleration profile. 7738 * <p> 7739 * Target velocity can also be changed on-the-fly and Motion Magic® 7740 * will do its best to adjust the profile. This control mode is based 7741 * on torque current, so relevant closed-loop gains will use Amperes 7742 * for the numerator. 7743 * <ul> 7744 * <li> <b>MotionMagicVelocityTorqueCurrentFOC Parameters:</b> 7745 * <ul> 7746 * <li> <b>Velocity:</b> Target velocity to drive toward in rotations per 7747 * second. This can be changed on-the fly. 7748 * <li> <b>Acceleration:</b> This is the absolute Acceleration to use 7749 * generating the profile. If this parameter is 7750 * zero, the Acceleration persistent configuration 7751 * parameter is used instead. Acceleration is in 7752 * rotations per second squared. If nonzero, the 7753 * signage does not matter as the absolute value is 7754 * used. 7755 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7756 * Pro), which increases peak power by ~15% on supported 7757 * devices (see {@link SupportsFOC}). Set to false to 7758 * use trapezoidal commutation. 7759 * <p> 7760 * FOC improves motor performance by leveraging torque 7761 * (current) control. However, this may be inconvenient 7762 * for applications that require specifying duty cycle 7763 * or voltage. CTR-Electronics has developed a hybrid 7764 * method that combines the performances gains of FOC 7765 * while still allowing applications to provide duty 7766 * cycle or voltage demand. This not to be confused 7767 * with simple sinusoidal control or phase voltage 7768 * control which lacks the performance gains. 7769 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in Amperes. 7770 * User can use motor's kT to scale Newton-meter to 7771 * Amperes. 7772 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 7773 * the configuration api to set the gain values for the 7774 * selected slot before enabling this feature. Slot must be 7775 * within [0,2]. 7776 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 7777 * output is zero (or within deadband). 7778 * Set to false to use the NeutralMode 7779 * configuration setting (default). This 7780 * flag exists to provide the fundamental 7781 * behavior of this control when output is 7782 * zero, which is to provide 0A (zero 7783 * torque). 7784 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7785 * allows users to use other limit switch 7786 * sensors connected to robot controller. This 7787 * also allows use of active sensors that 7788 * require external power. 7789 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7790 * allows users to use other limit switch 7791 * sensors connected to robot controller. This 7792 * also allows use of active sensors that 7793 * require external power. 7794 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7795 * switches and the LimitForwardMotion and 7796 * LimitReverseMotion parameters, instead 7797 * allowing motion. 7798 * <p> 7799 * This can be useful on mechanisms such as 7800 * an intake/feeder, where a limit switch 7801 * stops motion while intaking but should be 7802 * ignored when feeding to a shooter. 7803 * <p> 7804 * The hardware limit faults and 7805 * Forward/ReverseLimit signals will still 7806 * report the values of the limit switches 7807 * regardless of this parameter. 7808 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7809 * until a timesync boundary (requires Phoenix Pro and 7810 * CANivore). This eliminates the impact of 7811 * nondeterministic network delays in exchange for a 7812 * larger but deterministic control latency. 7813 * <p> 7814 * This requires setting the ControlTimesyncFreqHz 7815 * config in MotorOutputConfigs. Additionally, when 7816 * this is enabled, the UpdateFreqHz of this request 7817 * should be set to 0 Hz. 7818 * </ul> 7819 * </ul> 7820 * 7821 * @param request Control object to request of the device 7822 * @return Code response of the request 7823 */ 7824 @Override 7825 public StatusCode setControl(MotionMagicVelocityTorqueCurrentFOC request) 7826 { 7827 return setControlPrivate(request); 7828 } 7829 7830 /** 7831 * Requests Motion Magic® to target a final velocity using a motion 7832 * profile. This allows smooth transitions between velocity set 7833 * points. Users can optionally provide a voltage feedforward. 7834 * <p> 7835 * Motion Magic® Velocity produces a motion profile in real-time while 7836 * attempting to honor the specified Acceleration and (optional) Jerk. 7837 * This control mode does not use the CruiseVelocity, Expo_kV, or 7838 * Expo_kA configs. 7839 * <p> 7840 * If the specified acceleration is zero, the Acceleration under 7841 * Motion Magic® configuration parameter is used instead. This allows 7842 * for runtime adjustment of acceleration for advanced users. Jerk is 7843 * also specified in the Motion Magic® persistent configuration 7844 * values. If Jerk is set to zero, Motion Magic® will produce a 7845 * trapezoidal acceleration profile. 7846 * <p> 7847 * Target velocity can also be changed on-the-fly and Motion Magic® 7848 * will do its best to adjust the profile. This control mode is 7849 * voltage-based, so relevant closed-loop gains will use Volts for the 7850 * numerator. 7851 * <ul> 7852 * <li> <b>MotionMagicVelocityVoltage Parameters:</b> 7853 * <ul> 7854 * <li> <b>Velocity:</b> Target velocity to drive toward in rotations per 7855 * second. This can be changed on-the fly. 7856 * <li> <b>Acceleration:</b> This is the absolute Acceleration to use 7857 * generating the profile. If this parameter is 7858 * zero, the Acceleration persistent configuration 7859 * parameter is used instead. Acceleration is in 7860 * rotations per second squared. If nonzero, the 7861 * signage does not matter as the absolute value is 7862 * used. 7863 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7864 * Pro), which increases peak power by ~15% on supported 7865 * devices (see {@link SupportsFOC}). Set to false to 7866 * use trapezoidal commutation. 7867 * <p> 7868 * FOC improves motor performance by leveraging torque 7869 * (current) control. However, this may be inconvenient 7870 * for applications that require specifying duty cycle 7871 * or voltage. CTR-Electronics has developed a hybrid 7872 * method that combines the performances gains of FOC 7873 * while still allowing applications to provide duty 7874 * cycle or voltage demand. This not to be confused 7875 * with simple sinusoidal control or phase voltage 7876 * control which lacks the performance gains. 7877 * <li> <b>FeedForward:</b> Feedforward to apply in volts 7878 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 7879 * the configuration api to set the gain values for the 7880 * selected slot before enabling this feature. Slot must be 7881 * within [0,2]. 7882 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 7883 * when output is zero (or within 7884 * deadband). Set to false to use the 7885 * NeutralMode configuration setting 7886 * (default). This flag exists to provide 7887 * the fundamental behavior of this 7888 * control when output is zero, which is 7889 * to provide 0V to the motor. 7890 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7891 * allows users to use other limit switch 7892 * sensors connected to robot controller. This 7893 * also allows use of active sensors that 7894 * require external power. 7895 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7896 * allows users to use other limit switch 7897 * sensors connected to robot controller. This 7898 * also allows use of active sensors that 7899 * require external power. 7900 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7901 * switches and the LimitForwardMotion and 7902 * LimitReverseMotion parameters, instead 7903 * allowing motion. 7904 * <p> 7905 * This can be useful on mechanisms such as 7906 * an intake/feeder, where a limit switch 7907 * stops motion while intaking but should be 7908 * ignored when feeding to a shooter. 7909 * <p> 7910 * The hardware limit faults and 7911 * Forward/ReverseLimit signals will still 7912 * report the values of the limit switches 7913 * regardless of this parameter. 7914 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 7915 * until a timesync boundary (requires Phoenix Pro and 7916 * CANivore). This eliminates the impact of 7917 * nondeterministic network delays in exchange for a 7918 * larger but deterministic control latency. 7919 * <p> 7920 * This requires setting the ControlTimesyncFreqHz 7921 * config in MotorOutputConfigs. Additionally, when 7922 * this is enabled, the UpdateFreqHz of this request 7923 * should be set to 0 Hz. 7924 * </ul> 7925 * </ul> 7926 * 7927 * @param request Control object to request of the device 7928 * @return Code response of the request 7929 */ 7930 @Override 7931 public StatusCode setControl(MotionMagicVelocityVoltage request) 7932 { 7933 return setControlPrivate(request); 7934 } 7935 7936 /** 7937 * Requests Motion Magic® to target a final position using an 7938 * exponential motion profile. Users can optionally provide a duty 7939 * cycle feedforward. 7940 * <p> 7941 * Motion Magic® Expo produces a motion profile in real-time while 7942 * attempting to honor the Cruise Velocity (optional) and the 7943 * mechanism kV and kA, specified via the Motion Magic® configuration 7944 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA 7945 * configs are always in output units of Volts. 7946 * <p> 7947 * Setting Cruise Velocity to 0 will allow the profile to run to the 7948 * max possible velocity based on Expo_kV. This control mode does not 7949 * use the Acceleration or Jerk configs. 7950 * <p> 7951 * Target position can be changed on-the-fly and Motion Magic® will do 7952 * its best to adjust the profile. This control mode is duty cycle 7953 * based, so relevant closed-loop gains will use fractional duty cycle 7954 * for the numerator: +1.0 represents full forward output. 7955 * <ul> 7956 * <li> <b>MotionMagicExpoDutyCycle Parameters:</b> 7957 * <ul> 7958 * <li> <b>Position:</b> Position to drive toward in rotations. 7959 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 7960 * Pro), which increases peak power by ~15% on supported 7961 * devices (see {@link SupportsFOC}). Set to false to 7962 * use trapezoidal commutation. 7963 * <p> 7964 * FOC improves motor performance by leveraging torque 7965 * (current) control. However, this may be inconvenient 7966 * for applications that require specifying duty cycle 7967 * or voltage. CTR-Electronics has developed a hybrid 7968 * method that combines the performances gains of FOC 7969 * while still allowing applications to provide duty 7970 * cycle or voltage demand. This not to be confused 7971 * with simple sinusoidal control or phase voltage 7972 * control which lacks the performance gains. 7973 * <li> <b>FeedForward:</b> Feedforward to apply in fractional units between -1 7974 * and +1. 7975 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 7976 * the configuration api to set the gain values for the 7977 * selected slot before enabling this feature. Slot must be 7978 * within [0,2]. 7979 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 7980 * when output is zero (or within 7981 * deadband). Set to false to use the 7982 * NeutralMode configuration setting 7983 * (default). This flag exists to provide 7984 * the fundamental behavior of this 7985 * control when output is zero, which is 7986 * to provide 0V to the motor. 7987 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 7988 * allows users to use other limit switch 7989 * sensors connected to robot controller. This 7990 * also allows use of active sensors that 7991 * require external power. 7992 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 7993 * allows users to use other limit switch 7994 * sensors connected to robot controller. This 7995 * also allows use of active sensors that 7996 * require external power. 7997 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 7998 * switches and the LimitForwardMotion and 7999 * LimitReverseMotion parameters, instead 8000 * allowing motion. 8001 * <p> 8002 * This can be useful on mechanisms such as 8003 * an intake/feeder, where a limit switch 8004 * stops motion while intaking but should be 8005 * ignored when feeding to a shooter. 8006 * <p> 8007 * The hardware limit faults and 8008 * Forward/ReverseLimit signals will still 8009 * report the values of the limit switches 8010 * regardless of this parameter. 8011 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 8012 * until a timesync boundary (requires Phoenix Pro and 8013 * CANivore). This eliminates the impact of 8014 * nondeterministic network delays in exchange for a 8015 * larger but deterministic control latency. 8016 * <p> 8017 * This requires setting the ControlTimesyncFreqHz 8018 * config in MotorOutputConfigs. Additionally, when 8019 * this is enabled, the UpdateFreqHz of this request 8020 * should be set to 0 Hz. 8021 * </ul> 8022 * </ul> 8023 * 8024 * @param request Control object to request of the device 8025 * @return Code response of the request 8026 */ 8027 @Override 8028 public StatusCode setControl(MotionMagicExpoDutyCycle request) 8029 { 8030 return setControlPrivate(request); 8031 } 8032 8033 /** 8034 * Requests Motion Magic® to target a final position using an 8035 * exponential motion profile. Users can optionally provide a voltage 8036 * feedforward. 8037 * <p> 8038 * Motion Magic® Expo produces a motion profile in real-time while 8039 * attempting to honor the Cruise Velocity (optional) and the 8040 * mechanism kV and kA, specified via the Motion Magic® configuration 8041 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA 8042 * configs are always in output units of Volts. 8043 * <p> 8044 * Setting Cruise Velocity to 0 will allow the profile to run to the 8045 * max possible velocity based on Expo_kV. This control mode does not 8046 * use the Acceleration or Jerk configs. 8047 * <p> 8048 * Target position can be changed on-the-fly and Motion Magic® will do 8049 * its best to adjust the profile. This control mode is 8050 * voltage-based, so relevant closed-loop gains will use Volts for the 8051 * numerator. 8052 * <ul> 8053 * <li> <b>MotionMagicExpoVoltage Parameters:</b> 8054 * <ul> 8055 * <li> <b>Position:</b> Position to drive toward in rotations. 8056 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 8057 * Pro), which increases peak power by ~15% on supported 8058 * devices (see {@link SupportsFOC}). Set to false to 8059 * use trapezoidal commutation. 8060 * <p> 8061 * FOC improves motor performance by leveraging torque 8062 * (current) control. However, this may be inconvenient 8063 * for applications that require specifying duty cycle 8064 * or voltage. CTR-Electronics has developed a hybrid 8065 * method that combines the performances gains of FOC 8066 * while still allowing applications to provide duty 8067 * cycle or voltage demand. This not to be confused 8068 * with simple sinusoidal control or phase voltage 8069 * control which lacks the performance gains. 8070 * <li> <b>FeedForward:</b> Feedforward to apply in volts 8071 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 8072 * the configuration api to set the gain values for the 8073 * selected slot before enabling this feature. Slot must be 8074 * within [0,2]. 8075 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 8076 * when output is zero (or within 8077 * deadband). Set to false to use the 8078 * NeutralMode configuration setting 8079 * (default). This flag exists to provide 8080 * the fundamental behavior of this 8081 * control when output is zero, which is 8082 * to provide 0V to the motor. 8083 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 8084 * allows users to use other limit switch 8085 * sensors connected to robot controller. This 8086 * also allows use of active sensors that 8087 * require external power. 8088 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 8089 * allows users to use other limit switch 8090 * sensors connected to robot controller. This 8091 * also allows use of active sensors that 8092 * require external power. 8093 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 8094 * switches and the LimitForwardMotion and 8095 * LimitReverseMotion parameters, instead 8096 * allowing motion. 8097 * <p> 8098 * This can be useful on mechanisms such as 8099 * an intake/feeder, where a limit switch 8100 * stops motion while intaking but should be 8101 * ignored when feeding to a shooter. 8102 * <p> 8103 * The hardware limit faults and 8104 * Forward/ReverseLimit signals will still 8105 * report the values of the limit switches 8106 * regardless of this parameter. 8107 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 8108 * until a timesync boundary (requires Phoenix Pro and 8109 * CANivore). This eliminates the impact of 8110 * nondeterministic network delays in exchange for a 8111 * larger but deterministic control latency. 8112 * <p> 8113 * This requires setting the ControlTimesyncFreqHz 8114 * config in MotorOutputConfigs. Additionally, when 8115 * this is enabled, the UpdateFreqHz of this request 8116 * should be set to 0 Hz. 8117 * </ul> 8118 * </ul> 8119 * 8120 * @param request Control object to request of the device 8121 * @return Code response of the request 8122 */ 8123 @Override 8124 public StatusCode setControl(MotionMagicExpoVoltage request) 8125 { 8126 return setControlPrivate(request); 8127 } 8128 8129 /** 8130 * Requests Motion Magic® to target a final position using an 8131 * exponential motion profile. Users can optionally provide a torque 8132 * current feedforward. 8133 * <p> 8134 * Motion Magic® Expo produces a motion profile in real-time while 8135 * attempting to honor the Cruise Velocity (optional) and the 8136 * mechanism kV and kA, specified via the Motion Magic® configuration 8137 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA 8138 * configs are always in output units of Volts. 8139 * <p> 8140 * Setting Cruise Velocity to 0 will allow the profile to run to the 8141 * max possible velocity based on Expo_kV. This control mode does not 8142 * use the Acceleration or Jerk configs. 8143 * <p> 8144 * Target position can be changed on-the-fly and Motion Magic® will do 8145 * its best to adjust the profile. This control mode is based on 8146 * torque current, so relevant closed-loop gains will use Amperes for 8147 * the numerator. 8148 * <ul> 8149 * <li> <b>MotionMagicExpoTorqueCurrentFOC Parameters:</b> 8150 * <ul> 8151 * <li> <b>Position:</b> Position to drive toward in rotations. 8152 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in Amperes. 8153 * User can use motor's kT to scale Newton-meter to 8154 * Amperes. 8155 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 8156 * the configuration api to set the gain values for the 8157 * selected slot before enabling this feature. Slot must be 8158 * within [0,2]. 8159 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 8160 * output is zero (or within deadband). 8161 * Set to false to use the NeutralMode 8162 * configuration setting (default). This 8163 * flag exists to provide the fundamental 8164 * behavior of this control when output is 8165 * zero, which is to provide 0A (zero 8166 * torque). 8167 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 8168 * allows users to use other limit switch 8169 * sensors connected to robot controller. This 8170 * also allows use of active sensors that 8171 * require external power. 8172 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 8173 * allows users to use other limit switch 8174 * sensors connected to robot controller. This 8175 * also allows use of active sensors that 8176 * require external power. 8177 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 8178 * switches and the LimitForwardMotion and 8179 * LimitReverseMotion parameters, instead 8180 * allowing motion. 8181 * <p> 8182 * This can be useful on mechanisms such as 8183 * an intake/feeder, where a limit switch 8184 * stops motion while intaking but should be 8185 * ignored when feeding to a shooter. 8186 * <p> 8187 * The hardware limit faults and 8188 * Forward/ReverseLimit signals will still 8189 * report the values of the limit switches 8190 * regardless of this parameter. 8191 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 8192 * until a timesync boundary (requires Phoenix Pro and 8193 * CANivore). This eliminates the impact of 8194 * nondeterministic network delays in exchange for a 8195 * larger but deterministic control latency. 8196 * <p> 8197 * This requires setting the ControlTimesyncFreqHz 8198 * config in MotorOutputConfigs. Additionally, when 8199 * this is enabled, the UpdateFreqHz of this request 8200 * should be set to 0 Hz. 8201 * </ul> 8202 * </ul> 8203 * 8204 * @param request Control object to request of the device 8205 * @return Code response of the request 8206 */ 8207 @Override 8208 public StatusCode setControl(MotionMagicExpoTorqueCurrentFOC request) 8209 { 8210 return setControlPrivate(request); 8211 } 8212 8213 /** 8214 * Requests Motion Magic® to target a final position using a motion 8215 * profile. This dynamic request allows runtime changes to Cruise 8216 * Velocity, Acceleration, and Jerk. Users can optionally provide a 8217 * duty cycle feedforward. This control requires use of a CANivore. 8218 * <p> 8219 * Motion Magic® produces a motion profile in real-time while 8220 * attempting to honor the specified Cruise Velocity, Acceleration, 8221 * and (optional) Jerk. This control mode does not use the Expo_kV or 8222 * Expo_kA configs. 8223 * <p> 8224 * Target position can be changed on-the-fly and Motion Magic® will do 8225 * its best to adjust the profile. This control mode is duty cycle 8226 * based, so relevant closed-loop gains will use fractional duty cycle 8227 * for the numerator: +1.0 represents full forward output. 8228 * <ul> 8229 * <li> <b>DynamicMotionMagicDutyCycle Parameters:</b> 8230 * <ul> 8231 * <li> <b>Position:</b> Position to drive toward in rotations. 8232 * <li> <b>Velocity:</b> Cruise velocity for profiling. The signage does not 8233 * matter as the device will use the absolute value for 8234 * profile generation. 8235 * <li> <b>Acceleration:</b> Acceleration for profiling. The signage does not 8236 * matter as the device will use the absolute value 8237 * for profile generation 8238 * <li> <b>Jerk:</b> Jerk for profiling. The signage does not matter as the 8239 * device will use the absolute value for profile generation. 8240 * <p> 8241 * Jerk is optional; if this is set to zero, then Motion 8242 * Magic® will not apply a Jerk limit. 8243 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 8244 * Pro), which increases peak power by ~15% on supported 8245 * devices (see {@link SupportsFOC}). Set to false to 8246 * use trapezoidal commutation. 8247 * <p> 8248 * FOC improves motor performance by leveraging torque 8249 * (current) control. However, this may be inconvenient 8250 * for applications that require specifying duty cycle 8251 * or voltage. CTR-Electronics has developed a hybrid 8252 * method that combines the performances gains of FOC 8253 * while still allowing applications to provide duty 8254 * cycle or voltage demand. This not to be confused 8255 * with simple sinusoidal control or phase voltage 8256 * control which lacks the performance gains. 8257 * <li> <b>FeedForward:</b> Feedforward to apply in fractional units between -1 8258 * and +1. 8259 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 8260 * the configuration api to set the gain values for the 8261 * selected slot before enabling this feature. Slot must be 8262 * within [0,2]. 8263 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 8264 * when output is zero (or within 8265 * deadband). Set to false to use the 8266 * NeutralMode configuration setting 8267 * (default). This flag exists to provide 8268 * the fundamental behavior of this 8269 * control when output is zero, which is 8270 * to provide 0V to the motor. 8271 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 8272 * allows users to use other limit switch 8273 * sensors connected to robot controller. This 8274 * also allows use of active sensors that 8275 * require external power. 8276 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 8277 * allows users to use other limit switch 8278 * sensors connected to robot controller. This 8279 * also allows use of active sensors that 8280 * require external power. 8281 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 8282 * switches and the LimitForwardMotion and 8283 * LimitReverseMotion parameters, instead 8284 * allowing motion. 8285 * <p> 8286 * This can be useful on mechanisms such as 8287 * an intake/feeder, where a limit switch 8288 * stops motion while intaking but should be 8289 * ignored when feeding to a shooter. 8290 * <p> 8291 * The hardware limit faults and 8292 * Forward/ReverseLimit signals will still 8293 * report the values of the limit switches 8294 * regardless of this parameter. 8295 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 8296 * until a timesync boundary (requires Phoenix Pro and 8297 * CANivore). This eliminates the impact of 8298 * nondeterministic network delays in exchange for a 8299 * larger but deterministic control latency. 8300 * <p> 8301 * This requires setting the ControlTimesyncFreqHz 8302 * config in MotorOutputConfigs. Additionally, when 8303 * this is enabled, the UpdateFreqHz of this request 8304 * should be set to 0 Hz. 8305 * </ul> 8306 * </ul> 8307 * 8308 * @param request Control object to request of the device 8309 * @return Code response of the request 8310 */ 8311 @Override 8312 public StatusCode setControl(DynamicMotionMagicDutyCycle request) 8313 { 8314 return setControlPrivate(request); 8315 } 8316 8317 /** 8318 * Requests Motion Magic® to target a final position using a motion 8319 * profile. This dynamic request allows runtime changes to Cruise 8320 * Velocity, Acceleration, and Jerk. Users can optionally provide a 8321 * voltage feedforward. This control requires use of a CANivore. 8322 * <p> 8323 * Motion Magic® produces a motion profile in real-time while 8324 * attempting to honor the specified Cruise Velocity, Acceleration, 8325 * and (optional) Jerk. This control mode does not use the Expo_kV or 8326 * Expo_kA configs. 8327 * <p> 8328 * Target position can be changed on-the-fly and Motion Magic® will do 8329 * its best to adjust the profile. This control mode is 8330 * voltage-based, so relevant closed-loop gains will use Volts for the 8331 * numerator. 8332 * <ul> 8333 * <li> <b>DynamicMotionMagicVoltage Parameters:</b> 8334 * <ul> 8335 * <li> <b>Position:</b> Position to drive toward in rotations. 8336 * <li> <b>Velocity:</b> Cruise velocity for profiling. The signage does not 8337 * matter as the device will use the absolute value for 8338 * profile generation. 8339 * <li> <b>Acceleration:</b> Acceleration for profiling. The signage does not 8340 * matter as the device will use the absolute value 8341 * for profile generation. 8342 * <li> <b>Jerk:</b> Jerk for profiling. The signage does not matter as the 8343 * device will use the absolute value for profile generation. 8344 * <p> 8345 * Jerk is optional; if this is set to zero, then Motion 8346 * Magic® will not apply a Jerk limit. 8347 * <li> <b>EnableFOC:</b> Set to true to use FOC commutation (requires Phoenix 8348 * Pro), which increases peak power by ~15% on supported 8349 * devices (see {@link SupportsFOC}). Set to false to 8350 * use trapezoidal commutation. 8351 * <p> 8352 * FOC improves motor performance by leveraging torque 8353 * (current) control. However, this may be inconvenient 8354 * for applications that require specifying duty cycle 8355 * or voltage. CTR-Electronics has developed a hybrid 8356 * method that combines the performances gains of FOC 8357 * while still allowing applications to provide duty 8358 * cycle or voltage demand. This not to be confused 8359 * with simple sinusoidal control or phase voltage 8360 * control which lacks the performance gains. 8361 * <li> <b>FeedForward:</b> Feedforward to apply in volts 8362 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 8363 * the configuration api to set the gain values for the 8364 * selected slot before enabling this feature. Slot must be 8365 * within [0,2]. 8366 * <li> <b>OverrideBrakeDurNeutral:</b> Set to true to static-brake the rotor 8367 * when output is zero (or within 8368 * deadband). Set to false to use the 8369 * NeutralMode configuration setting 8370 * (default). This flag exists to provide 8371 * the fundamental behavior of this 8372 * control when output is zero, which is 8373 * to provide 0V to the motor. 8374 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 8375 * allows users to use other limit switch 8376 * sensors connected to robot controller. This 8377 * also allows use of active sensors that 8378 * require external power. 8379 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 8380 * allows users to use other limit switch 8381 * sensors connected to robot controller. This 8382 * also allows use of active sensors that 8383 * require external power. 8384 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 8385 * switches and the LimitForwardMotion and 8386 * LimitReverseMotion parameters, instead 8387 * allowing motion. 8388 * <p> 8389 * This can be useful on mechanisms such as 8390 * an intake/feeder, where a limit switch 8391 * stops motion while intaking but should be 8392 * ignored when feeding to a shooter. 8393 * <p> 8394 * The hardware limit faults and 8395 * Forward/ReverseLimit signals will still 8396 * report the values of the limit switches 8397 * regardless of this parameter. 8398 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 8399 * until a timesync boundary (requires Phoenix Pro and 8400 * CANivore). This eliminates the impact of 8401 * nondeterministic network delays in exchange for a 8402 * larger but deterministic control latency. 8403 * <p> 8404 * This requires setting the ControlTimesyncFreqHz 8405 * config in MotorOutputConfigs. Additionally, when 8406 * this is enabled, the UpdateFreqHz of this request 8407 * should be set to 0 Hz. 8408 * </ul> 8409 * </ul> 8410 * 8411 * @param request Control object to request of the device 8412 * @return Code response of the request 8413 */ 8414 @Override 8415 public StatusCode setControl(DynamicMotionMagicVoltage request) 8416 { 8417 return setControlPrivate(request); 8418 } 8419 8420 /** 8421 * Requests Motion Magic® to target a final position using a motion 8422 * profile. This dynamic request allows runtime changes to Cruise 8423 * Velocity, Acceleration, and Jerk. Users can optionally provide a 8424 * torque current feedforward. This control requires use of a 8425 * CANivore. 8426 * <p> 8427 * Motion Magic® produces a motion profile in real-time while 8428 * attempting to honor the specified Cruise Velocity, Acceleration, 8429 * and (optional) Jerk. This control mode does not use the Expo_kV or 8430 * Expo_kA configs. 8431 * <p> 8432 * Target position can be changed on-the-fly and Motion Magic® will do 8433 * its best to adjust the profile. This control mode is based on 8434 * torque current, so relevant closed-loop gains will use Amperes for 8435 * the numerator. 8436 * <ul> 8437 * <li> <b>DynamicMotionMagicTorqueCurrentFOC Parameters:</b> 8438 * <ul> 8439 * <li> <b>Position:</b> Position to drive toward in rotations. 8440 * <li> <b>Velocity:</b> Cruise velocity for profiling. The signage does not 8441 * matter as the device will use the absolute value for 8442 * profile generation. 8443 * <li> <b>Acceleration:</b> Acceleration for profiling. The signage does not 8444 * matter as the device will use the absolute value 8445 * for profile generation. 8446 * <li> <b>Jerk:</b> Jerk for profiling. The signage does not matter as the 8447 * device will use the absolute value for profile generation. 8448 * <p> 8449 * Jerk is optional; if this is set to zero, then Motion 8450 * Magic® will not apply a Jerk limit. 8451 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in Amperes. 8452 * User can use motor's kT to scale Newton-meter to 8453 * Amperes. 8454 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. Use 8455 * the configuration api to set the gain values for the 8456 * selected slot before enabling this feature. Slot must be 8457 * within [0,2]. 8458 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 8459 * output is zero (or within deadband). 8460 * Set to false to use the NeutralMode 8461 * configuration setting (default). This 8462 * flag exists to provide the fundamental 8463 * behavior of this control when output is 8464 * zero, which is to provide 0A (zero 8465 * torque). 8466 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. This 8467 * allows users to use other limit switch 8468 * sensors connected to robot controller. This 8469 * also allows use of active sensors that 8470 * require external power. 8471 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. This 8472 * allows users to use other limit switch 8473 * sensors connected to robot controller. This 8474 * also allows use of active sensors that 8475 * require external power. 8476 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 8477 * switches and the LimitForwardMotion and 8478 * LimitReverseMotion parameters, instead 8479 * allowing motion. 8480 * <p> 8481 * This can be useful on mechanisms such as 8482 * an intake/feeder, where a limit switch 8483 * stops motion while intaking but should be 8484 * ignored when feeding to a shooter. 8485 * <p> 8486 * The hardware limit faults and 8487 * Forward/ReverseLimit signals will still 8488 * report the values of the limit switches 8489 * regardless of this parameter. 8490 * <li> <b>UseTimesync:</b> Set to true to delay applying this control request 8491 * until a timesync boundary (requires Phoenix Pro and 8492 * CANivore). This eliminates the impact of 8493 * nondeterministic network delays in exchange for a 8494 * larger but deterministic control latency. 8495 * <p> 8496 * This requires setting the ControlTimesyncFreqHz 8497 * config in MotorOutputConfigs. Additionally, when 8498 * this is enabled, the UpdateFreqHz of this request 8499 * should be set to 0 Hz. 8500 * </ul> 8501 * </ul> 8502 * 8503 * @param request Control object to request of the device 8504 * @return Code response of the request 8505 */ 8506 @Override 8507 public StatusCode setControl(DynamicMotionMagicTorqueCurrentFOC request) 8508 { 8509 return setControlPrivate(request); 8510 } 8511 8512 /** 8513 * Differential control with duty cycle average target and position 8514 * difference target. 8515 * <ul> 8516 * <li> <b>Diff_DutyCycleOut_Position Parameters:</b> 8517 * <ul> 8518 * <li> <b>AverageRequest:</b> Average DutyCycleOut request of the mechanism. 8519 * <li> <b>DifferentialRequest:</b> Differential PositionDutyCycle request of 8520 * the mechanism. 8521 * </ul> 8522 * </ul> 8523 * 8524 * @param request Control object to request of the device 8525 * @return Code response of the request 8526 */ 8527 @Override 8528 public StatusCode setControl(Diff_DutyCycleOut_Position request) 8529 { 8530 return setControlPrivate(request); 8531 } 8532 8533 /** 8534 * Differential control with position average target and position 8535 * difference target using dutycycle control. 8536 * <ul> 8537 * <li> <b>Diff_PositionDutyCycle_Position Parameters:</b> 8538 * <ul> 8539 * <li> <b>AverageRequest:</b> Average PositionDutyCycle request of the 8540 * mechanism. 8541 * <li> <b>DifferentialRequest:</b> Differential PositionDutyCycle request of 8542 * the mechanism. 8543 * </ul> 8544 * </ul> 8545 * 8546 * @param request Control object to request of the device 8547 * @return Code response of the request 8548 */ 8549 @Override 8550 public StatusCode setControl(Diff_PositionDutyCycle_Position request) 8551 { 8552 return setControlPrivate(request); 8553 } 8554 8555 /** 8556 * Differential control with velocity average target and position 8557 * difference target using dutycycle control. 8558 * <ul> 8559 * <li> <b>Diff_VelocityDutyCycle_Position Parameters:</b> 8560 * <ul> 8561 * <li> <b>AverageRequest:</b> Average VelocityDutyCYcle request of the 8562 * mechanism. 8563 * <li> <b>DifferentialRequest:</b> Differential PositionDutyCycle request of 8564 * the mechanism. 8565 * </ul> 8566 * </ul> 8567 * 8568 * @param request Control object to request of the device 8569 * @return Code response of the request 8570 */ 8571 @Override 8572 public StatusCode setControl(Diff_VelocityDutyCycle_Position request) 8573 { 8574 return setControlPrivate(request); 8575 } 8576 8577 /** 8578 * Differential control with Motion Magic® average target and position 8579 * difference target using dutycycle control. 8580 * <ul> 8581 * <li> <b>Diff_MotionMagicDutyCycle_Position Parameters:</b> 8582 * <ul> 8583 * <li> <b>AverageRequest:</b> Average MotionMagicDutyCycle request of the 8584 * mechanism. 8585 * <li> <b>DifferentialRequest:</b> Differential PositionDutyCycle request of 8586 * the mechanism. 8587 * </ul> 8588 * </ul> 8589 * 8590 * @param request Control object to request of the device 8591 * @return Code response of the request 8592 */ 8593 @Override 8594 public StatusCode setControl(Diff_MotionMagicDutyCycle_Position request) 8595 { 8596 return setControlPrivate(request); 8597 } 8598 8599 /** 8600 * Differential control with duty cycle average target and velocity 8601 * difference target. 8602 * <ul> 8603 * <li> <b>Diff_DutyCycleOut_Velocity Parameters:</b> 8604 * <ul> 8605 * <li> <b>AverageRequest:</b> Average DutyCycleOut request of the mechanism. 8606 * <li> <b>DifferentialRequest:</b> Differential VelocityDutyCycle request of 8607 * the mechanism. 8608 * </ul> 8609 * </ul> 8610 * 8611 * @param request Control object to request of the device 8612 * @return Code response of the request 8613 */ 8614 @Override 8615 public StatusCode setControl(Diff_DutyCycleOut_Velocity request) 8616 { 8617 return setControlPrivate(request); 8618 } 8619 8620 /** 8621 * Differential control with position average target and velocity 8622 * difference target using dutycycle control. 8623 * <ul> 8624 * <li> <b>Diff_PositionDutyCycle_Velocity Parameters:</b> 8625 * <ul> 8626 * <li> <b>AverageRequest:</b> Average PositionDutyCycle request of the 8627 * mechanism. 8628 * <li> <b>DifferentialRequest:</b> Differential VelocityDutyCycle request of 8629 * the mechanism. 8630 * </ul> 8631 * </ul> 8632 * 8633 * @param request Control object to request of the device 8634 * @return Code response of the request 8635 */ 8636 @Override 8637 public StatusCode setControl(Diff_PositionDutyCycle_Velocity request) 8638 { 8639 return setControlPrivate(request); 8640 } 8641 8642 /** 8643 * Differential control with velocity average target and velocity 8644 * difference target using dutycycle control. 8645 * <ul> 8646 * <li> <b>Diff_VelocityDutyCycle_Velocity Parameters:</b> 8647 * <ul> 8648 * <li> <b>AverageRequest:</b> Average VelocityDutyCycle request of the 8649 * mechanism. 8650 * <li> <b>DifferentialRequest:</b> Differential VelocityDutyCycle request of 8651 * the mechanism. 8652 * </ul> 8653 * </ul> 8654 * 8655 * @param request Control object to request of the device 8656 * @return Code response of the request 8657 */ 8658 @Override 8659 public StatusCode setControl(Diff_VelocityDutyCycle_Velocity request) 8660 { 8661 return setControlPrivate(request); 8662 } 8663 8664 /** 8665 * Differential control with Motion Magic® average target and velocity 8666 * difference target using dutycycle control. 8667 * <ul> 8668 * <li> <b>Diff_MotionMagicDutyCycle_Velocity Parameters:</b> 8669 * <ul> 8670 * <li> <b>AverageRequest:</b> Average MotionMagicDutyCycle request of the 8671 * mechanism. 8672 * <li> <b>DifferentialRequest:</b> Differential VelocityDutyCycle request of 8673 * the mechanism. 8674 * </ul> 8675 * </ul> 8676 * 8677 * @param request Control object to request of the device 8678 * @return Code response of the request 8679 */ 8680 @Override 8681 public StatusCode setControl(Diff_MotionMagicDutyCycle_Velocity request) 8682 { 8683 return setControlPrivate(request); 8684 } 8685 8686 /** 8687 * Differential control with voltage average target and position 8688 * difference target. 8689 * <ul> 8690 * <li> <b>Diff_VoltageOut_Position Parameters:</b> 8691 * <ul> 8692 * <li> <b>AverageRequest:</b> Average VoltageOut request of the mechanism. 8693 * <li> <b>DifferentialRequest:</b> Differential PositionVoltage request of the 8694 * mechanism. 8695 * </ul> 8696 * </ul> 8697 * 8698 * @param request Control object to request of the device 8699 * @return Code response of the request 8700 */ 8701 @Override 8702 public StatusCode setControl(Diff_VoltageOut_Position request) 8703 { 8704 return setControlPrivate(request); 8705 } 8706 8707 /** 8708 * Differential control with position average target and position 8709 * difference target using voltage control. 8710 * <ul> 8711 * <li> <b>Diff_PositionVoltage_Position Parameters:</b> 8712 * <ul> 8713 * <li> <b>AverageRequest:</b> Average PositionVoltage request of the 8714 * mechanism. 8715 * <li> <b>DifferentialRequest:</b> Differential PositionVoltage request of the 8716 * mechanism. 8717 * </ul> 8718 * </ul> 8719 * 8720 * @param request Control object to request of the device 8721 * @return Code response of the request 8722 */ 8723 @Override 8724 public StatusCode setControl(Diff_PositionVoltage_Position request) 8725 { 8726 return setControlPrivate(request); 8727 } 8728 8729 /** 8730 * Differential control with velocity average target and position 8731 * difference target using voltage control. 8732 * <ul> 8733 * <li> <b>Diff_VelocityVoltage_Position Parameters:</b> 8734 * <ul> 8735 * <li> <b>AverageRequest:</b> Average VelocityVoltage request of the 8736 * mechanism. 8737 * <li> <b>DifferentialRequest:</b> Differential PositionVoltage request of the 8738 * mechanism. 8739 * </ul> 8740 * </ul> 8741 * 8742 * @param request Control object to request of the device 8743 * @return Code response of the request 8744 */ 8745 @Override 8746 public StatusCode setControl(Diff_VelocityVoltage_Position request) 8747 { 8748 return setControlPrivate(request); 8749 } 8750 8751 /** 8752 * Differential control with Motion Magic® average target and position 8753 * difference target using voltage control. 8754 * <ul> 8755 * <li> <b>Diff_MotionMagicVoltage_Position Parameters:</b> 8756 * <ul> 8757 * <li> <b>AverageRequest:</b> Average MotionMagicVoltage request of the 8758 * mechanism. 8759 * <li> <b>DifferentialRequest:</b> Differential PositionVoltage request of the 8760 * mechanism. 8761 * </ul> 8762 * </ul> 8763 * 8764 * @param request Control object to request of the device 8765 * @return Code response of the request 8766 */ 8767 @Override 8768 public StatusCode setControl(Diff_MotionMagicVoltage_Position request) 8769 { 8770 return setControlPrivate(request); 8771 } 8772 8773 /** 8774 * Differential control with voltage average target and velocity 8775 * difference target. 8776 * <ul> 8777 * <li> <b>Diff_VoltageOut_Velocity Parameters:</b> 8778 * <ul> 8779 * <li> <b>AverageRequest:</b> Average VoltageOut request of the mechanism. 8780 * <li> <b>DifferentialRequest:</b> Differential VelocityVoltage request of the 8781 * mechanism. 8782 * </ul> 8783 * </ul> 8784 * 8785 * @param request Control object to request of the device 8786 * @return Code response of the request 8787 */ 8788 @Override 8789 public StatusCode setControl(Diff_VoltageOut_Velocity request) 8790 { 8791 return setControlPrivate(request); 8792 } 8793 8794 /** 8795 * Differential control with position average target and velocity 8796 * difference target using voltage control. 8797 * <ul> 8798 * <li> <b>Diff_PositionVoltage_Velocity Parameters:</b> 8799 * <ul> 8800 * <li> <b>AverageRequest:</b> Average PositionVoltage request of the 8801 * mechanism. 8802 * <li> <b>DifferentialRequest:</b> Differential VelocityVoltage request of the 8803 * mechanism. 8804 * </ul> 8805 * </ul> 8806 * 8807 * @param request Control object to request of the device 8808 * @return Code response of the request 8809 */ 8810 @Override 8811 public StatusCode setControl(Diff_PositionVoltage_Velocity request) 8812 { 8813 return setControlPrivate(request); 8814 } 8815 8816 /** 8817 * Differential control with velocity average target and velocity 8818 * difference target using voltage control. 8819 * <ul> 8820 * <li> <b>Diff_VelocityVoltage_Velocity Parameters:</b> 8821 * <ul> 8822 * <li> <b>AverageRequest:</b> Average VelocityVoltage request of the 8823 * mechanism. 8824 * <li> <b>DifferentialRequest:</b> Differential VelocityVoltage request of the 8825 * mechanism. 8826 * </ul> 8827 * </ul> 8828 * 8829 * @param request Control object to request of the device 8830 * @return Code response of the request 8831 */ 8832 @Override 8833 public StatusCode setControl(Diff_VelocityVoltage_Velocity request) 8834 { 8835 return setControlPrivate(request); 8836 } 8837 8838 /** 8839 * Differential control with Motion Magic® average target and velocity 8840 * difference target using voltage control. 8841 * <ul> 8842 * <li> <b>Diff_MotionMagicVoltage_Velocity Parameters:</b> 8843 * <ul> 8844 * <li> <b>AverageRequest:</b> Average MotionMagicVoltage request of the 8845 * mechanism. 8846 * <li> <b>DifferentialRequest:</b> Differential VelocityVoltage request of the 8847 * mechanism. 8848 * </ul> 8849 * </ul> 8850 * 8851 * @param request Control object to request of the device 8852 * @return Code response of the request 8853 */ 8854 @Override 8855 public StatusCode setControl(Diff_MotionMagicVoltage_Velocity request) 8856 { 8857 return setControlPrivate(request); 8858 } 8859 8860 /** 8861 * Differential control with torque current average target and 8862 * position difference target. 8863 * <ul> 8864 * <li> <b>Diff_TorqueCurrentFOC_Position Parameters:</b> 8865 * <ul> 8866 * <li> <b>AverageRequest:</b> Average TorqueCurrentFOC request of the 8867 * mechanism. 8868 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 8869 * request of the mechanism. 8870 * </ul> 8871 * </ul> 8872 * 8873 * @param request Control object to request of the device 8874 * @return Code response of the request 8875 */ 8876 @Override 8877 public StatusCode setControl(Diff_TorqueCurrentFOC_Position request) 8878 { 8879 return setControlPrivate(request); 8880 } 8881 8882 /** 8883 * Differential control with position average target and position 8884 * difference target using torque current control. 8885 * <ul> 8886 * <li> <b>Diff_PositionTorqueCurrentFOC_Position Parameters:</b> 8887 * <ul> 8888 * <li> <b>AverageRequest:</b> Average PositionTorqueCurrentFOC request of the 8889 * mechanism. 8890 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 8891 * request of the mechanism. 8892 * </ul> 8893 * </ul> 8894 * 8895 * @param request Control object to request of the device 8896 * @return Code response of the request 8897 */ 8898 @Override 8899 public StatusCode setControl(Diff_PositionTorqueCurrentFOC_Position request) 8900 { 8901 return setControlPrivate(request); 8902 } 8903 8904 /** 8905 * Differential control with velocity average target and position 8906 * difference target using torque current control. 8907 * <ul> 8908 * <li> <b>Diff_VelocityTorqueCurrentFOC_Position Parameters:</b> 8909 * <ul> 8910 * <li> <b>AverageRequest:</b> Average VelocityTorqueCurrentFOC request of the 8911 * mechanism. 8912 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 8913 * request of the mechanism. 8914 * </ul> 8915 * </ul> 8916 * 8917 * @param request Control object to request of the device 8918 * @return Code response of the request 8919 */ 8920 @Override 8921 public StatusCode setControl(Diff_VelocityTorqueCurrentFOC_Position request) 8922 { 8923 return setControlPrivate(request); 8924 } 8925 8926 /** 8927 * Differential control with Motion Magic® average target and position 8928 * difference target using torque current control. 8929 * <ul> 8930 * <li> <b>Diff_MotionMagicTorqueCurrentFOC_Position Parameters:</b> 8931 * <ul> 8932 * <li> <b>AverageRequest:</b> Average MotionMagicTorqueCurrentFOC request of 8933 * the mechanism. 8934 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 8935 * request of the mechanism. 8936 * </ul> 8937 * </ul> 8938 * 8939 * @param request Control object to request of the device 8940 * @return Code response of the request 8941 */ 8942 @Override 8943 public StatusCode setControl(Diff_MotionMagicTorqueCurrentFOC_Position request) 8944 { 8945 return setControlPrivate(request); 8946 } 8947 8948 /** 8949 * Differential control with torque current average target and 8950 * velocity difference target. 8951 * <ul> 8952 * <li> <b>Diff_TorqueCurrentFOC_Velocity Parameters:</b> 8953 * <ul> 8954 * <li> <b>AverageRequest:</b> Average TorqueCurrentFOC request of the 8955 * mechanism. 8956 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 8957 * request of the mechanism. 8958 * </ul> 8959 * </ul> 8960 * 8961 * @param request Control object to request of the device 8962 * @return Code response of the request 8963 */ 8964 @Override 8965 public StatusCode setControl(Diff_TorqueCurrentFOC_Velocity request) 8966 { 8967 return setControlPrivate(request); 8968 } 8969 8970 /** 8971 * Differential control with position average target and velocity 8972 * difference target using torque current control. 8973 * <ul> 8974 * <li> <b>Diff_PositionTorqueCurrentFOC_Velocity Parameters:</b> 8975 * <ul> 8976 * <li> <b>AverageRequest:</b> Average PositionTorqueCurrentFOC request of the 8977 * mechanism. 8978 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 8979 * request of the mechanism. 8980 * </ul> 8981 * </ul> 8982 * 8983 * @param request Control object to request of the device 8984 * @return Code response of the request 8985 */ 8986 @Override 8987 public StatusCode setControl(Diff_PositionTorqueCurrentFOC_Velocity request) 8988 { 8989 return setControlPrivate(request); 8990 } 8991 8992 /** 8993 * Differential control with velocity average target and velocity 8994 * difference target using torque current control. 8995 * <ul> 8996 * <li> <b>Diff_VelocityTorqueCurrentFOC_Velocity Parameters:</b> 8997 * <ul> 8998 * <li> <b>AverageRequest:</b> Average VelocityTorqueCurrentFOC request of the 8999 * mechanism. 9000 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 9001 * request of the mechanism. 9002 * </ul> 9003 * </ul> 9004 * 9005 * @param request Control object to request of the device 9006 * @return Code response of the request 9007 */ 9008 @Override 9009 public StatusCode setControl(Diff_VelocityTorqueCurrentFOC_Velocity request) 9010 { 9011 return setControlPrivate(request); 9012 } 9013 9014 /** 9015 * Differential control with Motion Magic® average target and velocity 9016 * difference target using torque current control. 9017 * <ul> 9018 * <li> <b>Diff_MotionMagicTorqueCurrentFOC_Velocity Parameters:</b> 9019 * <ul> 9020 * <li> <b>AverageRequest:</b> Average MotionMagicTorqueCurrentFOC request of 9021 * the mechanism. 9022 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 9023 * request of the mechanism. 9024 * </ul> 9025 * </ul> 9026 * 9027 * @param request Control object to request of the device 9028 * @return Code response of the request 9029 */ 9030 @Override 9031 public StatusCode setControl(Diff_MotionMagicTorqueCurrentFOC_Velocity request) 9032 { 9033 return setControlPrivate(request); 9034 } 9035 9036 /** 9037 * Control device with generic control request object. 9038 * <p> 9039 * User must make sure the specified object is castable to a valid control request, 9040 * otherwise this function will fail at run-time and return the NotSupported StatusCode 9041 * 9042 * @param request Control object to request of the device 9043 * @return Status Code of the request, 0 is OK 9044 */ 9045 @Override 9046 public StatusCode setControl(ControlRequest request) 9047 { 9048 if (request instanceof DutyCycleOut reqDutyCycleOut) 9049 return setControl(reqDutyCycleOut); 9050 if (request instanceof TorqueCurrentFOC reqTorqueCurrentFOC) 9051 return setControl(reqTorqueCurrentFOC); 9052 if (request instanceof VoltageOut reqVoltageOut) 9053 return setControl(reqVoltageOut); 9054 if (request instanceof PositionDutyCycle reqPositionDutyCycle) 9055 return setControl(reqPositionDutyCycle); 9056 if (request instanceof PositionVoltage reqPositionVoltage) 9057 return setControl(reqPositionVoltage); 9058 if (request instanceof PositionTorqueCurrentFOC reqPositionTorqueCurrentFOC) 9059 return setControl(reqPositionTorqueCurrentFOC); 9060 if (request instanceof VelocityDutyCycle reqVelocityDutyCycle) 9061 return setControl(reqVelocityDutyCycle); 9062 if (request instanceof VelocityVoltage reqVelocityVoltage) 9063 return setControl(reqVelocityVoltage); 9064 if (request instanceof VelocityTorqueCurrentFOC reqVelocityTorqueCurrentFOC) 9065 return setControl(reqVelocityTorqueCurrentFOC); 9066 if (request instanceof MotionMagicDutyCycle reqMotionMagicDutyCycle) 9067 return setControl(reqMotionMagicDutyCycle); 9068 if (request instanceof MotionMagicVoltage reqMotionMagicVoltage) 9069 return setControl(reqMotionMagicVoltage); 9070 if (request instanceof MotionMagicTorqueCurrentFOC reqMotionMagicTorqueCurrentFOC) 9071 return setControl(reqMotionMagicTorqueCurrentFOC); 9072 if (request instanceof DifferentialDutyCycle reqDifferentialDutyCycle) 9073 return setControl(reqDifferentialDutyCycle); 9074 if (request instanceof DifferentialVoltage reqDifferentialVoltage) 9075 return setControl(reqDifferentialVoltage); 9076 if (request instanceof DifferentialPositionDutyCycle reqDifferentialPositionDutyCycle) 9077 return setControl(reqDifferentialPositionDutyCycle); 9078 if (request instanceof DifferentialPositionVoltage reqDifferentialPositionVoltage) 9079 return setControl(reqDifferentialPositionVoltage); 9080 if (request instanceof DifferentialVelocityDutyCycle reqDifferentialVelocityDutyCycle) 9081 return setControl(reqDifferentialVelocityDutyCycle); 9082 if (request instanceof DifferentialVelocityVoltage reqDifferentialVelocityVoltage) 9083 return setControl(reqDifferentialVelocityVoltage); 9084 if (request instanceof DifferentialMotionMagicDutyCycle reqDifferentialMotionMagicDutyCycle) 9085 return setControl(reqDifferentialMotionMagicDutyCycle); 9086 if (request instanceof DifferentialMotionMagicVoltage reqDifferentialMotionMagicVoltage) 9087 return setControl(reqDifferentialMotionMagicVoltage); 9088 if (request instanceof Follower reqFollower) 9089 return setControl(reqFollower); 9090 if (request instanceof StrictFollower reqStrictFollower) 9091 return setControl(reqStrictFollower); 9092 if (request instanceof DifferentialFollower reqDifferentialFollower) 9093 return setControl(reqDifferentialFollower); 9094 if (request instanceof DifferentialStrictFollower reqDifferentialStrictFollower) 9095 return setControl(reqDifferentialStrictFollower); 9096 if (request instanceof NeutralOut reqNeutralOut) 9097 return setControl(reqNeutralOut); 9098 if (request instanceof CoastOut reqCoastOut) 9099 return setControl(reqCoastOut); 9100 if (request instanceof StaticBrake reqStaticBrake) 9101 return setControl(reqStaticBrake); 9102 if (request instanceof MusicTone reqMusicTone) 9103 return setControl(reqMusicTone); 9104 if (request instanceof MotionMagicVelocityDutyCycle reqMotionMagicVelocityDutyCycle) 9105 return setControl(reqMotionMagicVelocityDutyCycle); 9106 if (request instanceof MotionMagicVelocityTorqueCurrentFOC reqMotionMagicVelocityTorqueCurrentFOC) 9107 return setControl(reqMotionMagicVelocityTorqueCurrentFOC); 9108 if (request instanceof MotionMagicVelocityVoltage reqMotionMagicVelocityVoltage) 9109 return setControl(reqMotionMagicVelocityVoltage); 9110 if (request instanceof MotionMagicExpoDutyCycle reqMotionMagicExpoDutyCycle) 9111 return setControl(reqMotionMagicExpoDutyCycle); 9112 if (request instanceof MotionMagicExpoVoltage reqMotionMagicExpoVoltage) 9113 return setControl(reqMotionMagicExpoVoltage); 9114 if (request instanceof MotionMagicExpoTorqueCurrentFOC reqMotionMagicExpoTorqueCurrentFOC) 9115 return setControl(reqMotionMagicExpoTorqueCurrentFOC); 9116 if (request instanceof DynamicMotionMagicDutyCycle reqDynamicMotionMagicDutyCycle) 9117 return setControl(reqDynamicMotionMagicDutyCycle); 9118 if (request instanceof DynamicMotionMagicVoltage reqDynamicMotionMagicVoltage) 9119 return setControl(reqDynamicMotionMagicVoltage); 9120 if (request instanceof DynamicMotionMagicTorqueCurrentFOC reqDynamicMotionMagicTorqueCurrentFOC) 9121 return setControl(reqDynamicMotionMagicTorqueCurrentFOC); 9122 if (request instanceof Diff_DutyCycleOut_Position reqDiff_DutyCycleOut_Position) 9123 return setControl(reqDiff_DutyCycleOut_Position); 9124 if (request instanceof Diff_PositionDutyCycle_Position reqDiff_PositionDutyCycle_Position) 9125 return setControl(reqDiff_PositionDutyCycle_Position); 9126 if (request instanceof Diff_VelocityDutyCycle_Position reqDiff_VelocityDutyCycle_Position) 9127 return setControl(reqDiff_VelocityDutyCycle_Position); 9128 if (request instanceof Diff_MotionMagicDutyCycle_Position reqDiff_MotionMagicDutyCycle_Position) 9129 return setControl(reqDiff_MotionMagicDutyCycle_Position); 9130 if (request instanceof Diff_DutyCycleOut_Velocity reqDiff_DutyCycleOut_Velocity) 9131 return setControl(reqDiff_DutyCycleOut_Velocity); 9132 if (request instanceof Diff_PositionDutyCycle_Velocity reqDiff_PositionDutyCycle_Velocity) 9133 return setControl(reqDiff_PositionDutyCycle_Velocity); 9134 if (request instanceof Diff_VelocityDutyCycle_Velocity reqDiff_VelocityDutyCycle_Velocity) 9135 return setControl(reqDiff_VelocityDutyCycle_Velocity); 9136 if (request instanceof Diff_MotionMagicDutyCycle_Velocity reqDiff_MotionMagicDutyCycle_Velocity) 9137 return setControl(reqDiff_MotionMagicDutyCycle_Velocity); 9138 if (request instanceof Diff_VoltageOut_Position reqDiff_VoltageOut_Position) 9139 return setControl(reqDiff_VoltageOut_Position); 9140 if (request instanceof Diff_PositionVoltage_Position reqDiff_PositionVoltage_Position) 9141 return setControl(reqDiff_PositionVoltage_Position); 9142 if (request instanceof Diff_VelocityVoltage_Position reqDiff_VelocityVoltage_Position) 9143 return setControl(reqDiff_VelocityVoltage_Position); 9144 if (request instanceof Diff_MotionMagicVoltage_Position reqDiff_MotionMagicVoltage_Position) 9145 return setControl(reqDiff_MotionMagicVoltage_Position); 9146 if (request instanceof Diff_VoltageOut_Velocity reqDiff_VoltageOut_Velocity) 9147 return setControl(reqDiff_VoltageOut_Velocity); 9148 if (request instanceof Diff_PositionVoltage_Velocity reqDiff_PositionVoltage_Velocity) 9149 return setControl(reqDiff_PositionVoltage_Velocity); 9150 if (request instanceof Diff_VelocityVoltage_Velocity reqDiff_VelocityVoltage_Velocity) 9151 return setControl(reqDiff_VelocityVoltage_Velocity); 9152 if (request instanceof Diff_MotionMagicVoltage_Velocity reqDiff_MotionMagicVoltage_Velocity) 9153 return setControl(reqDiff_MotionMagicVoltage_Velocity); 9154 if (request instanceof Diff_TorqueCurrentFOC_Position reqDiff_TorqueCurrentFOC_Position) 9155 return setControl(reqDiff_TorqueCurrentFOC_Position); 9156 if (request instanceof Diff_PositionTorqueCurrentFOC_Position reqDiff_PositionTorqueCurrentFOC_Position) 9157 return setControl(reqDiff_PositionTorqueCurrentFOC_Position); 9158 if (request instanceof Diff_VelocityTorqueCurrentFOC_Position reqDiff_VelocityTorqueCurrentFOC_Position) 9159 return setControl(reqDiff_VelocityTorqueCurrentFOC_Position); 9160 if (request instanceof Diff_MotionMagicTorqueCurrentFOC_Position reqDiff_MotionMagicTorqueCurrentFOC_Position) 9161 return setControl(reqDiff_MotionMagicTorqueCurrentFOC_Position); 9162 if (request instanceof Diff_TorqueCurrentFOC_Velocity reqDiff_TorqueCurrentFOC_Velocity) 9163 return setControl(reqDiff_TorqueCurrentFOC_Velocity); 9164 if (request instanceof Diff_PositionTorqueCurrentFOC_Velocity reqDiff_PositionTorqueCurrentFOC_Velocity) 9165 return setControl(reqDiff_PositionTorqueCurrentFOC_Velocity); 9166 if (request instanceof Diff_VelocityTorqueCurrentFOC_Velocity reqDiff_VelocityTorqueCurrentFOC_Velocity) 9167 return setControl(reqDiff_VelocityTorqueCurrentFOC_Velocity); 9168 if (request instanceof Diff_MotionMagicTorqueCurrentFOC_Velocity reqDiff_MotionMagicTorqueCurrentFOC_Velocity) 9169 return setControl(reqDiff_MotionMagicTorqueCurrentFOC_Velocity); 9170 return StatusCode.NotSupported; 9171 } 9172 9173 9174 /** 9175 * Sets the mechanism position of the device in mechanism rotations. 9176 * <p> 9177 * This will wait up to 0.100 seconds (100ms) by default. 9178 * 9179 * @param newValue Value to set to. Units are in rotations. 9180 * @return StatusCode of the set command 9181 */ 9182 @Override 9183 public StatusCode setPosition(double newValue) { 9184 return setPosition(newValue, 0.100); 9185 } 9186 /** 9187 * Sets the mechanism position of the device in mechanism rotations. 9188 * 9189 * @param newValue Value to set to. Units are in rotations. 9190 * @param timeoutSeconds Maximum time to wait up to in seconds. 9191 * @return StatusCode of the set command 9192 */ 9193 @Override 9194 public StatusCode setPosition(double newValue, double timeoutSeconds) { 9195 return getConfigurator().setPosition(newValue, timeoutSeconds); 9196 } 9197 9198 /** 9199 * Sets the mechanism position of the device in mechanism rotations. 9200 * <p> 9201 * This will wait up to 0.100 seconds (100ms) by default. 9202 * 9203 * @param newValue Value to set to. Units are in rotations. 9204 * @return StatusCode of the set command 9205 */ 9206 public StatusCode setPosition(Angle newValue) { 9207 return setPosition(newValue.in(Rotations)); 9208 } 9209 /** 9210 * Sets the mechanism position of the device in mechanism rotations. 9211 * 9212 * @param newValue Value to set to. Units are in rotations. 9213 * @param timeoutSeconds Maximum time to wait up to in seconds. 9214 * @return StatusCode of the set command 9215 */ 9216 public StatusCode setPosition(Angle newValue, double timeoutSeconds) { 9217 return setPosition(newValue.in(Rotations), timeoutSeconds); 9218 } 9219 9220 /** 9221 * Clear the sticky faults in the device. 9222 * <p> 9223 * This typically has no impact on the device functionality. Instead, 9224 * it just clears telemetry faults that are accessible via API and 9225 * Tuner Self-Test. 9226 * <p> 9227 * This will wait up to 0.100 seconds (100ms) by default. 9228 * 9229 * @return StatusCode of the set command 9230 */ 9231 @Override 9232 public StatusCode clearStickyFaults() { 9233 return clearStickyFaults(0.100); 9234 } 9235 /** 9236 * Clear the sticky faults in the device. 9237 * <p> 9238 * This typically has no impact on the device functionality. Instead, 9239 * it just clears telemetry faults that are accessible via API and 9240 * Tuner Self-Test. 9241 * 9242 * @param timeoutSeconds Maximum time to wait up to in seconds. 9243 * @return StatusCode of the set command 9244 */ 9245 @Override 9246 public StatusCode clearStickyFaults(double timeoutSeconds) { 9247 return getConfigurator().clearStickyFaults(timeoutSeconds); 9248 } 9249 9250 /** 9251 * Clear sticky fault: Hardware fault occurred 9252 * <p> 9253 * This will wait up to 0.100 seconds (100ms) by default. 9254 * 9255 * @return StatusCode of the set command 9256 */ 9257 @Override 9258 public StatusCode clearStickyFault_Hardware() { 9259 return clearStickyFault_Hardware(0.100); 9260 } 9261 /** 9262 * Clear sticky fault: Hardware fault occurred 9263 * 9264 * @param timeoutSeconds Maximum time to wait up to in seconds. 9265 * @return StatusCode of the set command 9266 */ 9267 @Override 9268 public StatusCode clearStickyFault_Hardware(double timeoutSeconds) { 9269 return getConfigurator().clearStickyFault_Hardware(timeoutSeconds); 9270 } 9271 9272 /** 9273 * Clear sticky fault: Processor temperature exceeded limit 9274 * <p> 9275 * This will wait up to 0.100 seconds (100ms) by default. 9276 * 9277 * @return StatusCode of the set command 9278 */ 9279 @Override 9280 public StatusCode clearStickyFault_ProcTemp() { 9281 return clearStickyFault_ProcTemp(0.100); 9282 } 9283 /** 9284 * Clear sticky fault: Processor temperature exceeded limit 9285 * 9286 * @param timeoutSeconds Maximum time to wait up to in seconds. 9287 * @return StatusCode of the set command 9288 */ 9289 @Override 9290 public StatusCode clearStickyFault_ProcTemp(double timeoutSeconds) { 9291 return getConfigurator().clearStickyFault_ProcTemp(timeoutSeconds); 9292 } 9293 9294 /** 9295 * Clear sticky fault: Device temperature exceeded limit 9296 * <p> 9297 * This will wait up to 0.100 seconds (100ms) by default. 9298 * 9299 * @return StatusCode of the set command 9300 */ 9301 @Override 9302 public StatusCode clearStickyFault_DeviceTemp() { 9303 return clearStickyFault_DeviceTemp(0.100); 9304 } 9305 /** 9306 * Clear sticky fault: Device temperature exceeded limit 9307 * 9308 * @param timeoutSeconds Maximum time to wait up to in seconds. 9309 * @return StatusCode of the set command 9310 */ 9311 @Override 9312 public StatusCode clearStickyFault_DeviceTemp(double timeoutSeconds) { 9313 return getConfigurator().clearStickyFault_DeviceTemp(timeoutSeconds); 9314 } 9315 9316 /** 9317 * Clear sticky fault: Device supply voltage dropped to near brownout 9318 * levels 9319 * <p> 9320 * This will wait up to 0.100 seconds (100ms) by default. 9321 * 9322 * @return StatusCode of the set command 9323 */ 9324 @Override 9325 public StatusCode clearStickyFault_Undervoltage() { 9326 return clearStickyFault_Undervoltage(0.100); 9327 } 9328 /** 9329 * Clear sticky fault: Device supply voltage dropped to near brownout 9330 * levels 9331 * 9332 * @param timeoutSeconds Maximum time to wait up to in seconds. 9333 * @return StatusCode of the set command 9334 */ 9335 @Override 9336 public StatusCode clearStickyFault_Undervoltage(double timeoutSeconds) { 9337 return getConfigurator().clearStickyFault_Undervoltage(timeoutSeconds); 9338 } 9339 9340 /** 9341 * Clear sticky fault: Device boot while detecting the enable signal 9342 * <p> 9343 * This will wait up to 0.100 seconds (100ms) by default. 9344 * 9345 * @return StatusCode of the set command 9346 */ 9347 @Override 9348 public StatusCode clearStickyFault_BootDuringEnable() { 9349 return clearStickyFault_BootDuringEnable(0.100); 9350 } 9351 /** 9352 * Clear sticky fault: Device boot while detecting the enable signal 9353 * 9354 * @param timeoutSeconds Maximum time to wait up to in seconds. 9355 * @return StatusCode of the set command 9356 */ 9357 @Override 9358 public StatusCode clearStickyFault_BootDuringEnable(double timeoutSeconds) { 9359 return getConfigurator().clearStickyFault_BootDuringEnable(timeoutSeconds); 9360 } 9361 9362 /** 9363 * Clear sticky fault: An unlicensed feature is in use, device may not 9364 * behave as expected. 9365 * <p> 9366 * This will wait up to 0.100 seconds (100ms) by default. 9367 * 9368 * @return StatusCode of the set command 9369 */ 9370 @Override 9371 public StatusCode clearStickyFault_UnlicensedFeatureInUse() { 9372 return clearStickyFault_UnlicensedFeatureInUse(0.100); 9373 } 9374 /** 9375 * Clear sticky fault: An unlicensed feature is in use, device may not 9376 * behave as expected. 9377 * 9378 * @param timeoutSeconds Maximum time to wait up to in seconds. 9379 * @return StatusCode of the set command 9380 */ 9381 @Override 9382 public StatusCode clearStickyFault_UnlicensedFeatureInUse(double timeoutSeconds) { 9383 return getConfigurator().clearStickyFault_UnlicensedFeatureInUse(timeoutSeconds); 9384 } 9385 9386 /** 9387 * Clear sticky fault: Bridge was disabled most likely due to supply 9388 * voltage dropping too low. 9389 * <p> 9390 * This will wait up to 0.100 seconds (100ms) by default. 9391 * 9392 * @return StatusCode of the set command 9393 */ 9394 @Override 9395 public StatusCode clearStickyFault_BridgeBrownout() { 9396 return clearStickyFault_BridgeBrownout(0.100); 9397 } 9398 /** 9399 * Clear sticky fault: Bridge was disabled most likely due to supply 9400 * voltage dropping too low. 9401 * 9402 * @param timeoutSeconds Maximum time to wait up to in seconds. 9403 * @return StatusCode of the set command 9404 */ 9405 @Override 9406 public StatusCode clearStickyFault_BridgeBrownout(double timeoutSeconds) { 9407 return getConfigurator().clearStickyFault_BridgeBrownout(timeoutSeconds); 9408 } 9409 9410 /** 9411 * Clear sticky fault: The remote sensor has reset. 9412 * <p> 9413 * This will wait up to 0.100 seconds (100ms) by default. 9414 * 9415 * @return StatusCode of the set command 9416 */ 9417 @Override 9418 public StatusCode clearStickyFault_RemoteSensorReset() { 9419 return clearStickyFault_RemoteSensorReset(0.100); 9420 } 9421 /** 9422 * Clear sticky fault: The remote sensor has reset. 9423 * 9424 * @param timeoutSeconds Maximum time to wait up to in seconds. 9425 * @return StatusCode of the set command 9426 */ 9427 @Override 9428 public StatusCode clearStickyFault_RemoteSensorReset(double timeoutSeconds) { 9429 return getConfigurator().clearStickyFault_RemoteSensorReset(timeoutSeconds); 9430 } 9431 9432 /** 9433 * Clear sticky fault: The remote Talon used for differential control 9434 * is not present on CAN Bus. 9435 * <p> 9436 * This will wait up to 0.100 seconds (100ms) by default. 9437 * 9438 * @return StatusCode of the set command 9439 */ 9440 @Override 9441 public StatusCode clearStickyFault_MissingDifferentialFX() { 9442 return clearStickyFault_MissingDifferentialFX(0.100); 9443 } 9444 /** 9445 * Clear sticky fault: The remote Talon used for differential control 9446 * is not present on CAN Bus. 9447 * 9448 * @param timeoutSeconds Maximum time to wait up to in seconds. 9449 * @return StatusCode of the set command 9450 */ 9451 @Override 9452 public StatusCode clearStickyFault_MissingDifferentialFX(double timeoutSeconds) { 9453 return getConfigurator().clearStickyFault_MissingDifferentialFX(timeoutSeconds); 9454 } 9455 9456 /** 9457 * Clear sticky fault: The remote sensor position has overflowed. 9458 * Because of the nature of remote sensors, it is possible for the 9459 * remote sensor position to overflow beyond what is supported by the 9460 * status signal frame. However, this is rare and cannot occur over 9461 * the course of an FRC match under normal use. 9462 * <p> 9463 * This will wait up to 0.100 seconds (100ms) by default. 9464 * 9465 * @return StatusCode of the set command 9466 */ 9467 @Override 9468 public StatusCode clearStickyFault_RemoteSensorPosOverflow() { 9469 return clearStickyFault_RemoteSensorPosOverflow(0.100); 9470 } 9471 /** 9472 * Clear sticky fault: The remote sensor position has overflowed. 9473 * Because of the nature of remote sensors, it is possible for the 9474 * remote sensor position to overflow beyond what is supported by the 9475 * status signal frame. However, this is rare and cannot occur over 9476 * the course of an FRC match under normal use. 9477 * 9478 * @param timeoutSeconds Maximum time to wait up to in seconds. 9479 * @return StatusCode of the set command 9480 */ 9481 @Override 9482 public StatusCode clearStickyFault_RemoteSensorPosOverflow(double timeoutSeconds) { 9483 return getConfigurator().clearStickyFault_RemoteSensorPosOverflow(timeoutSeconds); 9484 } 9485 9486 /** 9487 * Clear sticky fault: Supply Voltage has exceeded the maximum voltage 9488 * rating of device. 9489 * <p> 9490 * This will wait up to 0.100 seconds (100ms) by default. 9491 * 9492 * @return StatusCode of the set command 9493 */ 9494 @Override 9495 public StatusCode clearStickyFault_OverSupplyV() { 9496 return clearStickyFault_OverSupplyV(0.100); 9497 } 9498 /** 9499 * Clear sticky fault: Supply Voltage has exceeded the maximum voltage 9500 * rating of device. 9501 * 9502 * @param timeoutSeconds Maximum time to wait up to in seconds. 9503 * @return StatusCode of the set command 9504 */ 9505 @Override 9506 public StatusCode clearStickyFault_OverSupplyV(double timeoutSeconds) { 9507 return getConfigurator().clearStickyFault_OverSupplyV(timeoutSeconds); 9508 } 9509 9510 /** 9511 * Clear sticky fault: Supply Voltage is unstable. Ensure you are 9512 * using a battery and current limited power supply. 9513 * <p> 9514 * This will wait up to 0.100 seconds (100ms) by default. 9515 * 9516 * @return StatusCode of the set command 9517 */ 9518 @Override 9519 public StatusCode clearStickyFault_UnstableSupplyV() { 9520 return clearStickyFault_UnstableSupplyV(0.100); 9521 } 9522 /** 9523 * Clear sticky fault: Supply Voltage is unstable. Ensure you are 9524 * using a battery and current limited power supply. 9525 * 9526 * @param timeoutSeconds Maximum time to wait up to in seconds. 9527 * @return StatusCode of the set command 9528 */ 9529 @Override 9530 public StatusCode clearStickyFault_UnstableSupplyV(double timeoutSeconds) { 9531 return getConfigurator().clearStickyFault_UnstableSupplyV(timeoutSeconds); 9532 } 9533 9534 /** 9535 * Clear sticky fault: Reverse limit switch has been asserted. Output 9536 * is set to neutral. 9537 * <p> 9538 * This will wait up to 0.100 seconds (100ms) by default. 9539 * 9540 * @return StatusCode of the set command 9541 */ 9542 @Override 9543 public StatusCode clearStickyFault_ReverseHardLimit() { 9544 return clearStickyFault_ReverseHardLimit(0.100); 9545 } 9546 /** 9547 * Clear sticky fault: Reverse limit switch has been asserted. Output 9548 * is set to neutral. 9549 * 9550 * @param timeoutSeconds Maximum time to wait up to in seconds. 9551 * @return StatusCode of the set command 9552 */ 9553 @Override 9554 public StatusCode clearStickyFault_ReverseHardLimit(double timeoutSeconds) { 9555 return getConfigurator().clearStickyFault_ReverseHardLimit(timeoutSeconds); 9556 } 9557 9558 /** 9559 * Clear sticky fault: Forward limit switch has been asserted. Output 9560 * is set to neutral. 9561 * <p> 9562 * This will wait up to 0.100 seconds (100ms) by default. 9563 * 9564 * @return StatusCode of the set command 9565 */ 9566 @Override 9567 public StatusCode clearStickyFault_ForwardHardLimit() { 9568 return clearStickyFault_ForwardHardLimit(0.100); 9569 } 9570 /** 9571 * Clear sticky fault: Forward limit switch has been asserted. Output 9572 * is set to neutral. 9573 * 9574 * @param timeoutSeconds Maximum time to wait up to in seconds. 9575 * @return StatusCode of the set command 9576 */ 9577 @Override 9578 public StatusCode clearStickyFault_ForwardHardLimit(double timeoutSeconds) { 9579 return getConfigurator().clearStickyFault_ForwardHardLimit(timeoutSeconds); 9580 } 9581 9582 /** 9583 * Clear sticky fault: Reverse soft limit has been asserted. Output 9584 * is set to neutral. 9585 * <p> 9586 * This will wait up to 0.100 seconds (100ms) by default. 9587 * 9588 * @return StatusCode of the set command 9589 */ 9590 @Override 9591 public StatusCode clearStickyFault_ReverseSoftLimit() { 9592 return clearStickyFault_ReverseSoftLimit(0.100); 9593 } 9594 /** 9595 * Clear sticky fault: Reverse soft limit has been asserted. Output 9596 * is set to neutral. 9597 * 9598 * @param timeoutSeconds Maximum time to wait up to in seconds. 9599 * @return StatusCode of the set command 9600 */ 9601 @Override 9602 public StatusCode clearStickyFault_ReverseSoftLimit(double timeoutSeconds) { 9603 return getConfigurator().clearStickyFault_ReverseSoftLimit(timeoutSeconds); 9604 } 9605 9606 /** 9607 * Clear sticky fault: Forward soft limit has been asserted. Output 9608 * is set to neutral. 9609 * <p> 9610 * This will wait up to 0.100 seconds (100ms) by default. 9611 * 9612 * @return StatusCode of the set command 9613 */ 9614 @Override 9615 public StatusCode clearStickyFault_ForwardSoftLimit() { 9616 return clearStickyFault_ForwardSoftLimit(0.100); 9617 } 9618 /** 9619 * Clear sticky fault: Forward soft limit has been asserted. Output 9620 * is set to neutral. 9621 * 9622 * @param timeoutSeconds Maximum time to wait up to in seconds. 9623 * @return StatusCode of the set command 9624 */ 9625 @Override 9626 public StatusCode clearStickyFault_ForwardSoftLimit(double timeoutSeconds) { 9627 return getConfigurator().clearStickyFault_ForwardSoftLimit(timeoutSeconds); 9628 } 9629 9630 /** 9631 * Clear sticky fault: The remote soft limit device is not present on 9632 * CAN Bus. 9633 * <p> 9634 * This will wait up to 0.100 seconds (100ms) by default. 9635 * 9636 * @return StatusCode of the set command 9637 */ 9638 @Override 9639 public StatusCode clearStickyFault_MissingSoftLimitRemote() { 9640 return clearStickyFault_MissingSoftLimitRemote(0.100); 9641 } 9642 /** 9643 * Clear sticky fault: The remote soft limit device is not present on 9644 * CAN Bus. 9645 * 9646 * @param timeoutSeconds Maximum time to wait up to in seconds. 9647 * @return StatusCode of the set command 9648 */ 9649 @Override 9650 public StatusCode clearStickyFault_MissingSoftLimitRemote(double timeoutSeconds) { 9651 return getConfigurator().clearStickyFault_MissingSoftLimitRemote(timeoutSeconds); 9652 } 9653 9654 /** 9655 * Clear sticky fault: The remote limit switch device is not present 9656 * on CAN Bus. 9657 * <p> 9658 * This will wait up to 0.100 seconds (100ms) by default. 9659 * 9660 * @return StatusCode of the set command 9661 */ 9662 @Override 9663 public StatusCode clearStickyFault_MissingHardLimitRemote() { 9664 return clearStickyFault_MissingHardLimitRemote(0.100); 9665 } 9666 /** 9667 * Clear sticky fault: The remote limit switch device is not present 9668 * on CAN Bus. 9669 * 9670 * @param timeoutSeconds Maximum time to wait up to in seconds. 9671 * @return StatusCode of the set command 9672 */ 9673 @Override 9674 public StatusCode clearStickyFault_MissingHardLimitRemote(double timeoutSeconds) { 9675 return getConfigurator().clearStickyFault_MissingHardLimitRemote(timeoutSeconds); 9676 } 9677 9678 /** 9679 * Clear sticky fault: The remote sensor's data is no longer trusted. 9680 * This can happen if the remote sensor disappears from the CAN bus or 9681 * if the remote sensor indicates its data is no longer valid, such as 9682 * when a CANcoder's magnet strength falls into the "red" range. 9683 * <p> 9684 * This will wait up to 0.100 seconds (100ms) by default. 9685 * 9686 * @return StatusCode of the set command 9687 */ 9688 @Override 9689 public StatusCode clearStickyFault_RemoteSensorDataInvalid() { 9690 return clearStickyFault_RemoteSensorDataInvalid(0.100); 9691 } 9692 /** 9693 * Clear sticky fault: The remote sensor's data is no longer trusted. 9694 * This can happen if the remote sensor disappears from the CAN bus or 9695 * if the remote sensor indicates its data is no longer valid, such as 9696 * when a CANcoder's magnet strength falls into the "red" range. 9697 * 9698 * @param timeoutSeconds Maximum time to wait up to in seconds. 9699 * @return StatusCode of the set command 9700 */ 9701 @Override 9702 public StatusCode clearStickyFault_RemoteSensorDataInvalid(double timeoutSeconds) { 9703 return getConfigurator().clearStickyFault_RemoteSensorDataInvalid(timeoutSeconds); 9704 } 9705 9706 /** 9707 * Clear sticky fault: The remote sensor used for fusion has fallen 9708 * out of sync to the local sensor. A re-synchronization has occurred, 9709 * which may cause a discontinuity. This typically happens if there is 9710 * significant slop in the mechanism, or if the RotorToSensorRatio 9711 * configuration parameter is incorrect. 9712 * <p> 9713 * This will wait up to 0.100 seconds (100ms) by default. 9714 * 9715 * @return StatusCode of the set command 9716 */ 9717 @Override 9718 public StatusCode clearStickyFault_FusedSensorOutOfSync() { 9719 return clearStickyFault_FusedSensorOutOfSync(0.100); 9720 } 9721 /** 9722 * Clear sticky fault: The remote sensor used for fusion has fallen 9723 * out of sync to the local sensor. A re-synchronization has occurred, 9724 * which may cause a discontinuity. This typically happens if there is 9725 * significant slop in the mechanism, or if the RotorToSensorRatio 9726 * configuration parameter is incorrect. 9727 * 9728 * @param timeoutSeconds Maximum time to wait up to in seconds. 9729 * @return StatusCode of the set command 9730 */ 9731 @Override 9732 public StatusCode clearStickyFault_FusedSensorOutOfSync(double timeoutSeconds) { 9733 return getConfigurator().clearStickyFault_FusedSensorOutOfSync(timeoutSeconds); 9734 } 9735 9736 /** 9737 * Clear sticky fault: Stator current limit occured. 9738 * <p> 9739 * This will wait up to 0.100 seconds (100ms) by default. 9740 * 9741 * @return StatusCode of the set command 9742 */ 9743 @Override 9744 public StatusCode clearStickyFault_StatorCurrLimit() { 9745 return clearStickyFault_StatorCurrLimit(0.100); 9746 } 9747 /** 9748 * Clear sticky fault: Stator current limit occured. 9749 * 9750 * @param timeoutSeconds Maximum time to wait up to in seconds. 9751 * @return StatusCode of the set command 9752 */ 9753 @Override 9754 public StatusCode clearStickyFault_StatorCurrLimit(double timeoutSeconds) { 9755 return getConfigurator().clearStickyFault_StatorCurrLimit(timeoutSeconds); 9756 } 9757 9758 /** 9759 * Clear sticky fault: Supply current limit occured. 9760 * <p> 9761 * This will wait up to 0.100 seconds (100ms) by default. 9762 * 9763 * @return StatusCode of the set command 9764 */ 9765 @Override 9766 public StatusCode clearStickyFault_SupplyCurrLimit() { 9767 return clearStickyFault_SupplyCurrLimit(0.100); 9768 } 9769 /** 9770 * Clear sticky fault: Supply current limit occured. 9771 * 9772 * @param timeoutSeconds Maximum time to wait up to in seconds. 9773 * @return StatusCode of the set command 9774 */ 9775 @Override 9776 public StatusCode clearStickyFault_SupplyCurrLimit(double timeoutSeconds) { 9777 return getConfigurator().clearStickyFault_SupplyCurrLimit(timeoutSeconds); 9778 } 9779 9780 /** 9781 * Clear sticky fault: Using Fused CANcoder feature while unlicensed. 9782 * Device has fallen back to remote CANcoder. 9783 * <p> 9784 * This will wait up to 0.100 seconds (100ms) by default. 9785 * 9786 * @return StatusCode of the set command 9787 */ 9788 @Override 9789 public StatusCode clearStickyFault_UsingFusedCANcoderWhileUnlicensed() { 9790 return clearStickyFault_UsingFusedCANcoderWhileUnlicensed(0.100); 9791 } 9792 /** 9793 * Clear sticky fault: Using Fused CANcoder feature while unlicensed. 9794 * Device has fallen back to remote CANcoder. 9795 * 9796 * @param timeoutSeconds Maximum time to wait up to in seconds. 9797 * @return StatusCode of the set command 9798 */ 9799 @Override 9800 public StatusCode clearStickyFault_UsingFusedCANcoderWhileUnlicensed(double timeoutSeconds) { 9801 return getConfigurator().clearStickyFault_UsingFusedCANcoderWhileUnlicensed(timeoutSeconds); 9802 } 9803 9804 /** 9805 * Clear sticky fault: Static brake was momentarily disabled due to 9806 * excessive braking current while disabled. 9807 * <p> 9808 * This will wait up to 0.100 seconds (100ms) by default. 9809 * 9810 * @return StatusCode of the set command 9811 */ 9812 @Override 9813 public StatusCode clearStickyFault_StaticBrakeDisabled() { 9814 return clearStickyFault_StaticBrakeDisabled(0.100); 9815 } 9816 /** 9817 * Clear sticky fault: Static brake was momentarily disabled due to 9818 * excessive braking current while disabled. 9819 * 9820 * @param timeoutSeconds Maximum time to wait up to in seconds. 9821 * @return StatusCode of the set command 9822 */ 9823 @Override 9824 public StatusCode clearStickyFault_StaticBrakeDisabled(double timeoutSeconds) { 9825 return getConfigurator().clearStickyFault_StaticBrakeDisabled(timeoutSeconds); 9826 } 9827} 9828