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.*;
013
014/**
015 * Class description for the Pigeon 2 IMU sensor that measures orientation.
016 *
017 * This handles the configurations for the {@link com.ctre.phoenix6.hardware.Pigeon2}
018 */
019public class Pigeon2Configurator extends ParentConfigurator
020{
021    public Pigeon2Configurator (DeviceIdentifier id)
022    {
023        super(id);
024    }
025
026    /**
027     * Refreshes the values of the specified config group.
028     * <p>
029     * This will wait up to {@link #DefaultTimeoutSeconds}.
030     * <p>
031     * Call to refresh the selected configs from the device.
032     *
033     * @param configs The configs to refresh
034     * @return StatusCode of refreshing the configs
035     */
036    public StatusCode refresh(Pigeon2Configuration configs)
037    {
038        return refresh(configs, DefaultTimeoutSeconds);
039    }
040
041    /**
042     * Refreshes the values of the specified config group.
043     * <p>
044     * Call to refresh the selected configs from the device.
045     *
046     * @param configs The configs to refresh
047     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
048     * @return StatusCode of refreshing the configs
049     */
050    public StatusCode refresh(Pigeon2Configuration configs, double timeoutSeconds)
051    {
052        StringBuilder serializedString = new StringBuilder();
053        StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds);
054        if (err == StatusCode.OK) {
055            /* Only deserialize if we successfully got configs */
056            configs.deserialize(serializedString.toString());
057        }
058        return err;
059    }
060
061    /**
062     * Applies the contents of the specified config to the device.
063     * <p>
064     * This will wait up to {@link #DefaultTimeoutSeconds}.
065     * <p>
066     * Call to apply the selected configs.
067     *
068     * @param configs Configs to apply against.
069     * @return StatusCode of the set command
070     */
071    public StatusCode apply(Pigeon2Configuration configs)
072    {
073        return apply(configs, DefaultTimeoutSeconds);
074    }
075
076    /**
077     * Applies the contents of the specified config to the device.
078     * <p>
079     * Call to apply the selected configs.
080     *
081     * @param configs Configs to apply against.
082     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
083     * @return StatusCode of the set command
084     */
085    public StatusCode apply(Pigeon2Configuration configs, double timeoutSeconds)
086    {
087        return setConfigsPrivate(configs.serialize(), timeoutSeconds, configs.FutureProofConfigs, false);
088    }
089
090
091    /**
092     * Refreshes the values of the specified config group.
093     * <p>
094     * This will wait up to {@link #DefaultTimeoutSeconds}.
095     * <p>
096     * Call to refresh the selected configs from the device.
097     *
098     * @param configs The configs to refresh
099     * @return StatusCode of refreshing the configs
100     */
101    public StatusCode refresh(MountPoseConfigs configs)
102    {
103        return refresh(configs, DefaultTimeoutSeconds);
104    }
105
106    /**
107     * Refreshes the values of the specified config group.
108     * <p>
109     * Call to refresh the selected configs from the device.
110     *
111     * @param configs The configs to refresh
112     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
113     * @return StatusCode of refreshing the configs
114     */
115    public StatusCode refresh(MountPoseConfigs configs, double timeoutSeconds)
116    {
117        StringBuilder serializedString = new StringBuilder();
118        StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds);
119        if (err == StatusCode.OK) {
120            /* Only deserialize if we successfully got configs */
121            configs.deserialize(serializedString.toString());
122        }
123        return err;
124    }
125
126    /**
127     * Applies the contents of the specified config to the device.
128     * <p>
129     * This will wait up to {@link #DefaultTimeoutSeconds}.
130     * <p>
131     * Call to apply the selected configs.
132     *
133     * @param configs Configs to apply against.
134     * @return StatusCode of the set command
135     */
136    public StatusCode apply(MountPoseConfigs configs)
137    {
138        return apply(configs, DefaultTimeoutSeconds);
139    }
140
141    /**
142     * Applies the contents of the specified config to the device.
143     * <p>
144     * Call to apply the selected configs.
145     *
146     * @param configs Configs to apply against.
147     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
148     * @return StatusCode of the set command
149     */
150    public StatusCode apply(MountPoseConfigs configs, double timeoutSeconds)
151    {
152        return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false);
153    }
154
155
156    /**
157     * Refreshes the values of the specified config group.
158     * <p>
159     * This will wait up to {@link #DefaultTimeoutSeconds}.
160     * <p>
161     * Call to refresh the selected configs from the device.
162     *
163     * @param configs The configs to refresh
164     * @return StatusCode of refreshing the configs
165     */
166    public StatusCode refresh(GyroTrimConfigs configs)
167    {
168        return refresh(configs, DefaultTimeoutSeconds);
169    }
170
171    /**
172     * Refreshes the values of the specified config group.
173     * <p>
174     * Call to refresh the selected configs from the device.
175     *
176     * @param configs The configs to refresh
177     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
178     * @return StatusCode of refreshing the configs
179     */
180    public StatusCode refresh(GyroTrimConfigs configs, double timeoutSeconds)
181    {
182        StringBuilder serializedString = new StringBuilder();
183        StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds);
184        if (err == StatusCode.OK) {
185            /* Only deserialize if we successfully got configs */
186            configs.deserialize(serializedString.toString());
187        }
188        return err;
189    }
190
191    /**
192     * Applies the contents of the specified config to the device.
193     * <p>
194     * This will wait up to {@link #DefaultTimeoutSeconds}.
195     * <p>
196     * Call to apply the selected configs.
197     *
198     * @param configs Configs to apply against.
199     * @return StatusCode of the set command
200     */
201    public StatusCode apply(GyroTrimConfigs configs)
202    {
203        return apply(configs, DefaultTimeoutSeconds);
204    }
205
206    /**
207     * Applies the contents of the specified config to the device.
208     * <p>
209     * Call to apply the selected configs.
210     *
211     * @param configs Configs to apply against.
212     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
213     * @return StatusCode of the set command
214     */
215    public StatusCode apply(GyroTrimConfigs configs, double timeoutSeconds)
216    {
217        return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false);
218    }
219
220
221    /**
222     * Refreshes the values of the specified config group.
223     * <p>
224     * This will wait up to {@link #DefaultTimeoutSeconds}.
225     * <p>
226     * Call to refresh the selected configs from the device.
227     *
228     * @param configs The configs to refresh
229     * @return StatusCode of refreshing the configs
230     */
231    public StatusCode refresh(Pigeon2FeaturesConfigs configs)
232    {
233        return refresh(configs, DefaultTimeoutSeconds);
234    }
235
236    /**
237     * Refreshes the values of the specified config group.
238     * <p>
239     * Call to refresh the selected configs from the device.
240     *
241     * @param configs The configs to refresh
242     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
243     * @return StatusCode of refreshing the configs
244     */
245    public StatusCode refresh(Pigeon2FeaturesConfigs configs, double timeoutSeconds)
246    {
247        StringBuilder serializedString = new StringBuilder();
248        StatusCode err = getConfigsPrivate(serializedString, timeoutSeconds);
249        if (err == StatusCode.OK) {
250            /* Only deserialize if we successfully got configs */
251            configs.deserialize(serializedString.toString());
252        }
253        return err;
254    }
255
256    /**
257     * Applies the contents of the specified config to the device.
258     * <p>
259     * This will wait up to {@link #DefaultTimeoutSeconds}.
260     * <p>
261     * Call to apply the selected configs.
262     *
263     * @param configs Configs to apply against.
264     * @return StatusCode of the set command
265     */
266    public StatusCode apply(Pigeon2FeaturesConfigs configs)
267    {
268        return apply(configs, DefaultTimeoutSeconds);
269    }
270
271    /**
272     * Applies the contents of the specified config to the device.
273     * <p>
274     * Call to apply the selected configs.
275     *
276     * @param configs Configs to apply against.
277     * @param timeoutSeconds Maximum amount of time to wait when performing configuration
278     * @return StatusCode of the set command
279     */
280    public StatusCode apply(Pigeon2FeaturesConfigs configs, double timeoutSeconds)
281    {
282        return setConfigsPrivate(configs.serialize(), timeoutSeconds, false, false);
283    }
284
285    
286    /**
287     * The yaw to set the Pigeon2 to right now.
288     * <p>
289     * This will wait up to {@link #DefaultTimeoutSeconds}.
290     * <p>
291     * This is available in the configurator in case the user wants
292     * to initialize their device entirely without passing a device
293     * reference down to the code that performs the initialization.
294     * In this case, the user passes down the configurator object
295     * and performs all the initialization code on the object.
296     * 
297     * @param newValue Value to set to. Units are in deg.
298     * @return StatusCode of the set command
299     */
300    public StatusCode setYaw(double newValue) {
301        return setYaw(newValue, DefaultTimeoutSeconds);
302    }
303    /**
304     * The yaw to set the Pigeon2 to right now.
305     * <p>
306     * This is available in the configurator in case the user wants
307     * to initialize their device entirely without passing a device
308     * reference down to the code that performs the initialization.
309     * In this case, the user passes down the configurator object
310     * and performs all the initialization code on the object.
311     * 
312     * @param newValue Value to set to. Units are in deg.
313     * @param timeoutSeconds Maximum time to wait up to in seconds.
314     * @return StatusCode of the set command
315     */
316    public StatusCode setYaw(double newValue, double timeoutSeconds) {
317        String serialized = ConfigJNI.Serializedouble(SpnValue.Pigeon2_SetYaw.value, newValue);
318        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
319    }
320    
321    /**
322     * Clear the sticky faults in the device.
323     * <p>
324     * This typically has no impact on the device functionality.  Instead,
325     * it just clears telemetry faults that are accessible via API and
326     * Tuner Self-Test.
327     * <p>
328     * This will wait up to {@link #DefaultTimeoutSeconds}.
329     * <p>
330     * This is available in the configurator in case the user wants
331     * to initialize their device entirely without passing a device
332     * reference down to the code that performs the initialization.
333     * In this case, the user passes down the configurator object
334     * and performs all the initialization code on the object.
335     * 
336     * @return StatusCode of the set command
337     */
338    public StatusCode clearStickyFaults() {
339        return clearStickyFaults(DefaultTimeoutSeconds);
340    }
341    /**
342     * Clear the sticky faults in the device.
343     * <p>
344     * This typically has no impact on the device functionality.  Instead,
345     * it just clears telemetry faults that are accessible via API and
346     * Tuner Self-Test.
347     * <p>
348     * This is available in the configurator in case the user wants
349     * to initialize their device entirely without passing a device
350     * reference down to the code that performs the initialization.
351     * In this case, the user passes down the configurator object
352     * and performs all the initialization code on the object.
353     * 
354     * @param timeoutSeconds Maximum time to wait up to in seconds.
355     * @return StatusCode of the set command
356     */
357    public StatusCode clearStickyFaults(double timeoutSeconds) {
358        String serialized = ConfigJNI.Serializedouble(SpnValue.SPN_ClearStickyFaults.value, 0);
359        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
360    }
361    
362    /**
363     * Clear sticky fault: Hardware fault occurred
364     * <p>
365     * This will wait up to {@link #DefaultTimeoutSeconds}.
366     * <p>
367     * This is available in the configurator in case the user wants
368     * to initialize their device entirely without passing a device
369     * reference down to the code that performs the initialization.
370     * In this case, the user passes down the configurator object
371     * and performs all the initialization code on the object.
372     * 
373     * @return StatusCode of the set command
374     */
375    public StatusCode clearStickyFault_Hardware() {
376        return clearStickyFault_Hardware(DefaultTimeoutSeconds);
377    }
378    /**
379     * Clear sticky fault: Hardware fault occurred
380     * <p>
381     * This is available in the configurator in case the user wants
382     * to initialize their device entirely without passing a device
383     * reference down to the code that performs the initialization.
384     * In this case, the user passes down the configurator object
385     * and performs all the initialization code on the object.
386     * 
387     * @param timeoutSeconds Maximum time to wait up to in seconds.
388     * @return StatusCode of the set command
389     */
390    public StatusCode clearStickyFault_Hardware(double timeoutSeconds) {
391        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_Hardware.value, 0);
392        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
393    }
394    
395    /**
396     * Clear sticky fault: Device supply voltage dropped to near brownout
397     * levels
398     * <p>
399     * This will wait up to {@link #DefaultTimeoutSeconds}.
400     * <p>
401     * This is available in the configurator in case the user wants
402     * to initialize their device entirely without passing a device
403     * reference down to the code that performs the initialization.
404     * In this case, the user passes down the configurator object
405     * and performs all the initialization code on the object.
406     * 
407     * @return StatusCode of the set command
408     */
409    public StatusCode clearStickyFault_Undervoltage() {
410        return clearStickyFault_Undervoltage(DefaultTimeoutSeconds);
411    }
412    /**
413     * Clear sticky fault: Device supply voltage dropped to near brownout
414     * levels
415     * <p>
416     * This is available in the configurator in case the user wants
417     * to initialize their device entirely without passing a device
418     * reference down to the code that performs the initialization.
419     * In this case, the user passes down the configurator object
420     * and performs all the initialization code on the object.
421     * 
422     * @param timeoutSeconds Maximum time to wait up to in seconds.
423     * @return StatusCode of the set command
424     */
425    public StatusCode clearStickyFault_Undervoltage(double timeoutSeconds) {
426        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_Undervoltage.value, 0);
427        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
428    }
429    
430    /**
431     * Clear sticky fault: Device boot while detecting the enable signal
432     * <p>
433     * This will wait up to {@link #DefaultTimeoutSeconds}.
434     * <p>
435     * This is available in the configurator in case the user wants
436     * to initialize their device entirely without passing a device
437     * reference down to the code that performs the initialization.
438     * In this case, the user passes down the configurator object
439     * and performs all the initialization code on the object.
440     * 
441     * @return StatusCode of the set command
442     */
443    public StatusCode clearStickyFault_BootDuringEnable() {
444        return clearStickyFault_BootDuringEnable(DefaultTimeoutSeconds);
445    }
446    /**
447     * Clear sticky fault: Device boot while detecting the enable signal
448     * <p>
449     * This is available in the configurator in case the user wants
450     * to initialize their device entirely without passing a device
451     * reference down to the code that performs the initialization.
452     * In this case, the user passes down the configurator object
453     * and performs all the initialization code on the object.
454     * 
455     * @param timeoutSeconds Maximum time to wait up to in seconds.
456     * @return StatusCode of the set command
457     */
458    public StatusCode clearStickyFault_BootDuringEnable(double timeoutSeconds) {
459        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_BootDuringEnable.value, 0);
460        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
461    }
462    
463    /**
464     * Clear sticky fault: Bootup checks failed: Accelerometer
465     * <p>
466     * This will wait up to {@link #DefaultTimeoutSeconds}.
467     * <p>
468     * This is available in the configurator in case the user wants
469     * to initialize their device entirely without passing a device
470     * reference down to the code that performs the initialization.
471     * In this case, the user passes down the configurator object
472     * and performs all the initialization code on the object.
473     * 
474     * @return StatusCode of the set command
475     */
476    public StatusCode clearStickyFault_BootupAccelerometer() {
477        return clearStickyFault_BootupAccelerometer(DefaultTimeoutSeconds);
478    }
479    /**
480     * Clear sticky fault: Bootup checks failed: Accelerometer
481     * <p>
482     * This is available in the configurator in case the user wants
483     * to initialize their device entirely without passing a device
484     * reference down to the code that performs the initialization.
485     * In this case, the user passes down the configurator object
486     * and performs all the initialization code on the object.
487     * 
488     * @param timeoutSeconds Maximum time to wait up to in seconds.
489     * @return StatusCode of the set command
490     */
491    public StatusCode clearStickyFault_BootupAccelerometer(double timeoutSeconds) {
492        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootupAccel.value, 0);
493        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
494    }
495    
496    /**
497     * Clear sticky fault: Bootup checks failed: Gyroscope
498     * <p>
499     * This will wait up to {@link #DefaultTimeoutSeconds}.
500     * <p>
501     * This is available in the configurator in case the user wants
502     * to initialize their device entirely without passing a device
503     * reference down to the code that performs the initialization.
504     * In this case, the user passes down the configurator object
505     * and performs all the initialization code on the object.
506     * 
507     * @return StatusCode of the set command
508     */
509    public StatusCode clearStickyFault_BootupGyroscope() {
510        return clearStickyFault_BootupGyroscope(DefaultTimeoutSeconds);
511    }
512    /**
513     * Clear sticky fault: Bootup checks failed: Gyroscope
514     * <p>
515     * This is available in the configurator in case the user wants
516     * to initialize their device entirely without passing a device
517     * reference down to the code that performs the initialization.
518     * In this case, the user passes down the configurator object
519     * and performs all the initialization code on the object.
520     * 
521     * @param timeoutSeconds Maximum time to wait up to in seconds.
522     * @return StatusCode of the set command
523     */
524    public StatusCode clearStickyFault_BootupGyroscope(double timeoutSeconds) {
525        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootupGyros.value, 0);
526        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
527    }
528    
529    /**
530     * Clear sticky fault: Bootup checks failed: Magnetometer
531     * <p>
532     * This will wait up to {@link #DefaultTimeoutSeconds}.
533     * <p>
534     * This is available in the configurator in case the user wants
535     * to initialize their device entirely without passing a device
536     * reference down to the code that performs the initialization.
537     * In this case, the user passes down the configurator object
538     * and performs all the initialization code on the object.
539     * 
540     * @return StatusCode of the set command
541     */
542    public StatusCode clearStickyFault_BootupMagnetometer() {
543        return clearStickyFault_BootupMagnetometer(DefaultTimeoutSeconds);
544    }
545    /**
546     * Clear sticky fault: Bootup checks failed: Magnetometer
547     * <p>
548     * This is available in the configurator in case the user wants
549     * to initialize their device entirely without passing a device
550     * reference down to the code that performs the initialization.
551     * In this case, the user passes down the configurator object
552     * and performs all the initialization code on the object.
553     * 
554     * @param timeoutSeconds Maximum time to wait up to in seconds.
555     * @return StatusCode of the set command
556     */
557    public StatusCode clearStickyFault_BootupMagnetometer(double timeoutSeconds) {
558        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootupMagne.value, 0);
559        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
560    }
561    
562    /**
563     * Clear sticky fault: Motion Detected during bootup.
564     * <p>
565     * This will wait up to {@link #DefaultTimeoutSeconds}.
566     * <p>
567     * This is available in the configurator in case the user wants
568     * to initialize their device entirely without passing a device
569     * reference down to the code that performs the initialization.
570     * In this case, the user passes down the configurator object
571     * and performs all the initialization code on the object.
572     * 
573     * @return StatusCode of the set command
574     */
575    public StatusCode clearStickyFault_BootIntoMotion() {
576        return clearStickyFault_BootIntoMotion(DefaultTimeoutSeconds);
577    }
578    /**
579     * Clear sticky fault: Motion Detected during bootup.
580     * <p>
581     * This is available in the configurator in case the user wants
582     * to initialize their device entirely without passing a device
583     * reference down to the code that performs the initialization.
584     * In this case, the user passes down the configurator object
585     * and performs all the initialization code on the object.
586     * 
587     * @param timeoutSeconds Maximum time to wait up to in seconds.
588     * @return StatusCode of the set command
589     */
590    public StatusCode clearStickyFault_BootIntoMotion(double timeoutSeconds) {
591        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_BootIntoMotion.value, 0);
592        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
593    }
594    
595    /**
596     * Clear sticky fault: Motion stack data acquisition was slower than
597     * expected
598     * <p>
599     * This will wait up to {@link #DefaultTimeoutSeconds}.
600     * <p>
601     * This is available in the configurator in case the user wants
602     * to initialize their device entirely without passing a device
603     * reference down to the code that performs the initialization.
604     * In this case, the user passes down the configurator object
605     * and performs all the initialization code on the object.
606     * 
607     * @return StatusCode of the set command
608     */
609    public StatusCode clearStickyFault_DataAcquiredLate() {
610        return clearStickyFault_DataAcquiredLate(DefaultTimeoutSeconds);
611    }
612    /**
613     * Clear sticky fault: Motion stack data acquisition was slower than
614     * expected
615     * <p>
616     * This is available in the configurator in case the user wants
617     * to initialize their device entirely without passing a device
618     * reference down to the code that performs the initialization.
619     * In this case, the user passes down the configurator object
620     * and performs all the initialization code on the object.
621     * 
622     * @param timeoutSeconds Maximum time to wait up to in seconds.
623     * @return StatusCode of the set command
624     */
625    public StatusCode clearStickyFault_DataAcquiredLate(double timeoutSeconds) {
626        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_DataAcquiredLate.value, 0);
627        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
628    }
629    
630    /**
631     * Clear sticky fault: Motion stack loop time was slower than
632     * expected.
633     * <p>
634     * This will wait up to {@link #DefaultTimeoutSeconds}.
635     * <p>
636     * This is available in the configurator in case the user wants
637     * to initialize their device entirely without passing a device
638     * reference down to the code that performs the initialization.
639     * In this case, the user passes down the configurator object
640     * and performs all the initialization code on the object.
641     * 
642     * @return StatusCode of the set command
643     */
644    public StatusCode clearStickyFault_LoopTimeSlow() {
645        return clearStickyFault_LoopTimeSlow(DefaultTimeoutSeconds);
646    }
647    /**
648     * Clear sticky fault: Motion stack loop time was slower than
649     * expected.
650     * <p>
651     * This is available in the configurator in case the user wants
652     * to initialize their device entirely without passing a device
653     * reference down to the code that performs the initialization.
654     * In this case, the user passes down the configurator object
655     * and performs all the initialization code on the object.
656     * 
657     * @param timeoutSeconds Maximum time to wait up to in seconds.
658     * @return StatusCode of the set command
659     */
660    public StatusCode clearStickyFault_LoopTimeSlow(double timeoutSeconds) {
661        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_LoopTimeSlow.value, 0);
662        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
663    }
664    
665    /**
666     * Clear sticky fault: Magnetometer values are saturated
667     * <p>
668     * This will wait up to {@link #DefaultTimeoutSeconds}.
669     * <p>
670     * This is available in the configurator in case the user wants
671     * to initialize their device entirely without passing a device
672     * reference down to the code that performs the initialization.
673     * In this case, the user passes down the configurator object
674     * and performs all the initialization code on the object.
675     * 
676     * @return StatusCode of the set command
677     */
678    public StatusCode clearStickyFault_SaturatedMagnetometer() {
679        return clearStickyFault_SaturatedMagnetometer(DefaultTimeoutSeconds);
680    }
681    /**
682     * Clear sticky fault: Magnetometer values are saturated
683     * <p>
684     * This is available in the configurator in case the user wants
685     * to initialize their device entirely without passing a device
686     * reference down to the code that performs the initialization.
687     * In this case, the user passes down the configurator object
688     * and performs all the initialization code on the object.
689     * 
690     * @param timeoutSeconds Maximum time to wait up to in seconds.
691     * @return StatusCode of the set command
692     */
693    public StatusCode clearStickyFault_SaturatedMagnetometer(double timeoutSeconds) {
694        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_SaturatedMagne.value, 0);
695        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
696    }
697    
698    /**
699     * Clear sticky fault: Accelerometer values are saturated
700     * <p>
701     * This will wait up to {@link #DefaultTimeoutSeconds}.
702     * <p>
703     * This is available in the configurator in case the user wants
704     * to initialize their device entirely without passing a device
705     * reference down to the code that performs the initialization.
706     * In this case, the user passes down the configurator object
707     * and performs all the initialization code on the object.
708     * 
709     * @return StatusCode of the set command
710     */
711    public StatusCode clearStickyFault_SaturatedAccelerometer() {
712        return clearStickyFault_SaturatedAccelerometer(DefaultTimeoutSeconds);
713    }
714    /**
715     * Clear sticky fault: Accelerometer values are saturated
716     * <p>
717     * This is available in the configurator in case the user wants
718     * to initialize their device entirely without passing a device
719     * reference down to the code that performs the initialization.
720     * In this case, the user passes down the configurator object
721     * and performs all the initialization code on the object.
722     * 
723     * @param timeoutSeconds Maximum time to wait up to in seconds.
724     * @return StatusCode of the set command
725     */
726    public StatusCode clearStickyFault_SaturatedAccelerometer(double timeoutSeconds) {
727        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_SaturatedAccel.value, 0);
728        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
729    }
730    
731    /**
732     * Clear sticky fault: Gyroscope values are saturated
733     * <p>
734     * This will wait up to {@link #DefaultTimeoutSeconds}.
735     * <p>
736     * This is available in the configurator in case the user wants
737     * to initialize their device entirely without passing a device
738     * reference down to the code that performs the initialization.
739     * In this case, the user passes down the configurator object
740     * and performs all the initialization code on the object.
741     * 
742     * @return StatusCode of the set command
743     */
744    public StatusCode clearStickyFault_SaturatedGyroscope() {
745        return clearStickyFault_SaturatedGyroscope(DefaultTimeoutSeconds);
746    }
747    /**
748     * Clear sticky fault: Gyroscope values are saturated
749     * <p>
750     * This is available in the configurator in case the user wants
751     * to initialize their device entirely without passing a device
752     * reference down to the code that performs the initialization.
753     * In this case, the user passes down the configurator object
754     * and performs all the initialization code on the object.
755     * 
756     * @param timeoutSeconds Maximum time to wait up to in seconds.
757     * @return StatusCode of the set command
758     */
759    public StatusCode clearStickyFault_SaturatedGyroscope(double timeoutSeconds) {
760        String serialized = ConfigJNI.Serializedouble(SpnValue.ClearStickyFault_PIGEON2_SaturatedGyros.value, 0);
761        return setConfigsPrivate(serialized, timeoutSeconds, false, true);
762    }
763}