@@ -116,7 +116,7 @@ void procMsg(AsyncWebSocketClient *client, size_t sz)
116116 time (& now );
117117 pwofftime = now + 60 * val ;
118118#if defined(DISP )
119- if (dispmode == DSP_CLOCK )
119+ if (dispmode == DSP_CLOCK )
120120 {
121121 changeDispMode (DSP_PWOFF );
122122 }
@@ -128,8 +128,8 @@ void procMsg(AsyncWebSocketClient *client, size_t sz)
128128 pwoffminutes = config -> dasd ;
129129 ESP_LOGW (WSTAG , "Automatic shutdown mode canceled !" );
130130#if defined(DISP )
131- dispmode = DSP_OTHER ;
132- changeDispMode (DSP_CLOCK );
131+ dispmode = DSP_OTHER ;
132+ changeDispMode (DSP_CLOCK );
133133#endif
134134 }
135135 }
@@ -181,25 +181,14 @@ void procMsg(AsyncWebSocketClient *client, size_t sz)
181181 configFile .close ();
182182 }
183183 }
184- #if defined(SDCARD )
185- else if (strcmp (command , "sdplayer ") == 0 )
186- {
187- if (SD_okay )
188- {
189- if (pmode != PM_SDCARD )
190- {
191- oldsdix_req = true;
192- }
193- else
194- {
195- updateTrack (0 );
196- }
197- }
198- else
184+ else if (strcmp (command , "steppreset" ) == 0 )
199185 {
200- sendRadio ();
186+ #if defined(DISP )
187+ changeDispMode (DSP_RADIO );
188+ #endif
189+ int8_t val = root ["val" ];
190+ updatePreset (val , true);
201191 }
202- }
203192 else if (strcmp (command , "preset" ) == 0 )
204193 {
205194#if defined(DISP )
@@ -208,13 +197,24 @@ void procMsg(AsyncWebSocketClient *client, size_t sz)
208197 uint16_t prst = root ["preset" ];
209198 setPreset (prst - 1 );
210199 }
211- else if (strcmp (command , "steppreset ") == 0 )
200+ #if defined(SDCARD )
201+ else if (strcmp (command , "sdplayer ") == 0 )
212202 {
213- #if defined(DISP )
214- changeDispMode (DSP_RADIO );
215- #endif
216- int8_t val = root ["val" ];
217- updatePreset (val , true);
203+ if (SD_okay )
204+ {
205+ if (pmode != PM_SDCARD )
206+ {
207+ oldsdix_req = true;
208+ }
209+ else
210+ {
211+ updateTrack (0 );
212+ }
213+ }
214+ else
215+ {
216+ sendRadio ();
217+ }
218218 }
219219 else if (strcmp (command , "steptrack ") == 0 )
220220 {
@@ -274,7 +274,7 @@ void procMsg(AsyncWebSocketClient *client, size_t sz)
274274 sendSDstat (0 );
275275#if defined(DISP )
276276 prgrssbar (0 , false);
277- // prgrssbar(0, true);
277+ // prgrssbar(0, true);
278278#endif
279279 }
280280 else if (strcmp (command , "track ") == 0 )
@@ -336,7 +336,7 @@ void onWsEvent(AsyncWebSocket *server_, AsyncWebSocketClient *client, AwsEventTy
336336 }
337337 else
338338 {
339- // message is comprised of multiple frames or the frame is split into multiple packets
339+ // message is comprised of multiple frames or the frame is split into multiple packets
340340 if (index == 0 )
341341 {
342342 if (info -> num == 0 && client -> _tempObject == NULL )
0 commit comments