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.configs; 008 009import com.ctre.phoenix6.StatusCode; 010import com.ctre.phoenix6.hardware.DeviceIdentifier; 011import com.ctre.phoenix6.configs.jni.ConfigJNI; 012import com.ctre.phoenix6.spns.*; 013import edu.wpi.first.units.*; 014import edu.wpi.first.units.measure.*; 015import static edu.wpi.first.units.Units.*; 016 017/** 018 * Class description for the Talon FX integrated motor controller. 019 * 020 * This handles the configurations for the {@link com.ctre.phoenix6.hardware.TalonFX} 021 */ 022public class TalonFXConfigurator extends ParentConfigurator 023{ 024 public TalonFXConfigurator (DeviceIdentifier id) 025 { 026 super(id); 027 } 028 029 /** 030 * Refreshes the values of the specified config group. 031 * <p> 032 * This will wait up to {@link #DefaultTimeoutSeconds}. 033 * <p> 034 * Call to refresh the selected configs from the device. 035 * 036 * @param configs The configs to refresh 037 * @return StatusCode of refreshing the configs 038 */ 039 public StatusCode refresh(TalonFXConfiguration configs) 040 { 041 return refresh(configs, DefaultTimeoutSeconds); 042 } 043 044 /** 045 * Refreshes the values of the specified config group. 046 * <p> 047 * Call to refresh the selected configs from the device. 048 * 049 * @param configs The configs to refresh 050 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 051 * @return StatusCode of refreshing the configs 052 */ 053 public StatusCode refresh(TalonFXConfiguration configs, double timeoutSeconds) 054 { 055 StringBuilder serializedString = new StringBuilder(); 056 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 057 if (err == StatusCode.OK) { 058 /* Only deserialize if we successfully got configs */ 059 configs.deserialize(serializedString.toString()); 060 } 061 return err; 062 } 063 064 /** 065 * Applies the contents of the specified config to the device. 066 * <p> 067 * This will wait up to {@link #DefaultTimeoutSeconds}. 068 * <p> 069 * Call to apply the selected configs. 070 * 071 * @param configs Configs to apply against. 072 * @return StatusCode of the set command 073 */ 074 public StatusCode apply(TalonFXConfiguration configs) 075 { 076 return apply(configs, DefaultTimeoutSeconds); 077 } 078 079 /** 080 * Applies the contents of the specified config to the device. 081 * <p> 082 * Call to apply the selected configs. 083 * 084 * @param configs Configs to apply against. 085 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 086 * @return StatusCode of the set command 087 */ 088 public StatusCode apply(TalonFXConfiguration configs, double timeoutSeconds) 089 { 090 return setConfigsPrivate(configs.serialize(), timeoutSeconds, configs.FutureProofConfigs, false); 091 } 092 093 094 /** 095 * Refreshes the values of the specified config group. 096 * <p> 097 * This will wait up to {@link #DefaultTimeoutSeconds}. 098 * <p> 099 * Call to refresh the selected configs from the device. 100 * 101 * @param configs The configs to refresh 102 * @return StatusCode of refreshing the configs 103 */ 104 public StatusCode refresh(MotorOutputConfigs configs) 105 { 106 return refresh(configs, DefaultTimeoutSeconds); 107 } 108 109 /** 110 * Refreshes the values of the specified config group. 111 * <p> 112 * Call to refresh the selected configs from the device. 113 * 114 * @param configs The configs to refresh 115 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 116 * @return StatusCode of refreshing the configs 117 */ 118 public StatusCode refresh(MotorOutputConfigs configs, double timeoutSeconds) 119 { 120 StringBuilder serializedString = new StringBuilder(); 121 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 122 if (err == StatusCode.OK) { 123 /* Only deserialize if we successfully got configs */ 124 configs.deserialize(serializedString.toString()); 125 } 126 return err; 127 } 128 129 /** 130 * Applies the contents of the specified config to the device. 131 * <p> 132 * This will wait up to {@link #DefaultTimeoutSeconds}. 133 * <p> 134 * Call to apply the selected configs. 135 * 136 * @param configs Configs to apply against. 137 * @return StatusCode of the set command 138 */ 139 public StatusCode apply(MotorOutputConfigs configs) 140 { 141 return apply(configs, DefaultTimeoutSeconds); 142 } 143 144 /** 145 * Applies the contents of the specified config to the device. 146 * <p> 147 * Call to apply the selected configs. 148 * 149 * @param configs Configs to apply against. 150 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 151 * @return StatusCode of the set command 152 */ 153 public StatusCode apply(MotorOutputConfigs configs, double timeoutSeconds) 154 { 155 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 156 } 157 158 159 /** 160 * Refreshes the values of the specified config group. 161 * <p> 162 * This will wait up to {@link #DefaultTimeoutSeconds}. 163 * <p> 164 * Call to refresh the selected configs from the device. 165 * 166 * @param configs The configs to refresh 167 * @return StatusCode of refreshing the configs 168 */ 169 public StatusCode refresh(CurrentLimitsConfigs configs) 170 { 171 return refresh(configs, DefaultTimeoutSeconds); 172 } 173 174 /** 175 * Refreshes the values of the specified config group. 176 * <p> 177 * Call to refresh the selected configs from the device. 178 * 179 * @param configs The configs to refresh 180 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 181 * @return StatusCode of refreshing the configs 182 */ 183 public StatusCode refresh(CurrentLimitsConfigs configs, double timeoutSeconds) 184 { 185 StringBuilder serializedString = new StringBuilder(); 186 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 187 if (err == StatusCode.OK) { 188 /* Only deserialize if we successfully got configs */ 189 configs.deserialize(serializedString.toString()); 190 } 191 return err; 192 } 193 194 /** 195 * Applies the contents of the specified config to the device. 196 * <p> 197 * This will wait up to {@link #DefaultTimeoutSeconds}. 198 * <p> 199 * Call to apply the selected configs. 200 * 201 * @param configs Configs to apply against. 202 * @return StatusCode of the set command 203 */ 204 public StatusCode apply(CurrentLimitsConfigs configs) 205 { 206 return apply(configs, DefaultTimeoutSeconds); 207 } 208 209 /** 210 * Applies the contents of the specified config to the device. 211 * <p> 212 * Call to apply the selected configs. 213 * 214 * @param configs Configs to apply against. 215 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 216 * @return StatusCode of the set command 217 */ 218 public StatusCode apply(CurrentLimitsConfigs configs, double timeoutSeconds) 219 { 220 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 221 } 222 223 224 /** 225 * Refreshes the values of the specified config group. 226 * <p> 227 * This will wait up to {@link #DefaultTimeoutSeconds}. 228 * <p> 229 * Call to refresh the selected configs from the device. 230 * 231 * @param configs The configs to refresh 232 * @return StatusCode of refreshing the configs 233 */ 234 public StatusCode refresh(VoltageConfigs configs) 235 { 236 return refresh(configs, DefaultTimeoutSeconds); 237 } 238 239 /** 240 * Refreshes the values of the specified config group. 241 * <p> 242 * Call to refresh the selected configs from the device. 243 * 244 * @param configs The configs to refresh 245 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 246 * @return StatusCode of refreshing the configs 247 */ 248 public StatusCode refresh(VoltageConfigs configs, double timeoutSeconds) 249 { 250 StringBuilder serializedString = new StringBuilder(); 251 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 252 if (err == StatusCode.OK) { 253 /* Only deserialize if we successfully got configs */ 254 configs.deserialize(serializedString.toString()); 255 } 256 return err; 257 } 258 259 /** 260 * Applies the contents of the specified config to the device. 261 * <p> 262 * This will wait up to {@link #DefaultTimeoutSeconds}. 263 * <p> 264 * Call to apply the selected configs. 265 * 266 * @param configs Configs to apply against. 267 * @return StatusCode of the set command 268 */ 269 public StatusCode apply(VoltageConfigs configs) 270 { 271 return apply(configs, DefaultTimeoutSeconds); 272 } 273 274 /** 275 * Applies the contents of the specified config to the device. 276 * <p> 277 * Call to apply the selected configs. 278 * 279 * @param configs Configs to apply against. 280 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 281 * @return StatusCode of the set command 282 */ 283 public StatusCode apply(VoltageConfigs configs, double timeoutSeconds) 284 { 285 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 286 } 287 288 289 /** 290 * Refreshes the values of the specified config group. 291 * <p> 292 * This will wait up to {@link #DefaultTimeoutSeconds}. 293 * <p> 294 * Call to refresh the selected configs from the device. 295 * 296 * @param configs The configs to refresh 297 * @return StatusCode of refreshing the configs 298 */ 299 public StatusCode refresh(TorqueCurrentConfigs configs) 300 { 301 return refresh(configs, DefaultTimeoutSeconds); 302 } 303 304 /** 305 * Refreshes the values of the specified config group. 306 * <p> 307 * Call to refresh the selected configs from the device. 308 * 309 * @param configs The configs to refresh 310 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 311 * @return StatusCode of refreshing the configs 312 */ 313 public StatusCode refresh(TorqueCurrentConfigs configs, double timeoutSeconds) 314 { 315 StringBuilder serializedString = new StringBuilder(); 316 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 317 if (err == StatusCode.OK) { 318 /* Only deserialize if we successfully got configs */ 319 configs.deserialize(serializedString.toString()); 320 } 321 return err; 322 } 323 324 /** 325 * Applies the contents of the specified config to the device. 326 * <p> 327 * This will wait up to {@link #DefaultTimeoutSeconds}. 328 * <p> 329 * Call to apply the selected configs. 330 * 331 * @param configs Configs to apply against. 332 * @return StatusCode of the set command 333 */ 334 public StatusCode apply(TorqueCurrentConfigs configs) 335 { 336 return apply(configs, DefaultTimeoutSeconds); 337 } 338 339 /** 340 * Applies the contents of the specified config to the device. 341 * <p> 342 * Call to apply the selected configs. 343 * 344 * @param configs Configs to apply against. 345 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 346 * @return StatusCode of the set command 347 */ 348 public StatusCode apply(TorqueCurrentConfigs configs, double timeoutSeconds) 349 { 350 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 351 } 352 353 354 /** 355 * Refreshes the values of the specified config group. 356 * <p> 357 * This will wait up to {@link #DefaultTimeoutSeconds}. 358 * <p> 359 * Call to refresh the selected configs from the device. 360 * 361 * @param configs The configs to refresh 362 * @return StatusCode of refreshing the configs 363 */ 364 public StatusCode refresh(FeedbackConfigs configs) 365 { 366 return refresh(configs, DefaultTimeoutSeconds); 367 } 368 369 /** 370 * Refreshes the values of the specified config group. 371 * <p> 372 * Call to refresh the selected configs from the device. 373 * 374 * @param configs The configs to refresh 375 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 376 * @return StatusCode of refreshing the configs 377 */ 378 public StatusCode refresh(FeedbackConfigs configs, double timeoutSeconds) 379 { 380 StringBuilder serializedString = new StringBuilder(); 381 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 382 if (err == StatusCode.OK) { 383 /* Only deserialize if we successfully got configs */ 384 configs.deserialize(serializedString.toString()); 385 } 386 return err; 387 } 388 389 /** 390 * Applies the contents of the specified config to the device. 391 * <p> 392 * This will wait up to {@link #DefaultTimeoutSeconds}. 393 * <p> 394 * Call to apply the selected configs. 395 * 396 * @param configs Configs to apply against. 397 * @return StatusCode of the set command 398 */ 399 public StatusCode apply(FeedbackConfigs configs) 400 { 401 return apply(configs, DefaultTimeoutSeconds); 402 } 403 404 /** 405 * Applies the contents of the specified config to the device. 406 * <p> 407 * Call to apply the selected configs. 408 * 409 * @param configs Configs to apply against. 410 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 411 * @return StatusCode of the set command 412 */ 413 public StatusCode apply(FeedbackConfigs configs, double timeoutSeconds) 414 { 415 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 416 } 417 418 419 /** 420 * Refreshes the values of the specified config group. 421 * <p> 422 * This will wait up to {@link #DefaultTimeoutSeconds}. 423 * <p> 424 * Call to refresh the selected configs from the device. 425 * 426 * @param configs The configs to refresh 427 * @return StatusCode of refreshing the configs 428 */ 429 public StatusCode refresh(DifferentialSensorsConfigs configs) 430 { 431 return refresh(configs, DefaultTimeoutSeconds); 432 } 433 434 /** 435 * Refreshes the values of the specified config group. 436 * <p> 437 * Call to refresh the selected configs from the device. 438 * 439 * @param configs The configs to refresh 440 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 441 * @return StatusCode of refreshing the configs 442 */ 443 public StatusCode refresh(DifferentialSensorsConfigs configs, double timeoutSeconds) 444 { 445 StringBuilder serializedString = new StringBuilder(); 446 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 447 if (err == StatusCode.OK) { 448 /* Only deserialize if we successfully got configs */ 449 configs.deserialize(serializedString.toString()); 450 } 451 return err; 452 } 453 454 /** 455 * Applies the contents of the specified config to the device. 456 * <p> 457 * This will wait up to {@link #DefaultTimeoutSeconds}. 458 * <p> 459 * Call to apply the selected configs. 460 * 461 * @param configs Configs to apply against. 462 * @return StatusCode of the set command 463 */ 464 public StatusCode apply(DifferentialSensorsConfigs configs) 465 { 466 return apply(configs, DefaultTimeoutSeconds); 467 } 468 469 /** 470 * Applies the contents of the specified config to the device. 471 * <p> 472 * Call to apply the selected configs. 473 * 474 * @param configs Configs to apply against. 475 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 476 * @return StatusCode of the set command 477 */ 478 public StatusCode apply(DifferentialSensorsConfigs configs, double timeoutSeconds) 479 { 480 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 481 } 482 483 484 /** 485 * Refreshes the values of the specified config group. 486 * <p> 487 * This will wait up to {@link #DefaultTimeoutSeconds}. 488 * <p> 489 * Call to refresh the selected configs from the device. 490 * 491 * @param configs The configs to refresh 492 * @return StatusCode of refreshing the configs 493 */ 494 public StatusCode refresh(DifferentialConstantsConfigs configs) 495 { 496 return refresh(configs, DefaultTimeoutSeconds); 497 } 498 499 /** 500 * Refreshes the values of the specified config group. 501 * <p> 502 * Call to refresh the selected configs from the device. 503 * 504 * @param configs The configs to refresh 505 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 506 * @return StatusCode of refreshing the configs 507 */ 508 public StatusCode refresh(DifferentialConstantsConfigs configs, double timeoutSeconds) 509 { 510 StringBuilder serializedString = new StringBuilder(); 511 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 512 if (err == StatusCode.OK) { 513 /* Only deserialize if we successfully got configs */ 514 configs.deserialize(serializedString.toString()); 515 } 516 return err; 517 } 518 519 /** 520 * Applies the contents of the specified config to the device. 521 * <p> 522 * This will wait up to {@link #DefaultTimeoutSeconds}. 523 * <p> 524 * Call to apply the selected configs. 525 * 526 * @param configs Configs to apply against. 527 * @return StatusCode of the set command 528 */ 529 public StatusCode apply(DifferentialConstantsConfigs configs) 530 { 531 return apply(configs, DefaultTimeoutSeconds); 532 } 533 534 /** 535 * Applies the contents of the specified config to the device. 536 * <p> 537 * Call to apply the selected configs. 538 * 539 * @param configs Configs to apply against. 540 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 541 * @return StatusCode of the set command 542 */ 543 public StatusCode apply(DifferentialConstantsConfigs configs, double timeoutSeconds) 544 { 545 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 546 } 547 548 549 /** 550 * Refreshes the values of the specified config group. 551 * <p> 552 * This will wait up to {@link #DefaultTimeoutSeconds}. 553 * <p> 554 * Call to refresh the selected configs from the device. 555 * 556 * @param configs The configs to refresh 557 * @return StatusCode of refreshing the configs 558 */ 559 public StatusCode refresh(OpenLoopRampsConfigs configs) 560 { 561 return refresh(configs, DefaultTimeoutSeconds); 562 } 563 564 /** 565 * Refreshes the values of the specified config group. 566 * <p> 567 * Call to refresh the selected configs from the device. 568 * 569 * @param configs The configs to refresh 570 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 571 * @return StatusCode of refreshing the configs 572 */ 573 public StatusCode refresh(OpenLoopRampsConfigs configs, double timeoutSeconds) 574 { 575 StringBuilder serializedString = new StringBuilder(); 576 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 577 if (err == StatusCode.OK) { 578 /* Only deserialize if we successfully got configs */ 579 configs.deserialize(serializedString.toString()); 580 } 581 return err; 582 } 583 584 /** 585 * Applies the contents of the specified config to the device. 586 * <p> 587 * This will wait up to {@link #DefaultTimeoutSeconds}. 588 * <p> 589 * Call to apply the selected configs. 590 * 591 * @param configs Configs to apply against. 592 * @return StatusCode of the set command 593 */ 594 public StatusCode apply(OpenLoopRampsConfigs configs) 595 { 596 return apply(configs, DefaultTimeoutSeconds); 597 } 598 599 /** 600 * Applies the contents of the specified config to the device. 601 * <p> 602 * Call to apply the selected configs. 603 * 604 * @param configs Configs to apply against. 605 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 606 * @return StatusCode of the set command 607 */ 608 public StatusCode apply(OpenLoopRampsConfigs configs, double timeoutSeconds) 609 { 610 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 611 } 612 613 614 /** 615 * Refreshes the values of the specified config group. 616 * <p> 617 * This will wait up to {@link #DefaultTimeoutSeconds}. 618 * <p> 619 * Call to refresh the selected configs from the device. 620 * 621 * @param configs The configs to refresh 622 * @return StatusCode of refreshing the configs 623 */ 624 public StatusCode refresh(ClosedLoopRampsConfigs configs) 625 { 626 return refresh(configs, DefaultTimeoutSeconds); 627 } 628 629 /** 630 * Refreshes the values of the specified config group. 631 * <p> 632 * Call to refresh the selected configs from the device. 633 * 634 * @param configs The configs to refresh 635 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 636 * @return StatusCode of refreshing the configs 637 */ 638 public StatusCode refresh(ClosedLoopRampsConfigs configs, double timeoutSeconds) 639 { 640 StringBuilder serializedString = new StringBuilder(); 641 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 642 if (err == StatusCode.OK) { 643 /* Only deserialize if we successfully got configs */ 644 configs.deserialize(serializedString.toString()); 645 } 646 return err; 647 } 648 649 /** 650 * Applies the contents of the specified config to the device. 651 * <p> 652 * This will wait up to {@link #DefaultTimeoutSeconds}. 653 * <p> 654 * Call to apply the selected configs. 655 * 656 * @param configs Configs to apply against. 657 * @return StatusCode of the set command 658 */ 659 public StatusCode apply(ClosedLoopRampsConfigs configs) 660 { 661 return apply(configs, DefaultTimeoutSeconds); 662 } 663 664 /** 665 * Applies the contents of the specified config to the device. 666 * <p> 667 * Call to apply the selected configs. 668 * 669 * @param configs Configs to apply against. 670 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 671 * @return StatusCode of the set command 672 */ 673 public StatusCode apply(ClosedLoopRampsConfigs configs, double timeoutSeconds) 674 { 675 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 676 } 677 678 679 /** 680 * Refreshes the values of the specified config group. 681 * <p> 682 * This will wait up to {@link #DefaultTimeoutSeconds}. 683 * <p> 684 * Call to refresh the selected configs from the device. 685 * 686 * @param configs The configs to refresh 687 * @return StatusCode of refreshing the configs 688 */ 689 public StatusCode refresh(HardwareLimitSwitchConfigs configs) 690 { 691 return refresh(configs, DefaultTimeoutSeconds); 692 } 693 694 /** 695 * Refreshes the values of the specified config group. 696 * <p> 697 * Call to refresh the selected configs from the device. 698 * 699 * @param configs The configs to refresh 700 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 701 * @return StatusCode of refreshing the configs 702 */ 703 public StatusCode refresh(HardwareLimitSwitchConfigs configs, double timeoutSeconds) 704 { 705 StringBuilder serializedString = new StringBuilder(); 706 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 707 if (err == StatusCode.OK) { 708 /* Only deserialize if we successfully got configs */ 709 configs.deserialize(serializedString.toString()); 710 } 711 return err; 712 } 713 714 /** 715 * Applies the contents of the specified config to the device. 716 * <p> 717 * This will wait up to {@link #DefaultTimeoutSeconds}. 718 * <p> 719 * Call to apply the selected configs. 720 * 721 * @param configs Configs to apply against. 722 * @return StatusCode of the set command 723 */ 724 public StatusCode apply(HardwareLimitSwitchConfigs configs) 725 { 726 return apply(configs, DefaultTimeoutSeconds); 727 } 728 729 /** 730 * Applies the contents of the specified config to the device. 731 * <p> 732 * Call to apply the selected configs. 733 * 734 * @param configs Configs to apply against. 735 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 736 * @return StatusCode of the set command 737 */ 738 public StatusCode apply(HardwareLimitSwitchConfigs configs, double timeoutSeconds) 739 { 740 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 741 } 742 743 744 /** 745 * Refreshes the values of the specified config group. 746 * <p> 747 * This will wait up to {@link #DefaultTimeoutSeconds}. 748 * <p> 749 * Call to refresh the selected configs from the device. 750 * 751 * @param configs The configs to refresh 752 * @return StatusCode of refreshing the configs 753 */ 754 public StatusCode refresh(AudioConfigs configs) 755 { 756 return refresh(configs, DefaultTimeoutSeconds); 757 } 758 759 /** 760 * Refreshes the values of the specified config group. 761 * <p> 762 * Call to refresh the selected configs from the device. 763 * 764 * @param configs The configs to refresh 765 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 766 * @return StatusCode of refreshing the configs 767 */ 768 public StatusCode refresh(AudioConfigs configs, double timeoutSeconds) 769 { 770 StringBuilder serializedString = new StringBuilder(); 771 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 772 if (err == StatusCode.OK) { 773 /* Only deserialize if we successfully got configs */ 774 configs.deserialize(serializedString.toString()); 775 } 776 return err; 777 } 778 779 /** 780 * Applies the contents of the specified config to the device. 781 * <p> 782 * This will wait up to {@link #DefaultTimeoutSeconds}. 783 * <p> 784 * Call to apply the selected configs. 785 * 786 * @param configs Configs to apply against. 787 * @return StatusCode of the set command 788 */ 789 public StatusCode apply(AudioConfigs configs) 790 { 791 return apply(configs, DefaultTimeoutSeconds); 792 } 793 794 /** 795 * Applies the contents of the specified config to the device. 796 * <p> 797 * Call to apply the selected configs. 798 * 799 * @param configs Configs to apply against. 800 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 801 * @return StatusCode of the set command 802 */ 803 public StatusCode apply(AudioConfigs configs, double timeoutSeconds) 804 { 805 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 806 } 807 808 809 /** 810 * Refreshes the values of the specified config group. 811 * <p> 812 * This will wait up to {@link #DefaultTimeoutSeconds}. 813 * <p> 814 * Call to refresh the selected configs from the device. 815 * 816 * @param configs The configs to refresh 817 * @return StatusCode of refreshing the configs 818 */ 819 public StatusCode refresh(SoftwareLimitSwitchConfigs configs) 820 { 821 return refresh(configs, DefaultTimeoutSeconds); 822 } 823 824 /** 825 * Refreshes the values of the specified config group. 826 * <p> 827 * Call to refresh the selected configs from the device. 828 * 829 * @param configs The configs to refresh 830 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 831 * @return StatusCode of refreshing the configs 832 */ 833 public StatusCode refresh(SoftwareLimitSwitchConfigs configs, double timeoutSeconds) 834 { 835 StringBuilder serializedString = new StringBuilder(); 836 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 837 if (err == StatusCode.OK) { 838 /* Only deserialize if we successfully got configs */ 839 configs.deserialize(serializedString.toString()); 840 } 841 return err; 842 } 843 844 /** 845 * Applies the contents of the specified config to the device. 846 * <p> 847 * This will wait up to {@link #DefaultTimeoutSeconds}. 848 * <p> 849 * Call to apply the selected configs. 850 * 851 * @param configs Configs to apply against. 852 * @return StatusCode of the set command 853 */ 854 public StatusCode apply(SoftwareLimitSwitchConfigs configs) 855 { 856 return apply(configs, DefaultTimeoutSeconds); 857 } 858 859 /** 860 * Applies the contents of the specified config to the device. 861 * <p> 862 * Call to apply the selected configs. 863 * 864 * @param configs Configs to apply against. 865 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 866 * @return StatusCode of the set command 867 */ 868 public StatusCode apply(SoftwareLimitSwitchConfigs configs, double timeoutSeconds) 869 { 870 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 871 } 872 873 874 /** 875 * Refreshes the values of the specified config group. 876 * <p> 877 * This will wait up to {@link #DefaultTimeoutSeconds}. 878 * <p> 879 * Call to refresh the selected configs from the device. 880 * 881 * @param configs The configs to refresh 882 * @return StatusCode of refreshing the configs 883 */ 884 public StatusCode refresh(MotionMagicConfigs configs) 885 { 886 return refresh(configs, DefaultTimeoutSeconds); 887 } 888 889 /** 890 * Refreshes the values of the specified config group. 891 * <p> 892 * Call to refresh the selected configs from the device. 893 * 894 * @param configs The configs to refresh 895 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 896 * @return StatusCode of refreshing the configs 897 */ 898 public StatusCode refresh(MotionMagicConfigs configs, double timeoutSeconds) 899 { 900 StringBuilder serializedString = new StringBuilder(); 901 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 902 if (err == StatusCode.OK) { 903 /* Only deserialize if we successfully got configs */ 904 configs.deserialize(serializedString.toString()); 905 } 906 return err; 907 } 908 909 /** 910 * Applies the contents of the specified config to the device. 911 * <p> 912 * This will wait up to {@link #DefaultTimeoutSeconds}. 913 * <p> 914 * Call to apply the selected configs. 915 * 916 * @param configs Configs to apply against. 917 * @return StatusCode of the set command 918 */ 919 public StatusCode apply(MotionMagicConfigs configs) 920 { 921 return apply(configs, DefaultTimeoutSeconds); 922 } 923 924 /** 925 * Applies the contents of the specified config to the device. 926 * <p> 927 * Call to apply the selected configs. 928 * 929 * @param configs Configs to apply against. 930 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 931 * @return StatusCode of the set command 932 */ 933 public StatusCode apply(MotionMagicConfigs configs, double timeoutSeconds) 934 { 935 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 936 } 937 938 939 /** 940 * Refreshes the values of the specified config group. 941 * <p> 942 * This will wait up to {@link #DefaultTimeoutSeconds}. 943 * <p> 944 * Call to refresh the selected configs from the device. 945 * 946 * @param configs The configs to refresh 947 * @return StatusCode of refreshing the configs 948 */ 949 public StatusCode refresh(CustomParamsConfigs configs) 950 { 951 return refresh(configs, DefaultTimeoutSeconds); 952 } 953 954 /** 955 * Refreshes the values of the specified config group. 956 * <p> 957 * Call to refresh the selected configs from the device. 958 * 959 * @param configs The configs to refresh 960 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 961 * @return StatusCode of refreshing the configs 962 */ 963 public StatusCode refresh(CustomParamsConfigs configs, double timeoutSeconds) 964 { 965 StringBuilder serializedString = new StringBuilder(); 966 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 967 if (err == StatusCode.OK) { 968 /* Only deserialize if we successfully got configs */ 969 configs.deserialize(serializedString.toString()); 970 } 971 return err; 972 } 973 974 /** 975 * Applies the contents of the specified config to the device. 976 * <p> 977 * This will wait up to {@link #DefaultTimeoutSeconds}. 978 * <p> 979 * Call to apply the selected configs. 980 * 981 * @param configs Configs to apply against. 982 * @return StatusCode of the set command 983 */ 984 public StatusCode apply(CustomParamsConfigs configs) 985 { 986 return apply(configs, DefaultTimeoutSeconds); 987 } 988 989 /** 990 * Applies the contents of the specified config to the device. 991 * <p> 992 * Call to apply the selected configs. 993 * 994 * @param configs Configs to apply against. 995 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 996 * @return StatusCode of the set command 997 */ 998 public StatusCode apply(CustomParamsConfigs configs, double timeoutSeconds) 999 { 1000 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 1001 } 1002 1003 1004 /** 1005 * Refreshes the values of the specified config group. 1006 * <p> 1007 * This will wait up to {@link #DefaultTimeoutSeconds}. 1008 * <p> 1009 * Call to refresh the selected configs from the device. 1010 * 1011 * @param configs The configs to refresh 1012 * @return StatusCode of refreshing the configs 1013 */ 1014 public StatusCode refresh(ClosedLoopGeneralConfigs configs) 1015 { 1016 return refresh(configs, DefaultTimeoutSeconds); 1017 } 1018 1019 /** 1020 * Refreshes the values of the specified config group. 1021 * <p> 1022 * Call to refresh the selected configs from the device. 1023 * 1024 * @param configs The configs to refresh 1025 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1026 * @return StatusCode of refreshing the configs 1027 */ 1028 public StatusCode refresh(ClosedLoopGeneralConfigs configs, double timeoutSeconds) 1029 { 1030 StringBuilder serializedString = new StringBuilder(); 1031 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 1032 if (err == StatusCode.OK) { 1033 /* Only deserialize if we successfully got configs */ 1034 configs.deserialize(serializedString.toString()); 1035 } 1036 return err; 1037 } 1038 1039 /** 1040 * Applies the contents of the specified config to the device. 1041 * <p> 1042 * This will wait up to {@link #DefaultTimeoutSeconds}. 1043 * <p> 1044 * Call to apply the selected configs. 1045 * 1046 * @param configs Configs to apply against. 1047 * @return StatusCode of the set command 1048 */ 1049 public StatusCode apply(ClosedLoopGeneralConfigs configs) 1050 { 1051 return apply(configs, DefaultTimeoutSeconds); 1052 } 1053 1054 /** 1055 * Applies the contents of the specified config to the device. 1056 * <p> 1057 * Call to apply the selected configs. 1058 * 1059 * @param configs Configs to apply against. 1060 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1061 * @return StatusCode of the set command 1062 */ 1063 public StatusCode apply(ClosedLoopGeneralConfigs configs, double timeoutSeconds) 1064 { 1065 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 1066 } 1067 1068 1069 /** 1070 * Refreshes the values of the specified config group. 1071 * <p> 1072 * This will wait up to {@link #DefaultTimeoutSeconds}. 1073 * <p> 1074 * Call to refresh the selected configs from the device. 1075 * 1076 * @param configs The configs to refresh 1077 * @return StatusCode of refreshing the configs 1078 */ 1079 public StatusCode refresh(Slot0Configs configs) 1080 { 1081 return refresh(configs, DefaultTimeoutSeconds); 1082 } 1083 1084 /** 1085 * Refreshes the values of the specified config group. 1086 * <p> 1087 * Call to refresh the selected configs from the device. 1088 * 1089 * @param configs The configs to refresh 1090 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1091 * @return StatusCode of refreshing the configs 1092 */ 1093 public StatusCode refresh(Slot0Configs configs, double timeoutSeconds) 1094 { 1095 StringBuilder serializedString = new StringBuilder(); 1096 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 1097 if (err == StatusCode.OK) { 1098 /* Only deserialize if we successfully got configs */ 1099 configs.deserialize(serializedString.toString()); 1100 } 1101 return err; 1102 } 1103 1104 /** 1105 * Applies the contents of the specified config to the device. 1106 * <p> 1107 * This will wait up to {@link #DefaultTimeoutSeconds}. 1108 * <p> 1109 * Call to apply the selected configs. 1110 * 1111 * @param configs Configs to apply against. 1112 * @return StatusCode of the set command 1113 */ 1114 public StatusCode apply(Slot0Configs configs) 1115 { 1116 return apply(configs, DefaultTimeoutSeconds); 1117 } 1118 1119 /** 1120 * Applies the contents of the specified config to the device. 1121 * <p> 1122 * Call to apply the selected configs. 1123 * 1124 * @param configs Configs to apply against. 1125 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1126 * @return StatusCode of the set command 1127 */ 1128 public StatusCode apply(Slot0Configs configs, double timeoutSeconds) 1129 { 1130 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 1131 } 1132 1133 1134 /** 1135 * Refreshes the values of the specified config group. 1136 * <p> 1137 * This will wait up to {@link #DefaultTimeoutSeconds}. 1138 * <p> 1139 * Call to refresh the selected configs from the device. 1140 * 1141 * @param configs The configs to refresh 1142 * @return StatusCode of refreshing the configs 1143 */ 1144 public StatusCode refresh(Slot1Configs configs) 1145 { 1146 return refresh(configs, DefaultTimeoutSeconds); 1147 } 1148 1149 /** 1150 * Refreshes the values of the specified config group. 1151 * <p> 1152 * Call to refresh the selected configs from the device. 1153 * 1154 * @param configs The configs to refresh 1155 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1156 * @return StatusCode of refreshing the configs 1157 */ 1158 public StatusCode refresh(Slot1Configs configs, double timeoutSeconds) 1159 { 1160 StringBuilder serializedString = new StringBuilder(); 1161 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 1162 if (err == StatusCode.OK) { 1163 /* Only deserialize if we successfully got configs */ 1164 configs.deserialize(serializedString.toString()); 1165 } 1166 return err; 1167 } 1168 1169 /** 1170 * Applies the contents of the specified config to the device. 1171 * <p> 1172 * This will wait up to {@link #DefaultTimeoutSeconds}. 1173 * <p> 1174 * Call to apply the selected configs. 1175 * 1176 * @param configs Configs to apply against. 1177 * @return StatusCode of the set command 1178 */ 1179 public StatusCode apply(Slot1Configs configs) 1180 { 1181 return apply(configs, DefaultTimeoutSeconds); 1182 } 1183 1184 /** 1185 * Applies the contents of the specified config to the device. 1186 * <p> 1187 * Call to apply the selected configs. 1188 * 1189 * @param configs Configs to apply against. 1190 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1191 * @return StatusCode of the set command 1192 */ 1193 public StatusCode apply(Slot1Configs configs, double timeoutSeconds) 1194 { 1195 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 1196 } 1197 1198 1199 /** 1200 * Refreshes the values of the specified config group. 1201 * <p> 1202 * This will wait up to {@link #DefaultTimeoutSeconds}. 1203 * <p> 1204 * Call to refresh the selected configs from the device. 1205 * 1206 * @param configs The configs to refresh 1207 * @return StatusCode of refreshing the configs 1208 */ 1209 public StatusCode refresh(Slot2Configs configs) 1210 { 1211 return refresh(configs, DefaultTimeoutSeconds); 1212 } 1213 1214 /** 1215 * Refreshes the values of the specified config group. 1216 * <p> 1217 * Call to refresh the selected configs from the device. 1218 * 1219 * @param configs The configs to refresh 1220 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1221 * @return StatusCode of refreshing the configs 1222 */ 1223 public StatusCode refresh(Slot2Configs configs, double timeoutSeconds) 1224 { 1225 StringBuilder serializedString = new StringBuilder(); 1226 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 1227 if (err == StatusCode.OK) { 1228 /* Only deserialize if we successfully got configs */ 1229 configs.deserialize(serializedString.toString()); 1230 } 1231 return err; 1232 } 1233 1234 /** 1235 * Applies the contents of the specified config to the device. 1236 * <p> 1237 * This will wait up to {@link #DefaultTimeoutSeconds}. 1238 * <p> 1239 * Call to apply the selected configs. 1240 * 1241 * @param configs Configs to apply against. 1242 * @return StatusCode of the set command 1243 */ 1244 public StatusCode apply(Slot2Configs configs) 1245 { 1246 return apply(configs, DefaultTimeoutSeconds); 1247 } 1248 1249 /** 1250 * Applies the contents of the specified config to the device. 1251 * <p> 1252 * Call to apply the selected configs. 1253 * 1254 * @param configs Configs to apply against. 1255 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1256 * @return StatusCode of the set command 1257 */ 1258 public StatusCode apply(Slot2Configs configs, double timeoutSeconds) 1259 { 1260 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 1261 } 1262 1263 1264 /** 1265 * Refreshes the values of the specified config group. 1266 * <p> 1267 * This will wait up to {@link #DefaultTimeoutSeconds}. 1268 * <p> 1269 * Call to refresh the selected configs from the device. 1270 * 1271 * @param configs The configs to refresh 1272 * @return StatusCode of refreshing the configs 1273 */ 1274 public StatusCode refresh(SlotConfigs configs) 1275 { 1276 return refresh(configs, DefaultTimeoutSeconds); 1277 } 1278 1279 /** 1280 * Refreshes the values of the specified config group. 1281 * <p> 1282 * Call to refresh the selected configs from the device. 1283 * 1284 * @param configs The configs to refresh 1285 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1286 * @return StatusCode of refreshing the configs 1287 */ 1288 public StatusCode refresh(SlotConfigs configs, double timeoutSeconds) 1289 { 1290 StringBuilder serializedString = new StringBuilder(); 1291 StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds); 1292 if (err == StatusCode.OK) { 1293 /* Only deserialize if we successfully got configs */ 1294 configs.deserialize(serializedString.toString()); 1295 } 1296 return err; 1297 } 1298 1299 /** 1300 * Applies the contents of the specified config to the device. 1301 * <p> 1302 * This will wait up to {@link #DefaultTimeoutSeconds}. 1303 * <p> 1304 * Call to apply the selected configs. 1305 * 1306 * @param configs Configs to apply against. 1307 * @return StatusCode of the set command 1308 */ 1309 public StatusCode apply(SlotConfigs configs) 1310 { 1311 return apply(configs, DefaultTimeoutSeconds); 1312 } 1313 1314 /** 1315 * Applies the contents of the specified config to the device. 1316 * <p> 1317 * Call to apply the selected configs. 1318 * 1319 * @param configs Configs to apply against. 1320 * @param timeoutSeconds Maximum amount of time to wait when performing configuration 1321 * @return StatusCode of the set command 1322 */ 1323 public StatusCode apply(SlotConfigs configs, double timeoutSeconds) 1324 { 1325 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 1326 } 1327 1328 1329 /** 1330 * Sets the mechanism position of the device in mechanism rotations. 1331 * <p> 1332 * This will wait up to {@link #DefaultTimeoutSeconds}. 1333 * <p> 1334 * This is available in the configurator in case the user wants 1335 * to initialize their device entirely without passing a device 1336 * reference down to the code that performs the initialization. 1337 * In this case, the user passes down the configurator object 1338 * and performs all the initialization code on the object. 1339 * 1340 * @param newValue Value to set to. Units are in rotations. 1341 * @return StatusCode of the set command 1342 */ 1343 public StatusCode setPosition(double newValue) { 1344 return setPosition(newValue, DefaultTimeoutSeconds); 1345 } 1346 /** 1347 * Sets the mechanism position of the device in mechanism rotations. 1348 * <p> 1349 * This is available in the configurator in case the user wants 1350 * to initialize their device entirely without passing a device 1351 * reference down to the code that performs the initialization. 1352 * In this case, the user passes down the configurator object 1353 * and performs all the initialization code on the object. 1354 * 1355 * @param newValue Value to set to. Units are in rotations. 1356 * @param timeoutSeconds Maximum time to wait up to in seconds. 1357 * @return StatusCode of the set command 1358 */ 1359 public StatusCode setPosition(double newValue, double timeoutSeconds) { 1360 String serialized = ConfigJNI.Serializedouble(SpnValue.TalonFX_SetSensorPosition.value, newValue); 1361 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1362 } 1363 1364 /** 1365 * Sets the mechanism position of the device in mechanism rotations. 1366 * <p> 1367 * This will wait up to {@link #DefaultTimeoutSeconds}. 1368 * <p> 1369 * This is available in the configurator in case the user wants 1370 * to initialize their device entirely without passing a device 1371 * reference down to the code that performs the initialization. 1372 * In this case, the user passes down the configurator object 1373 * and performs all the initialization code on the object. 1374 * 1375 * @param newValue Value to set to. Units are in rotations. 1376 * @return StatusCode of the set command 1377 */ 1378 public StatusCode setPosition(Angle newValue) { 1379 return setPosition(newValue.in(Rotations)); 1380 } 1381 /** 1382 * Sets the mechanism position of the device in mechanism rotations. 1383 * <p> 1384 * This is available in the configurator in case the user wants 1385 * to initialize their device entirely without passing a device 1386 * reference down to the code that performs the initialization. 1387 * In this case, the user passes down the configurator object 1388 * and performs all the initialization code on the object. 1389 * 1390 * @param newValue Value to set to. Units are in rotations. 1391 * @param timeoutSeconds Maximum time to wait up to in seconds. 1392 * @return StatusCode of the set command 1393 */ 1394 public StatusCode setPosition(Angle newValue, double timeoutSeconds) { 1395 return setPosition(newValue.in(Rotations), timeoutSeconds); 1396 } 1397 1398 /** 1399 * Clear the sticky faults in the device. 1400 * <p> 1401 * This typically has no impact on the device functionality. Instead, 1402 * it just clears telemetry faults that are accessible via API and 1403 * Tuner Self-Test. 1404 * <p> 1405 * This will wait up to {@link #DefaultTimeoutSeconds}. 1406 * <p> 1407 * This is available in the configurator in case the user wants 1408 * to initialize their device entirely without passing a device 1409 * reference down to the code that performs the initialization. 1410 * In this case, the user passes down the configurator object 1411 * and performs all the initialization code on the object. 1412 * 1413 * @return StatusCode of the set command 1414 */ 1415 public StatusCode clearStickyFaults() { 1416 return clearStickyFaults(DefaultTimeoutSeconds); 1417 } 1418 /** 1419 * Clear the sticky faults in the device. 1420 * <p> 1421 * This typically has no impact on the device functionality. Instead, 1422 * it just clears telemetry faults that are accessible via API and 1423 * Tuner Self-Test. 1424 * <p> 1425 * This is available in the configurator in case the user wants 1426 * to initialize their device entirely without passing a device 1427 * reference down to the code that performs the initialization. 1428 * In this case, the user passes down the configurator object 1429 * and performs all the initialization code on the object. 1430 * 1431 * @param timeoutSeconds Maximum time to wait up to in seconds. 1432 * @return StatusCode of the set command 1433 */ 1434 public StatusCode clearStickyFaults(double timeoutSeconds) { 1435 String serialized = ConfigJNI.Serializedouble(SpnValue.SPN_ClearStickyFaults.value, 0); 1436 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1437 } 1438 1439 /** 1440 * Clear sticky fault: Hardware fault occurred 1441 * <p> 1442 * This will wait up to {@link #DefaultTimeoutSeconds}. 1443 * <p> 1444 * This is available in the configurator in case the user wants 1445 * to initialize their device entirely without passing a device 1446 * reference down to the code that performs the initialization. 1447 * In this case, the user passes down the configurator object 1448 * and performs all the initialization code on the object. 1449 * 1450 * @return StatusCode of the set command 1451 */ 1452 public StatusCode clearStickyFault_Hardware() { 1453 return clearStickyFault_Hardware(DefaultTimeoutSeconds); 1454 } 1455 /** 1456 * Clear sticky fault: Hardware fault occurred 1457 * <p> 1458 * This is available in the configurator in case the user wants 1459 * to initialize their device entirely without passing a device 1460 * reference down to the code that performs the initialization. 1461 * In this case, the user passes down the configurator object 1462 * and performs all the initialization code on the object. 1463 * 1464 * @param timeoutSeconds Maximum time to wait up to in seconds. 1465 * @return StatusCode of the set command 1466 */ 1467 public StatusCode clearStickyFault_Hardware(double timeoutSeconds) { 1468 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_Hardware.value, 0); 1469 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1470 } 1471 1472 /** 1473 * Clear sticky fault: Processor temperature exceeded limit 1474 * <p> 1475 * This will wait up to {@link #DefaultTimeoutSeconds}. 1476 * <p> 1477 * This is available in the configurator in case the user wants 1478 * to initialize their device entirely without passing a device 1479 * reference down to the code that performs the initialization. 1480 * In this case, the user passes down the configurator object 1481 * and performs all the initialization code on the object. 1482 * 1483 * @return StatusCode of the set command 1484 */ 1485 public StatusCode clearStickyFault_ProcTemp() { 1486 return clearStickyFault_ProcTemp(DefaultTimeoutSeconds); 1487 } 1488 /** 1489 * Clear sticky fault: Processor temperature exceeded limit 1490 * <p> 1491 * This is available in the configurator in case the user wants 1492 * to initialize their device entirely without passing a device 1493 * reference down to the code that performs the initialization. 1494 * In this case, the user passes down the configurator object 1495 * and performs all the initialization code on the object. 1496 * 1497 * @param timeoutSeconds Maximum time to wait up to in seconds. 1498 * @return StatusCode of the set command 1499 */ 1500 public StatusCode clearStickyFault_ProcTemp(double timeoutSeconds) { 1501 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_ProcTemp.value, 0); 1502 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1503 } 1504 1505 /** 1506 * Clear sticky fault: Device temperature exceeded limit 1507 * <p> 1508 * This will wait up to {@link #DefaultTimeoutSeconds}. 1509 * <p> 1510 * This is available in the configurator in case the user wants 1511 * to initialize their device entirely without passing a device 1512 * reference down to the code that performs the initialization. 1513 * In this case, the user passes down the configurator object 1514 * and performs all the initialization code on the object. 1515 * 1516 * @return StatusCode of the set command 1517 */ 1518 public StatusCode clearStickyFault_DeviceTemp() { 1519 return clearStickyFault_DeviceTemp(DefaultTimeoutSeconds); 1520 } 1521 /** 1522 * Clear sticky fault: Device temperature exceeded limit 1523 * <p> 1524 * This is available in the configurator in case the user wants 1525 * to initialize their device entirely without passing a device 1526 * reference down to the code that performs the initialization. 1527 * In this case, the user passes down the configurator object 1528 * and performs all the initialization code on the object. 1529 * 1530 * @param timeoutSeconds Maximum time to wait up to in seconds. 1531 * @return StatusCode of the set command 1532 */ 1533 public StatusCode clearStickyFault_DeviceTemp(double timeoutSeconds) { 1534 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_DeviceTemp.value, 0); 1535 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1536 } 1537 1538 /** 1539 * Clear sticky fault: Device supply voltage dropped to near brownout 1540 * levels 1541 * <p> 1542 * This will wait up to {@link #DefaultTimeoutSeconds}. 1543 * <p> 1544 * This is available in the configurator in case the user wants 1545 * to initialize their device entirely without passing a device 1546 * reference down to the code that performs the initialization. 1547 * In this case, the user passes down the configurator object 1548 * and performs all the initialization code on the object. 1549 * 1550 * @return StatusCode of the set command 1551 */ 1552 public StatusCode clearStickyFault_Undervoltage() { 1553 return clearStickyFault_Undervoltage(DefaultTimeoutSeconds); 1554 } 1555 /** 1556 * Clear sticky fault: Device supply voltage dropped to near brownout 1557 * levels 1558 * <p> 1559 * This is available in the configurator in case the user wants 1560 * to initialize their device entirely without passing a device 1561 * reference down to the code that performs the initialization. 1562 * In this case, the user passes down the configurator object 1563 * and performs all the initialization code on the object. 1564 * 1565 * @param timeoutSeconds Maximum time to wait up to in seconds. 1566 * @return StatusCode of the set command 1567 */ 1568 public StatusCode clearStickyFault_Undervoltage(double timeoutSeconds) { 1569 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_Undervoltage.value, 0); 1570 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1571 } 1572 1573 /** 1574 * Clear sticky fault: Device boot while detecting the enable signal 1575 * <p> 1576 * This will wait up to {@link #DefaultTimeoutSeconds}. 1577 * <p> 1578 * This is available in the configurator in case the user wants 1579 * to initialize their device entirely without passing a device 1580 * reference down to the code that performs the initialization. 1581 * In this case, the user passes down the configurator object 1582 * and performs all the initialization code on the object. 1583 * 1584 * @return StatusCode of the set command 1585 */ 1586 public StatusCode clearStickyFault_BootDuringEnable() { 1587 return clearStickyFault_BootDuringEnable(DefaultTimeoutSeconds); 1588 } 1589 /** 1590 * Clear sticky fault: Device boot while detecting the enable signal 1591 * <p> 1592 * This is available in the configurator in case the user wants 1593 * to initialize their device entirely without passing a device 1594 * reference down to the code that performs the initialization. 1595 * In this case, the user passes down the configurator object 1596 * and performs all the initialization code on the object. 1597 * 1598 * @param timeoutSeconds Maximum time to wait up to in seconds. 1599 * @return StatusCode of the set command 1600 */ 1601 public StatusCode clearStickyFault_BootDuringEnable(double timeoutSeconds) { 1602 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_BootDuringEnable.value, 0); 1603 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1604 } 1605 1606 /** 1607 * Clear sticky fault: An unlicensed feature is in use, device may not 1608 * behave as expected. 1609 * <p> 1610 * This will wait up to {@link #DefaultTimeoutSeconds}. 1611 * <p> 1612 * This is available in the configurator in case the user wants 1613 * to initialize their device entirely without passing a device 1614 * reference down to the code that performs the initialization. 1615 * In this case, the user passes down the configurator object 1616 * and performs all the initialization code on the object. 1617 * 1618 * @return StatusCode of the set command 1619 */ 1620 public StatusCode clearStickyFault_UnlicensedFeatureInUse() { 1621 return clearStickyFault_UnlicensedFeatureInUse(DefaultTimeoutSeconds); 1622 } 1623 /** 1624 * Clear sticky fault: An unlicensed feature is in use, device may not 1625 * behave as expected. 1626 * <p> 1627 * This is available in the configurator in case the user wants 1628 * to initialize their device entirely without passing a device 1629 * reference down to the code that performs the initialization. 1630 * In this case, the user passes down the configurator object 1631 * and performs all the initialization code on the object. 1632 * 1633 * @param timeoutSeconds Maximum time to wait up to in seconds. 1634 * @return StatusCode of the set command 1635 */ 1636 public StatusCode clearStickyFault_UnlicensedFeatureInUse(double timeoutSeconds) { 1637 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_UnlicensedFeatureInUse.value, 0); 1638 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1639 } 1640 1641 /** 1642 * Clear sticky fault: Bridge was disabled most likely due to supply 1643 * voltage dropping too low. 1644 * <p> 1645 * This will wait up to {@link #DefaultTimeoutSeconds}. 1646 * <p> 1647 * This is available in the configurator in case the user wants 1648 * to initialize their device entirely without passing a device 1649 * reference down to the code that performs the initialization. 1650 * In this case, the user passes down the configurator object 1651 * and performs all the initialization code on the object. 1652 * 1653 * @return StatusCode of the set command 1654 */ 1655 public StatusCode clearStickyFault_BridgeBrownout() { 1656 return clearStickyFault_BridgeBrownout(DefaultTimeoutSeconds); 1657 } 1658 /** 1659 * Clear sticky fault: Bridge was disabled most likely due to supply 1660 * voltage dropping too low. 1661 * <p> 1662 * This is available in the configurator in case the user wants 1663 * to initialize their device entirely without passing a device 1664 * reference down to the code that performs the initialization. 1665 * In this case, the user passes down the configurator object 1666 * and performs all the initialization code on the object. 1667 * 1668 * @param timeoutSeconds Maximum time to wait up to in seconds. 1669 * @return StatusCode of the set command 1670 */ 1671 public StatusCode clearStickyFault_BridgeBrownout(double timeoutSeconds) { 1672 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_BridgeBrownout.value, 0); 1673 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1674 } 1675 1676 /** 1677 * Clear sticky fault: The remote sensor has reset. 1678 * <p> 1679 * This will wait up to {@link #DefaultTimeoutSeconds}. 1680 * <p> 1681 * This is available in the configurator in case the user wants 1682 * to initialize their device entirely without passing a device 1683 * reference down to the code that performs the initialization. 1684 * In this case, the user passes down the configurator object 1685 * and performs all the initialization code on the object. 1686 * 1687 * @return StatusCode of the set command 1688 */ 1689 public StatusCode clearStickyFault_RemoteSensorReset() { 1690 return clearStickyFault_RemoteSensorReset(DefaultTimeoutSeconds); 1691 } 1692 /** 1693 * Clear sticky fault: The remote sensor has reset. 1694 * <p> 1695 * This is available in the configurator in case the user wants 1696 * to initialize their device entirely without passing a device 1697 * reference down to the code that performs the initialization. 1698 * In this case, the user passes down the configurator object 1699 * and performs all the initialization code on the object. 1700 * 1701 * @param timeoutSeconds Maximum time to wait up to in seconds. 1702 * @return StatusCode of the set command 1703 */ 1704 public StatusCode clearStickyFault_RemoteSensorReset(double timeoutSeconds) { 1705 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_RemoteSensorReset.value, 0); 1706 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1707 } 1708 1709 /** 1710 * Clear sticky fault: The remote Talon used for differential control 1711 * is not present on CAN Bus. 1712 * <p> 1713 * This will wait up to {@link #DefaultTimeoutSeconds}. 1714 * <p> 1715 * This is available in the configurator in case the user wants 1716 * to initialize their device entirely without passing a device 1717 * reference down to the code that performs the initialization. 1718 * In this case, the user passes down the configurator object 1719 * and performs all the initialization code on the object. 1720 * 1721 * @return StatusCode of the set command 1722 */ 1723 public StatusCode clearStickyFault_MissingDifferentialFX() { 1724 return clearStickyFault_MissingDifferentialFX(DefaultTimeoutSeconds); 1725 } 1726 /** 1727 * Clear sticky fault: The remote Talon used for differential control 1728 * is not present on CAN Bus. 1729 * <p> 1730 * This is available in the configurator in case the user wants 1731 * to initialize their device entirely without passing a device 1732 * reference down to the code that performs the initialization. 1733 * In this case, the user passes down the configurator object 1734 * and performs all the initialization code on the object. 1735 * 1736 * @param timeoutSeconds Maximum time to wait up to in seconds. 1737 * @return StatusCode of the set command 1738 */ 1739 public StatusCode clearStickyFault_MissingDifferentialFX(double timeoutSeconds) { 1740 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_MissingDifferentialFX.value, 0); 1741 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1742 } 1743 1744 /** 1745 * Clear sticky fault: The remote sensor position has overflowed. 1746 * Because of the nature of remote sensors, it is possible for the 1747 * remote sensor position to overflow beyond what is supported by the 1748 * status signal frame. However, this is rare and cannot occur over 1749 * the course of an FRC match under normal use. 1750 * <p> 1751 * This will wait up to {@link #DefaultTimeoutSeconds}. 1752 * <p> 1753 * This is available in the configurator in case the user wants 1754 * to initialize their device entirely without passing a device 1755 * reference down to the code that performs the initialization. 1756 * In this case, the user passes down the configurator object 1757 * and performs all the initialization code on the object. 1758 * 1759 * @return StatusCode of the set command 1760 */ 1761 public StatusCode clearStickyFault_RemoteSensorPosOverflow() { 1762 return clearStickyFault_RemoteSensorPosOverflow(DefaultTimeoutSeconds); 1763 } 1764 /** 1765 * Clear sticky fault: The remote sensor position has overflowed. 1766 * Because of the nature of remote sensors, it is possible for the 1767 * remote sensor position to overflow beyond what is supported by the 1768 * status signal frame. However, this is rare and cannot occur over 1769 * the course of an FRC match under normal use. 1770 * <p> 1771 * This is available in the configurator in case the user wants 1772 * to initialize their device entirely without passing a device 1773 * reference down to the code that performs the initialization. 1774 * In this case, the user passes down the configurator object 1775 * and performs all the initialization code on the object. 1776 * 1777 * @param timeoutSeconds Maximum time to wait up to in seconds. 1778 * @return StatusCode of the set command 1779 */ 1780 public StatusCode clearStickyFault_RemoteSensorPosOverflow(double timeoutSeconds) { 1781 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_RemoteSensorPosOverflow.value, 0); 1782 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1783 } 1784 1785 /** 1786 * Clear sticky fault: Supply Voltage has exceeded the maximum voltage 1787 * rating of device. 1788 * <p> 1789 * This will wait up to {@link #DefaultTimeoutSeconds}. 1790 * <p> 1791 * This is available in the configurator in case the user wants 1792 * to initialize their device entirely without passing a device 1793 * reference down to the code that performs the initialization. 1794 * In this case, the user passes down the configurator object 1795 * and performs all the initialization code on the object. 1796 * 1797 * @return StatusCode of the set command 1798 */ 1799 public StatusCode clearStickyFault_OverSupplyV() { 1800 return clearStickyFault_OverSupplyV(DefaultTimeoutSeconds); 1801 } 1802 /** 1803 * Clear sticky fault: Supply Voltage has exceeded the maximum voltage 1804 * rating of device. 1805 * <p> 1806 * This is available in the configurator in case the user wants 1807 * to initialize their device entirely without passing a device 1808 * reference down to the code that performs the initialization. 1809 * In this case, the user passes down the configurator object 1810 * and performs all the initialization code on the object. 1811 * 1812 * @param timeoutSeconds Maximum time to wait up to in seconds. 1813 * @return StatusCode of the set command 1814 */ 1815 public StatusCode clearStickyFault_OverSupplyV(double timeoutSeconds) { 1816 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_OverSupplyV.value, 0); 1817 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1818 } 1819 1820 /** 1821 * Clear sticky fault: Supply Voltage is unstable. Ensure you are 1822 * using a battery and current limited power supply. 1823 * <p> 1824 * This will wait up to {@link #DefaultTimeoutSeconds}. 1825 * <p> 1826 * This is available in the configurator in case the user wants 1827 * to initialize their device entirely without passing a device 1828 * reference down to the code that performs the initialization. 1829 * In this case, the user passes down the configurator object 1830 * and performs all the initialization code on the object. 1831 * 1832 * @return StatusCode of the set command 1833 */ 1834 public StatusCode clearStickyFault_UnstableSupplyV() { 1835 return clearStickyFault_UnstableSupplyV(DefaultTimeoutSeconds); 1836 } 1837 /** 1838 * Clear sticky fault: Supply Voltage is unstable. Ensure you are 1839 * using a battery and current limited power supply. 1840 * <p> 1841 * This is available in the configurator in case the user wants 1842 * to initialize their device entirely without passing a device 1843 * reference down to the code that performs the initialization. 1844 * In this case, the user passes down the configurator object 1845 * and performs all the initialization code on the object. 1846 * 1847 * @param timeoutSeconds Maximum time to wait up to in seconds. 1848 * @return StatusCode of the set command 1849 */ 1850 public StatusCode clearStickyFault_UnstableSupplyV(double timeoutSeconds) { 1851 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_UnstableSupplyV.value, 0); 1852 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1853 } 1854 1855 /** 1856 * Clear sticky fault: Reverse limit switch has been asserted. Output 1857 * is set to neutral. 1858 * <p> 1859 * This will wait up to {@link #DefaultTimeoutSeconds}. 1860 * <p> 1861 * This is available in the configurator in case the user wants 1862 * to initialize their device entirely without passing a device 1863 * reference down to the code that performs the initialization. 1864 * In this case, the user passes down the configurator object 1865 * and performs all the initialization code on the object. 1866 * 1867 * @return StatusCode of the set command 1868 */ 1869 public StatusCode clearStickyFault_ReverseHardLimit() { 1870 return clearStickyFault_ReverseHardLimit(DefaultTimeoutSeconds); 1871 } 1872 /** 1873 * Clear sticky fault: Reverse limit switch has been asserted. Output 1874 * is set to neutral. 1875 * <p> 1876 * This is available in the configurator in case the user wants 1877 * to initialize their device entirely without passing a device 1878 * reference down to the code that performs the initialization. 1879 * In this case, the user passes down the configurator object 1880 * and performs all the initialization code on the object. 1881 * 1882 * @param timeoutSeconds Maximum time to wait up to in seconds. 1883 * @return StatusCode of the set command 1884 */ 1885 public StatusCode clearStickyFault_ReverseHardLimit(double timeoutSeconds) { 1886 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_ReverseHardLimit.value, 0); 1887 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1888 } 1889 1890 /** 1891 * Clear sticky fault: Forward limit switch has been asserted. Output 1892 * is set to neutral. 1893 * <p> 1894 * This will wait up to {@link #DefaultTimeoutSeconds}. 1895 * <p> 1896 * This is available in the configurator in case the user wants 1897 * to initialize their device entirely without passing a device 1898 * reference down to the code that performs the initialization. 1899 * In this case, the user passes down the configurator object 1900 * and performs all the initialization code on the object. 1901 * 1902 * @return StatusCode of the set command 1903 */ 1904 public StatusCode clearStickyFault_ForwardHardLimit() { 1905 return clearStickyFault_ForwardHardLimit(DefaultTimeoutSeconds); 1906 } 1907 /** 1908 * Clear sticky fault: Forward limit switch has been asserted. Output 1909 * is set to neutral. 1910 * <p> 1911 * This is available in the configurator in case the user wants 1912 * to initialize their device entirely without passing a device 1913 * reference down to the code that performs the initialization. 1914 * In this case, the user passes down the configurator object 1915 * and performs all the initialization code on the object. 1916 * 1917 * @param timeoutSeconds Maximum time to wait up to in seconds. 1918 * @return StatusCode of the set command 1919 */ 1920 public StatusCode clearStickyFault_ForwardHardLimit(double timeoutSeconds) { 1921 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_ForwardHardLimit.value, 0); 1922 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1923 } 1924 1925 /** 1926 * Clear sticky fault: Reverse soft limit has been asserted. Output 1927 * is set to neutral. 1928 * <p> 1929 * This will wait up to {@link #DefaultTimeoutSeconds}. 1930 * <p> 1931 * This is available in the configurator in case the user wants 1932 * to initialize their device entirely without passing a device 1933 * reference down to the code that performs the initialization. 1934 * In this case, the user passes down the configurator object 1935 * and performs all the initialization code on the object. 1936 * 1937 * @return StatusCode of the set command 1938 */ 1939 public StatusCode clearStickyFault_ReverseSoftLimit() { 1940 return clearStickyFault_ReverseSoftLimit(DefaultTimeoutSeconds); 1941 } 1942 /** 1943 * Clear sticky fault: Reverse soft limit has been asserted. Output 1944 * is set to neutral. 1945 * <p> 1946 * This is available in the configurator in case the user wants 1947 * to initialize their device entirely without passing a device 1948 * reference down to the code that performs the initialization. 1949 * In this case, the user passes down the configurator object 1950 * and performs all the initialization code on the object. 1951 * 1952 * @param timeoutSeconds Maximum time to wait up to in seconds. 1953 * @return StatusCode of the set command 1954 */ 1955 public StatusCode clearStickyFault_ReverseSoftLimit(double timeoutSeconds) { 1956 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_ReverseSoftLimit.value, 0); 1957 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1958 } 1959 1960 /** 1961 * Clear sticky fault: Forward soft limit has been asserted. Output 1962 * is set to neutral. 1963 * <p> 1964 * This will wait up to {@link #DefaultTimeoutSeconds}. 1965 * <p> 1966 * This is available in the configurator in case the user wants 1967 * to initialize their device entirely without passing a device 1968 * reference down to the code that performs the initialization. 1969 * In this case, the user passes down the configurator object 1970 * and performs all the initialization code on the object. 1971 * 1972 * @return StatusCode of the set command 1973 */ 1974 public StatusCode clearStickyFault_ForwardSoftLimit() { 1975 return clearStickyFault_ForwardSoftLimit(DefaultTimeoutSeconds); 1976 } 1977 /** 1978 * Clear sticky fault: Forward soft limit has been asserted. Output 1979 * is set to neutral. 1980 * <p> 1981 * This is available in the configurator in case the user wants 1982 * to initialize their device entirely without passing a device 1983 * reference down to the code that performs the initialization. 1984 * In this case, the user passes down the configurator object 1985 * and performs all the initialization code on the object. 1986 * 1987 * @param timeoutSeconds Maximum time to wait up to in seconds. 1988 * @return StatusCode of the set command 1989 */ 1990 public StatusCode clearStickyFault_ForwardSoftLimit(double timeoutSeconds) { 1991 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_ForwardSoftLimit.value, 0); 1992 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 1993 } 1994 1995 /** 1996 * Clear sticky fault: The remote soft limit device is not present on 1997 * CAN Bus. 1998 * <p> 1999 * This will wait up to {@link #DefaultTimeoutSeconds}. 2000 * <p> 2001 * This is available in the configurator in case the user wants 2002 * to initialize their device entirely without passing a device 2003 * reference down to the code that performs the initialization. 2004 * In this case, the user passes down the configurator object 2005 * and performs all the initialization code on the object. 2006 * 2007 * @return StatusCode of the set command 2008 */ 2009 public StatusCode clearStickyFault_MissingSoftLimitRemote() { 2010 return clearStickyFault_MissingSoftLimitRemote(DefaultTimeoutSeconds); 2011 } 2012 /** 2013 * Clear sticky fault: The remote soft limit device is not present on 2014 * CAN Bus. 2015 * <p> 2016 * This is available in the configurator in case the user wants 2017 * to initialize their device entirely without passing a device 2018 * reference down to the code that performs the initialization. 2019 * In this case, the user passes down the configurator object 2020 * and performs all the initialization code on the object. 2021 * 2022 * @param timeoutSeconds Maximum time to wait up to in seconds. 2023 * @return StatusCode of the set command 2024 */ 2025 public StatusCode clearStickyFault_MissingSoftLimitRemote(double timeoutSeconds) { 2026 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_MissingRemSoftLim.value, 0); 2027 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2028 } 2029 2030 /** 2031 * Clear sticky fault: The remote limit switch device is not present 2032 * on CAN Bus. 2033 * <p> 2034 * This will wait up to {@link #DefaultTimeoutSeconds}. 2035 * <p> 2036 * This is available in the configurator in case the user wants 2037 * to initialize their device entirely without passing a device 2038 * reference down to the code that performs the initialization. 2039 * In this case, the user passes down the configurator object 2040 * and performs all the initialization code on the object. 2041 * 2042 * @return StatusCode of the set command 2043 */ 2044 public StatusCode clearStickyFault_MissingHardLimitRemote() { 2045 return clearStickyFault_MissingHardLimitRemote(DefaultTimeoutSeconds); 2046 } 2047 /** 2048 * Clear sticky fault: The remote limit switch device is not present 2049 * on CAN Bus. 2050 * <p> 2051 * This is available in the configurator in case the user wants 2052 * to initialize their device entirely without passing a device 2053 * reference down to the code that performs the initialization. 2054 * In this case, the user passes down the configurator object 2055 * and performs all the initialization code on the object. 2056 * 2057 * @param timeoutSeconds Maximum time to wait up to in seconds. 2058 * @return StatusCode of the set command 2059 */ 2060 public StatusCode clearStickyFault_MissingHardLimitRemote(double timeoutSeconds) { 2061 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_MissingRemHardLim.value, 0); 2062 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2063 } 2064 2065 /** 2066 * Clear sticky fault: The remote sensor's data is no longer trusted. 2067 * This can happen if the remote sensor disappears from the CAN bus or 2068 * if the remote sensor indicates its data is no longer valid, such as 2069 * when a CANcoder's magnet strength falls into the "red" range. 2070 * <p> 2071 * This will wait up to {@link #DefaultTimeoutSeconds}. 2072 * <p> 2073 * This is available in the configurator in case the user wants 2074 * to initialize their device entirely without passing a device 2075 * reference down to the code that performs the initialization. 2076 * In this case, the user passes down the configurator object 2077 * and performs all the initialization code on the object. 2078 * 2079 * @return StatusCode of the set command 2080 */ 2081 public StatusCode clearStickyFault_RemoteSensorDataInvalid() { 2082 return clearStickyFault_RemoteSensorDataInvalid(DefaultTimeoutSeconds); 2083 } 2084 /** 2085 * Clear sticky fault: The remote sensor's data is no longer trusted. 2086 * This can happen if the remote sensor disappears from the CAN bus or 2087 * if the remote sensor indicates its data is no longer valid, such as 2088 * when a CANcoder's magnet strength falls into the "red" range. 2089 * <p> 2090 * This is available in the configurator in case the user wants 2091 * to initialize their device entirely without passing a device 2092 * reference down to the code that performs the initialization. 2093 * In this case, the user passes down the configurator object 2094 * and performs all the initialization code on the object. 2095 * 2096 * @param timeoutSeconds Maximum time to wait up to in seconds. 2097 * @return StatusCode of the set command 2098 */ 2099 public StatusCode clearStickyFault_RemoteSensorDataInvalid(double timeoutSeconds) { 2100 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_MissingRemoteSensor.value, 0); 2101 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2102 } 2103 2104 /** 2105 * Clear sticky fault: The remote sensor used for fusion has fallen 2106 * out of sync to the local sensor. A re-synchronization has occurred, 2107 * which may cause a discontinuity. This typically happens if there is 2108 * significant slop in the mechanism, or if the RotorToSensorRatio 2109 * configuration parameter is incorrect. 2110 * <p> 2111 * This will wait up to {@link #DefaultTimeoutSeconds}. 2112 * <p> 2113 * This is available in the configurator in case the user wants 2114 * to initialize their device entirely without passing a device 2115 * reference down to the code that performs the initialization. 2116 * In this case, the user passes down the configurator object 2117 * and performs all the initialization code on the object. 2118 * 2119 * @return StatusCode of the set command 2120 */ 2121 public StatusCode clearStickyFault_FusedSensorOutOfSync() { 2122 return clearStickyFault_FusedSensorOutOfSync(DefaultTimeoutSeconds); 2123 } 2124 /** 2125 * Clear sticky fault: The remote sensor used for fusion has fallen 2126 * out of sync to the local sensor. A re-synchronization has occurred, 2127 * which may cause a discontinuity. This typically happens if there is 2128 * significant slop in the mechanism, or if the RotorToSensorRatio 2129 * configuration parameter is incorrect. 2130 * <p> 2131 * This is available in the configurator in case the user wants 2132 * to initialize their device entirely without passing a device 2133 * reference down to the code that performs the initialization. 2134 * In this case, the user passes down the configurator object 2135 * and performs all the initialization code on the object. 2136 * 2137 * @param timeoutSeconds Maximum time to wait up to in seconds. 2138 * @return StatusCode of the set command 2139 */ 2140 public StatusCode clearStickyFault_FusedSensorOutOfSync(double timeoutSeconds) { 2141 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_FusedSensorOutOfSync.value, 0); 2142 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2143 } 2144 2145 /** 2146 * Clear sticky fault: Stator current limit occured. 2147 * <p> 2148 * This will wait up to {@link #DefaultTimeoutSeconds}. 2149 * <p> 2150 * This is available in the configurator in case the user wants 2151 * to initialize their device entirely without passing a device 2152 * reference down to the code that performs the initialization. 2153 * In this case, the user passes down the configurator object 2154 * and performs all the initialization code on the object. 2155 * 2156 * @return StatusCode of the set command 2157 */ 2158 public StatusCode clearStickyFault_StatorCurrLimit() { 2159 return clearStickyFault_StatorCurrLimit(DefaultTimeoutSeconds); 2160 } 2161 /** 2162 * Clear sticky fault: Stator current limit occured. 2163 * <p> 2164 * This is available in the configurator in case the user wants 2165 * to initialize their device entirely without passing a device 2166 * reference down to the code that performs the initialization. 2167 * In this case, the user passes down the configurator object 2168 * and performs all the initialization code on the object. 2169 * 2170 * @param timeoutSeconds Maximum time to wait up to in seconds. 2171 * @return StatusCode of the set command 2172 */ 2173 public StatusCode clearStickyFault_StatorCurrLimit(double timeoutSeconds) { 2174 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_StatorCurrLimit.value, 0); 2175 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2176 } 2177 2178 /** 2179 * Clear sticky fault: Supply current limit occured. 2180 * <p> 2181 * This will wait up to {@link #DefaultTimeoutSeconds}. 2182 * <p> 2183 * This is available in the configurator in case the user wants 2184 * to initialize their device entirely without passing a device 2185 * reference down to the code that performs the initialization. 2186 * In this case, the user passes down the configurator object 2187 * and performs all the initialization code on the object. 2188 * 2189 * @return StatusCode of the set command 2190 */ 2191 public StatusCode clearStickyFault_SupplyCurrLimit() { 2192 return clearStickyFault_SupplyCurrLimit(DefaultTimeoutSeconds); 2193 } 2194 /** 2195 * Clear sticky fault: Supply current limit occured. 2196 * <p> 2197 * This is available in the configurator in case the user wants 2198 * to initialize their device entirely without passing a device 2199 * reference down to the code that performs the initialization. 2200 * In this case, the user passes down the configurator object 2201 * and performs all the initialization code on the object. 2202 * 2203 * @param timeoutSeconds Maximum time to wait up to in seconds. 2204 * @return StatusCode of the set command 2205 */ 2206 public StatusCode clearStickyFault_SupplyCurrLimit(double timeoutSeconds) { 2207 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_SupplyCurrLimit.value, 0); 2208 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2209 } 2210 2211 /** 2212 * Clear sticky fault: Using Fused CANcoder feature while unlicensed. 2213 * Device has fallen back to remote CANcoder. 2214 * <p> 2215 * This will wait up to {@link #DefaultTimeoutSeconds}. 2216 * <p> 2217 * This is available in the configurator in case the user wants 2218 * to initialize their device entirely without passing a device 2219 * reference down to the code that performs the initialization. 2220 * In this case, the user passes down the configurator object 2221 * and performs all the initialization code on the object. 2222 * 2223 * @return StatusCode of the set command 2224 */ 2225 public StatusCode clearStickyFault_UsingFusedCANcoderWhileUnlicensed() { 2226 return clearStickyFault_UsingFusedCANcoderWhileUnlicensed(DefaultTimeoutSeconds); 2227 } 2228 /** 2229 * Clear sticky fault: Using Fused CANcoder feature while unlicensed. 2230 * Device has fallen back to remote CANcoder. 2231 * <p> 2232 * This is available in the configurator in case the user wants 2233 * to initialize their device entirely without passing a device 2234 * reference down to the code that performs the initialization. 2235 * In this case, the user passes down the configurator object 2236 * and performs all the initialization code on the object. 2237 * 2238 * @param timeoutSeconds Maximum time to wait up to in seconds. 2239 * @return StatusCode of the set command 2240 */ 2241 public StatusCode clearStickyFault_UsingFusedCANcoderWhileUnlicensed(double timeoutSeconds) { 2242 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_UsingFusedCCWhileUnlicensed.value, 0); 2243 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2244 } 2245 2246 /** 2247 * Clear sticky fault: Static brake was momentarily disabled due to 2248 * excessive braking current while disabled. 2249 * <p> 2250 * This will wait up to {@link #DefaultTimeoutSeconds}. 2251 * <p> 2252 * This is available in the configurator in case the user wants 2253 * to initialize their device entirely without passing a device 2254 * reference down to the code that performs the initialization. 2255 * In this case, the user passes down the configurator object 2256 * and performs all the initialization code on the object. 2257 * 2258 * @return StatusCode of the set command 2259 */ 2260 public StatusCode clearStickyFault_StaticBrakeDisabled() { 2261 return clearStickyFault_StaticBrakeDisabled(DefaultTimeoutSeconds); 2262 } 2263 /** 2264 * Clear sticky fault: Static brake was momentarily disabled due to 2265 * excessive braking current while disabled. 2266 * <p> 2267 * This is available in the configurator in case the user wants 2268 * to initialize their device entirely without passing a device 2269 * reference down to the code that performs the initialization. 2270 * In this case, the user passes down the configurator object 2271 * and performs all the initialization code on the object. 2272 * 2273 * @param timeoutSeconds Maximum time to wait up to in seconds. 2274 * @return StatusCode of the set command 2275 */ 2276 public StatusCode clearStickyFault_StaticBrakeDisabled(double timeoutSeconds) { 2277 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_TALONFX_StaticBrakeDisabled.value, 0); 2278 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 2279 } 2280}