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 Pigeon 2 IMU sensor that measures orientation. 019 * 020 * This handles the configurations for the {@link com.ctre.phoenix6.hardware.Pigeon2} 021 */ 022public class Pigeon2Configurator extends ParentConfigurator 023{ 024 public Pigeon2Configurator (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(Pigeon2Configuration 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(Pigeon2Configuration 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(Pigeon2Configuration 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(Pigeon2Configuration 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(MountPoseConfigs 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(MountPoseConfigs 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(MountPoseConfigs 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(MountPoseConfigs 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(GyroTrimConfigs 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(GyroTrimConfigs 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(GyroTrimConfigs 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(GyroTrimConfigs 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(Pigeon2FeaturesConfigs 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(Pigeon2FeaturesConfigs 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(Pigeon2FeaturesConfigs 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(Pigeon2FeaturesConfigs 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(CustomParamsConfigs 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(CustomParamsConfigs 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(CustomParamsConfigs 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(CustomParamsConfigs configs, double timeoutSeconds) 349 { 350 return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false); 351 } 352 353 354 /** 355 * The yaw to set the Pigeon2 to right now. 356 * <p> 357 * This will wait up to {@link #DefaultTimeoutSeconds}. 358 * <p> 359 * This is available in the configurator in case the user wants 360 * to initialize their device entirely without passing a device 361 * reference down to the code that performs the initialization. 362 * In this case, the user passes down the configurator object 363 * and performs all the initialization code on the object. 364 * 365 * @param newValue Value to set to. Units are in deg. 366 * @return StatusCode of the set command 367 */ 368 public StatusCode setYaw(double newValue) { 369 return setYaw(newValue, DefaultTimeoutSeconds); 370 } 371 /** 372 * The yaw to set the Pigeon2 to right now. 373 * <p> 374 * This is available in the configurator in case the user wants 375 * to initialize their device entirely without passing a device 376 * reference down to the code that performs the initialization. 377 * In this case, the user passes down the configurator object 378 * and performs all the initialization code on the object. 379 * 380 * @param newValue Value to set to. Units are in deg. 381 * @param timeoutSeconds Maximum time to wait up to in seconds. 382 * @return StatusCode of the set command 383 */ 384 public StatusCode setYaw(double newValue, double timeoutSeconds) { 385 String serialized = ConfigJNI.Serializedouble(SpnValue.Pigeon2_SetYaw.value, newValue); 386 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 387 } 388 389 /** 390 * The yaw to set the Pigeon2 to right now. 391 * <p> 392 * This will wait up to {@link #DefaultTimeoutSeconds}. 393 * <p> 394 * This is available in the configurator in case the user wants 395 * to initialize their device entirely without passing a device 396 * reference down to the code that performs the initialization. 397 * In this case, the user passes down the configurator object 398 * and performs all the initialization code on the object. 399 * 400 * @param newValue Value to set to. Units are in deg. 401 * @return StatusCode of the set command 402 */ 403 public StatusCode setYaw(Angle newValue) { 404 return setYaw(newValue.in(Degrees)); 405 } 406 /** 407 * The yaw to set the Pigeon2 to right now. 408 * <p> 409 * This is available in the configurator in case the user wants 410 * to initialize their device entirely without passing a device 411 * reference down to the code that performs the initialization. 412 * In this case, the user passes down the configurator object 413 * and performs all the initialization code on the object. 414 * 415 * @param newValue Value to set to. Units are in deg. 416 * @param timeoutSeconds Maximum time to wait up to in seconds. 417 * @return StatusCode of the set command 418 */ 419 public StatusCode setYaw(Angle newValue, double timeoutSeconds) { 420 return setYaw(newValue.in(Degrees), timeoutSeconds); 421 } 422 423 /** 424 * Clear the sticky faults in the device. 425 * <p> 426 * This typically has no impact on the device functionality. Instead, 427 * it just clears telemetry faults that are accessible via API and 428 * Tuner Self-Test. 429 * <p> 430 * This will wait up to {@link #DefaultTimeoutSeconds}. 431 * <p> 432 * This is available in the configurator in case the user wants 433 * to initialize their device entirely without passing a device 434 * reference down to the code that performs the initialization. 435 * In this case, the user passes down the configurator object 436 * and performs all the initialization code on the object. 437 * 438 * @return StatusCode of the set command 439 */ 440 public StatusCode clearStickyFaults() { 441 return clearStickyFaults(DefaultTimeoutSeconds); 442 } 443 /** 444 * Clear the sticky faults in the device. 445 * <p> 446 * This typically has no impact on the device functionality. Instead, 447 * it just clears telemetry faults that are accessible via API and 448 * Tuner Self-Test. 449 * <p> 450 * This is available in the configurator in case the user wants 451 * to initialize their device entirely without passing a device 452 * reference down to the code that performs the initialization. 453 * In this case, the user passes down the configurator object 454 * and performs all the initialization code on the object. 455 * 456 * @param timeoutSeconds Maximum time to wait up to in seconds. 457 * @return StatusCode of the set command 458 */ 459 public StatusCode clearStickyFaults(double timeoutSeconds) { 460 String serialized = ConfigJNI.Serializedouble(SpnValue.SPN_ClearStickyFaults.value, 0); 461 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 462 } 463 464 /** 465 * Clear sticky fault: Hardware fault occurred 466 * <p> 467 * This will wait up to {@link #DefaultTimeoutSeconds}. 468 * <p> 469 * This is available in the configurator in case the user wants 470 * to initialize their device entirely without passing a device 471 * reference down to the code that performs the initialization. 472 * In this case, the user passes down the configurator object 473 * and performs all the initialization code on the object. 474 * 475 * @return StatusCode of the set command 476 */ 477 public StatusCode clearStickyFault_Hardware() { 478 return clearStickyFault_Hardware(DefaultTimeoutSeconds); 479 } 480 /** 481 * Clear sticky fault: Hardware fault occurred 482 * <p> 483 * This is available in the configurator in case the user wants 484 * to initialize their device entirely without passing a device 485 * reference down to the code that performs the initialization. 486 * In this case, the user passes down the configurator object 487 * and performs all the initialization code on the object. 488 * 489 * @param timeoutSeconds Maximum time to wait up to in seconds. 490 * @return StatusCode of the set command 491 */ 492 public StatusCode clearStickyFault_Hardware(double timeoutSeconds) { 493 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_Hardware.value, 0); 494 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 495 } 496 497 /** 498 * Clear sticky fault: Device supply voltage dropped to near brownout 499 * levels 500 * <p> 501 * This will wait up to {@link #DefaultTimeoutSeconds}. 502 * <p> 503 * This is available in the configurator in case the user wants 504 * to initialize their device entirely without passing a device 505 * reference down to the code that performs the initialization. 506 * In this case, the user passes down the configurator object 507 * and performs all the initialization code on the object. 508 * 509 * @return StatusCode of the set command 510 */ 511 public StatusCode clearStickyFault_Undervoltage() { 512 return clearStickyFault_Undervoltage(DefaultTimeoutSeconds); 513 } 514 /** 515 * Clear sticky fault: Device supply voltage dropped to near brownout 516 * levels 517 * <p> 518 * This is available in the configurator in case the user wants 519 * to initialize their device entirely without passing a device 520 * reference down to the code that performs the initialization. 521 * In this case, the user passes down the configurator object 522 * and performs all the initialization code on the object. 523 * 524 * @param timeoutSeconds Maximum time to wait up to in seconds. 525 * @return StatusCode of the set command 526 */ 527 public StatusCode clearStickyFault_Undervoltage(double timeoutSeconds) { 528 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_Undervoltage.value, 0); 529 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 530 } 531 532 /** 533 * Clear sticky fault: Device boot while detecting the enable signal 534 * <p> 535 * This will wait up to {@link #DefaultTimeoutSeconds}. 536 * <p> 537 * This is available in the configurator in case the user wants 538 * to initialize their device entirely without passing a device 539 * reference down to the code that performs the initialization. 540 * In this case, the user passes down the configurator object 541 * and performs all the initialization code on the object. 542 * 543 * @return StatusCode of the set command 544 */ 545 public StatusCode clearStickyFault_BootDuringEnable() { 546 return clearStickyFault_BootDuringEnable(DefaultTimeoutSeconds); 547 } 548 /** 549 * Clear sticky fault: Device boot while detecting the enable signal 550 * <p> 551 * This is available in the configurator in case the user wants 552 * to initialize their device entirely without passing a device 553 * reference down to the code that performs the initialization. 554 * In this case, the user passes down the configurator object 555 * and performs all the initialization code on the object. 556 * 557 * @param timeoutSeconds Maximum time to wait up to in seconds. 558 * @return StatusCode of the set command 559 */ 560 public StatusCode clearStickyFault_BootDuringEnable(double timeoutSeconds) { 561 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_BootDuringEnable.value, 0); 562 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 563 } 564 565 /** 566 * Clear sticky fault: An unlicensed feature is in use, device may not 567 * behave as expected. 568 * <p> 569 * This will wait up to {@link #DefaultTimeoutSeconds}. 570 * <p> 571 * This is available in the configurator in case the user wants 572 * to initialize their device entirely without passing a device 573 * reference down to the code that performs the initialization. 574 * In this case, the user passes down the configurator object 575 * and performs all the initialization code on the object. 576 * 577 * @return StatusCode of the set command 578 */ 579 public StatusCode clearStickyFault_UnlicensedFeatureInUse() { 580 return clearStickyFault_UnlicensedFeatureInUse(DefaultTimeoutSeconds); 581 } 582 /** 583 * Clear sticky fault: An unlicensed feature is in use, device may not 584 * behave as expected. 585 * <p> 586 * This is available in the configurator in case the user wants 587 * to initialize their device entirely without passing a device 588 * reference down to the code that performs the initialization. 589 * In this case, the user passes down the configurator object 590 * and performs all the initialization code on the object. 591 * 592 * @param timeoutSeconds Maximum time to wait up to in seconds. 593 * @return StatusCode of the set command 594 */ 595 public StatusCode clearStickyFault_UnlicensedFeatureInUse(double timeoutSeconds) { 596 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_UnlicensedFeatureInUse.value, 0); 597 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 598 } 599 600 /** 601 * Clear sticky fault: Bootup checks failed: Accelerometer 602 * <p> 603 * This will wait up to {@link #DefaultTimeoutSeconds}. 604 * <p> 605 * This is available in the configurator in case the user wants 606 * to initialize their device entirely without passing a device 607 * reference down to the code that performs the initialization. 608 * In this case, the user passes down the configurator object 609 * and performs all the initialization code on the object. 610 * 611 * @return StatusCode of the set command 612 */ 613 public StatusCode clearStickyFault_BootupAccelerometer() { 614 return clearStickyFault_BootupAccelerometer(DefaultTimeoutSeconds); 615 } 616 /** 617 * Clear sticky fault: Bootup checks failed: Accelerometer 618 * <p> 619 * This is available in the configurator in case the user wants 620 * to initialize their device entirely without passing a device 621 * reference down to the code that performs the initialization. 622 * In this case, the user passes down the configurator object 623 * and performs all the initialization code on the object. 624 * 625 * @param timeoutSeconds Maximum time to wait up to in seconds. 626 * @return StatusCode of the set command 627 */ 628 public StatusCode clearStickyFault_BootupAccelerometer(double timeoutSeconds) { 629 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootupAccel.value, 0); 630 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 631 } 632 633 /** 634 * Clear sticky fault: Bootup checks failed: Gyroscope 635 * <p> 636 * This will wait up to {@link #DefaultTimeoutSeconds}. 637 * <p> 638 * This is available in the configurator in case the user wants 639 * to initialize their device entirely without passing a device 640 * reference down to the code that performs the initialization. 641 * In this case, the user passes down the configurator object 642 * and performs all the initialization code on the object. 643 * 644 * @return StatusCode of the set command 645 */ 646 public StatusCode clearStickyFault_BootupGyroscope() { 647 return clearStickyFault_BootupGyroscope(DefaultTimeoutSeconds); 648 } 649 /** 650 * Clear sticky fault: Bootup checks failed: Gyroscope 651 * <p> 652 * This is available in the configurator in case the user wants 653 * to initialize their device entirely without passing a device 654 * reference down to the code that performs the initialization. 655 * In this case, the user passes down the configurator object 656 * and performs all the initialization code on the object. 657 * 658 * @param timeoutSeconds Maximum time to wait up to in seconds. 659 * @return StatusCode of the set command 660 */ 661 public StatusCode clearStickyFault_BootupGyroscope(double timeoutSeconds) { 662 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootupGyros.value, 0); 663 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 664 } 665 666 /** 667 * Clear sticky fault: Bootup checks failed: Magnetometer 668 * <p> 669 * This will wait up to {@link #DefaultTimeoutSeconds}. 670 * <p> 671 * This is available in the configurator in case the user wants 672 * to initialize their device entirely without passing a device 673 * reference down to the code that performs the initialization. 674 * In this case, the user passes down the configurator object 675 * and performs all the initialization code on the object. 676 * 677 * @return StatusCode of the set command 678 */ 679 public StatusCode clearStickyFault_BootupMagnetometer() { 680 return clearStickyFault_BootupMagnetometer(DefaultTimeoutSeconds); 681 } 682 /** 683 * Clear sticky fault: Bootup checks failed: Magnetometer 684 * <p> 685 * This is available in the configurator in case the user wants 686 * to initialize their device entirely without passing a device 687 * reference down to the code that performs the initialization. 688 * In this case, the user passes down the configurator object 689 * and performs all the initialization code on the object. 690 * 691 * @param timeoutSeconds Maximum time to wait up to in seconds. 692 * @return StatusCode of the set command 693 */ 694 public StatusCode clearStickyFault_BootupMagnetometer(double timeoutSeconds) { 695 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootupMagne.value, 0); 696 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 697 } 698 699 /** 700 * Clear sticky fault: Motion Detected during bootup. 701 * <p> 702 * This will wait up to {@link #DefaultTimeoutSeconds}. 703 * <p> 704 * This is available in the configurator in case the user wants 705 * to initialize their device entirely without passing a device 706 * reference down to the code that performs the initialization. 707 * In this case, the user passes down the configurator object 708 * and performs all the initialization code on the object. 709 * 710 * @return StatusCode of the set command 711 */ 712 public StatusCode clearStickyFault_BootIntoMotion() { 713 return clearStickyFault_BootIntoMotion(DefaultTimeoutSeconds); 714 } 715 /** 716 * Clear sticky fault: Motion Detected during bootup. 717 * <p> 718 * This is available in the configurator in case the user wants 719 * to initialize their device entirely without passing a device 720 * reference down to the code that performs the initialization. 721 * In this case, the user passes down the configurator object 722 * and performs all the initialization code on the object. 723 * 724 * @param timeoutSeconds Maximum time to wait up to in seconds. 725 * @return StatusCode of the set command 726 */ 727 public StatusCode clearStickyFault_BootIntoMotion(double timeoutSeconds) { 728 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootIntoMotion.value, 0); 729 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 730 } 731 732 /** 733 * Clear sticky fault: Motion stack data acquisition was slower than 734 * expected 735 * <p> 736 * This will wait up to {@link #DefaultTimeoutSeconds}. 737 * <p> 738 * This is available in the configurator in case the user wants 739 * to initialize their device entirely without passing a device 740 * reference down to the code that performs the initialization. 741 * In this case, the user passes down the configurator object 742 * and performs all the initialization code on the object. 743 * 744 * @return StatusCode of the set command 745 */ 746 public StatusCode clearStickyFault_DataAcquiredLate() { 747 return clearStickyFault_DataAcquiredLate(DefaultTimeoutSeconds); 748 } 749 /** 750 * Clear sticky fault: Motion stack data acquisition was slower than 751 * expected 752 * <p> 753 * This is available in the configurator in case the user wants 754 * to initialize their device entirely without passing a device 755 * reference down to the code that performs the initialization. 756 * In this case, the user passes down the configurator object 757 * and performs all the initialization code on the object. 758 * 759 * @param timeoutSeconds Maximum time to wait up to in seconds. 760 * @return StatusCode of the set command 761 */ 762 public StatusCode clearStickyFault_DataAcquiredLate(double timeoutSeconds) { 763 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_DataAcquiredLate.value, 0); 764 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 765 } 766 767 /** 768 * Clear sticky fault: Motion stack loop time was slower than 769 * expected. 770 * <p> 771 * This will wait up to {@link #DefaultTimeoutSeconds}. 772 * <p> 773 * This is available in the configurator in case the user wants 774 * to initialize their device entirely without passing a device 775 * reference down to the code that performs the initialization. 776 * In this case, the user passes down the configurator object 777 * and performs all the initialization code on the object. 778 * 779 * @return StatusCode of the set command 780 */ 781 public StatusCode clearStickyFault_LoopTimeSlow() { 782 return clearStickyFault_LoopTimeSlow(DefaultTimeoutSeconds); 783 } 784 /** 785 * Clear sticky fault: Motion stack loop time was slower than 786 * expected. 787 * <p> 788 * This is available in the configurator in case the user wants 789 * to initialize their device entirely without passing a device 790 * reference down to the code that performs the initialization. 791 * In this case, the user passes down the configurator object 792 * and performs all the initialization code on the object. 793 * 794 * @param timeoutSeconds Maximum time to wait up to in seconds. 795 * @return StatusCode of the set command 796 */ 797 public StatusCode clearStickyFault_LoopTimeSlow(double timeoutSeconds) { 798 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_LoopTimeSlow.value, 0); 799 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 800 } 801 802 /** 803 * Clear sticky fault: Magnetometer values are saturated 804 * <p> 805 * This will wait up to {@link #DefaultTimeoutSeconds}. 806 * <p> 807 * This is available in the configurator in case the user wants 808 * to initialize their device entirely without passing a device 809 * reference down to the code that performs the initialization. 810 * In this case, the user passes down the configurator object 811 * and performs all the initialization code on the object. 812 * 813 * @return StatusCode of the set command 814 */ 815 public StatusCode clearStickyFault_SaturatedMagnetometer() { 816 return clearStickyFault_SaturatedMagnetometer(DefaultTimeoutSeconds); 817 } 818 /** 819 * Clear sticky fault: Magnetometer values are saturated 820 * <p> 821 * This is available in the configurator in case the user wants 822 * to initialize their device entirely without passing a device 823 * reference down to the code that performs the initialization. 824 * In this case, the user passes down the configurator object 825 * and performs all the initialization code on the object. 826 * 827 * @param timeoutSeconds Maximum time to wait up to in seconds. 828 * @return StatusCode of the set command 829 */ 830 public StatusCode clearStickyFault_SaturatedMagnetometer(double timeoutSeconds) { 831 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_SaturatedMagne.value, 0); 832 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 833 } 834 835 /** 836 * Clear sticky fault: Accelerometer values are saturated 837 * <p> 838 * This will wait up to {@link #DefaultTimeoutSeconds}. 839 * <p> 840 * This is available in the configurator in case the user wants 841 * to initialize their device entirely without passing a device 842 * reference down to the code that performs the initialization. 843 * In this case, the user passes down the configurator object 844 * and performs all the initialization code on the object. 845 * 846 * @return StatusCode of the set command 847 */ 848 public StatusCode clearStickyFault_SaturatedAccelerometer() { 849 return clearStickyFault_SaturatedAccelerometer(DefaultTimeoutSeconds); 850 } 851 /** 852 * Clear sticky fault: Accelerometer values are saturated 853 * <p> 854 * This is available in the configurator in case the user wants 855 * to initialize their device entirely without passing a device 856 * reference down to the code that performs the initialization. 857 * In this case, the user passes down the configurator object 858 * and performs all the initialization code on the object. 859 * 860 * @param timeoutSeconds Maximum time to wait up to in seconds. 861 * @return StatusCode of the set command 862 */ 863 public StatusCode clearStickyFault_SaturatedAccelerometer(double timeoutSeconds) { 864 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_SaturatedAccel.value, 0); 865 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 866 } 867 868 /** 869 * Clear sticky fault: Gyroscope values are saturated 870 * <p> 871 * This will wait up to {@link #DefaultTimeoutSeconds}. 872 * <p> 873 * This is available in the configurator in case the user wants 874 * to initialize their device entirely without passing a device 875 * reference down to the code that performs the initialization. 876 * In this case, the user passes down the configurator object 877 * and performs all the initialization code on the object. 878 * 879 * @return StatusCode of the set command 880 */ 881 public StatusCode clearStickyFault_SaturatedGyroscope() { 882 return clearStickyFault_SaturatedGyroscope(DefaultTimeoutSeconds); 883 } 884 /** 885 * Clear sticky fault: Gyroscope values are saturated 886 * <p> 887 * This is available in the configurator in case the user wants 888 * to initialize their device entirely without passing a device 889 * reference down to the code that performs the initialization. 890 * In this case, the user passes down the configurator object 891 * and performs all the initialization code on the object. 892 * 893 * @param timeoutSeconds Maximum time to wait up to in seconds. 894 * @return StatusCode of the set command 895 */ 896 public StatusCode clearStickyFault_SaturatedGyroscope(double timeoutSeconds) { 897 String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_SaturatedGyros.value, 0); 898 return setConfigsPrivate(serialized, timeoutSeconds, false, true); 899 } 900}