Skip to content

Commit

Permalink
esplay board correction. Click removed for vs1053
Browse files Browse the repository at this point in the history
  • Loading branch information
karawin committed Feb 27, 2021
1 parent deca5d5 commit 55e9325
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
Binary file modified binaries/KaRadio32.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion main/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ void initButtonDevices()
//1:start 2:select 3:up 4:down 5:left 6:right 7:a 8:b
isEsplay = true;
expButton0 = ClickexpButtonsInit(1,6,5,0);
expButton1 = ClickexpButtonsInit(0,3,4,0);
expButton1 = ClickexpButtonsInit((int8_t) GPIO_NONE,3,4,0);
expButton2 = ClickexpButtonsInit(2,7,8,0);
}
}
Expand Down
8 changes: 3 additions & 5 deletions main/vs1053.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
#include "app_main.h"
#include "audio_player.h"
#include "spiram_fifo.h"
//#include "common_buffer.h"

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
//#include "freertos/event_groups.h"
//#include "freertos\queue.h"

extern void LoadUserCodes(void);

Expand Down Expand Up @@ -663,8 +661,8 @@ void vsTask(void *pvParams) {
// stop requested, terminate immediately
if(player->decoder_command == CMD_STOP) {
break;
}
//size = bufferRead(b, VSTASKBUF);
}

unsigned fsize = spiRamFifoFill();
size = min(VSTASKBUF, fsize);
/* if (size > VSTASKBUF)
Expand Down
11 changes: 6 additions & 5 deletions main/webclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ void clientReceiveCallback(int sockfd, char *pdata, int len)
extern bool ledPolarity;
static int metad ;
static int rest ;
static uint16_t dloop;
static IRAM_ATTR uint32_t chunked;
static IRAM_ATTR uint32_t cchunk;
static char* metadata = NULL;
Expand Down Expand Up @@ -1266,17 +1267,17 @@ ESP_LOGD(TAG,"mt2 len:%d, clen:%d, metad:%d, l:%d, inpdata:%x, rest:%d",len,cle
}
}
// ---------------
if (!playing )

if ((!playing ) && (((++dloop) % 40)==0))
{
kprintf(CLIPLAY,0x0d,0x0a);
playing=1;
setVolumei(getVolume());
if (get_player_status()!= RUNNING) return; // not started. filling the buffer
if (!ledStatus){
if (getLedGpio() != GPIO_NONE) gpio_set_level(getLedGpio(), ledPolarity ? 0 : 1);
}
}
setVolumei(getVolume());
}
}
} // switch
}


Expand Down

0 comments on commit 55e9325

Please sign in to comment.