File tree 1 file changed +27
-5
lines changed
examples/Example8_SetConstellations
1 file changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,33 @@ void setup()
58
58
59
59
// We can batch commands together and check the overall success
60
60
bool response = true ;
61
- response &= myGNSS.enableConstellation (" BDS" );
62
- response &= myGNSS.enableConstellation (" GAL" );
63
- response &= myGNSS.disableConstellation (" GLO" );
64
- response &= myGNSS.enableConstellation (" QZSS" );
65
- response &= myGNSS.saveConfiguration (); // Save the current configuration into non-volatile memory (NVM)
61
+ if (!myGNSS.enableConstellation (" BDS" ))
62
+ {
63
+ response = false ;
64
+ Serial.println (" Failed to enable BDS constellation" );
65
+ }
66
+ if (!myGNSS.enableConstellation (" GAL" ))
67
+ {
68
+ response = false ;
69
+ Serial.println (" Failed to enable GAL constellation" );
70
+ }
71
+ if (!myGNSS.disableConstellation (" GLO" ))
72
+ {
73
+ response = false ;
74
+ Serial.println (" Failed to disable GLO constellation" );
75
+ }
76
+ if (!myGNSS.enableConstellation (" QZSS" ))
77
+ {
78
+ response = false ;
79
+ Serial.println (" Failed to enable QZSS constellation" );
80
+ }
81
+
82
+ // Save the current configuration into non-volatile memory (NVM)
83
+ if (!myGNSS.saveConfiguration ())
84
+ {
85
+ response = false ;
86
+ Serial.println (" Failed to save the configuration" );
87
+ }
66
88
67
89
if (response == true )
68
90
Serial.println (" Configuration complete!" );
You can’t perform that action at this time.
0 commit comments