mi mi / Mbed 2 deprecated wave_player_super_lite

Dependencies:   mbed DirectSPI FastPWM

Files at this revision

API Documentation at this revision

Comitter:
mimi3
Date:
Fri Oct 09 07:47:36 2020 +0900
Parent:
20:c7066a530b1f
Commit message:
trivial change

Changed in this revision

wave_player_main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c7066a530b1f -r dc161a192ba7 wave_player_main.cpp
--- a/wave_player_main.cpp	Fri Oct 09 07:38:47 2020 +0900
+++ b/wave_player_main.cpp	Fri Oct 09 07:47:36 2020 +0900
@@ -144,7 +144,7 @@
     #endif
 
     sbit btn_pause_prev = false;
-    #define fbtn_next_song_on  btn_short_on
+    #define fbtn_next_song_on btn_short_on
     #define btn_pause_on      btn_long_on
     #define btn_power_off_on  btn_long_on2
 
@@ -164,6 +164,7 @@
         //; wait 10msec Ticker flag
         while ( !isTickTimer_IF() ) {
             if( ldwSongFileSectors == 0 ){  //; found end of file
+                fbtn_next_song_on = true;
                  break;                     //promptly exit and prepare next song
             }
             #if HAVE_LED_IND_PWM
@@ -184,7 +185,7 @@
         /*-------------------
          Next song and start
         -------------------*/
-        if ( ( ldwSongFileSectors == 0 ) | fbtn_next_song_on ){
+        if ( fbtn_next_song_on ){
             pwm_period_timer_music_stop();
             fbtn_next_song_on = false;
             sd_stop_read();
@@ -288,9 +289,9 @@
             -------------------*/
             if( fbtn_next_song_on){
                 if( !fPlaying){ //          ; if during pause
-                    fPlaying         = true ; //release pause
+                    fPlaying          = true ; //release pause
                     fbtn_next_song_on = false;
-                    btn_pause_on     = false;
+                    btn_pause_on      = false;
                     pwm_period_timer_music_start();
                 }
             }