Skip to content

Commit cea6112

Browse files
committed
Cleanup
1 parent 71c489e commit cea6112

File tree

6 files changed

+9
-20
lines changed

6 files changed

+9
-20
lines changed

src/ArdBtSource.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ int32_t get_stk_data(uint8_t *data, int32_t len) {
6767

6868
if (logTime < millis()){
6969
logTime = millis()+5000;
70-
ESP_LOGD(APP_ArdBtSource, "Playing %s sound!", hasSoundData ? "" : "no" );
7170
hasSoundData = false;
7271
}
7372

src/ArdConfig.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define __RTOS__ // supports Free RTOS
2121
#define __LWIP__ // use lwip socket implementation
2222
#define TASK_STACK_SIZE configMINIMAL_STACK_SIZE
23+
#define RAWWAVE_PATH "/sdcard/rawwaves/"
2324

2425
// Uncomment after installing https://github.com/pschatzmann/ESP32-A2DP
2526
// #define __BT_A2DP__ // output to A2DP sink
@@ -31,6 +32,7 @@
3132
#define __NO_EXCEPTIONS__ // comment out exceptions
3233
#define __NO_FSTREAM__ // No Messanger, MidiFileIn and Skini and FileRead
3334
#define __NO_RT__ // no STK RT functions
35+
#define RAWWAVE_PATH "/sdcard/rawwaves/"
3436

3537
#include "FS.h"
3638
#undef round
@@ -42,11 +44,7 @@
4244
#define __NO_EXCEPTIONS__ // comment out exceptions
4345
#define __NO_FSTREAM__ // No Messanger, MidiFileIn and Skini and FileRead
4446
#define __NO_RT__ // no STK RT functions
45-
46-
// Logging support
47-
#define STK_ERROR_MSG_LEN 200
48-
extern char stk_error_msg[STK_ERROR_MSG_LEN];
49-
#define ESP_LOGD(APP,...) { snprintf(stk_error_msg, STK_ERROR_MSG_LEN, __VA_ARGS__); Serial.println(stk_error_msg); }
47+
#define RAWWAVE_PATH "/rawwaves/"
5048

5149
#elif defined(IS_DESKTOP)
5250
// #define __MIDI__ // support Midi
@@ -56,11 +54,6 @@
5654
// #define __NO_FSTREAM__ // No Messanger, MidiFileIn and Skini and FileRead
5755
// #define __NO_RT__ // no STK RT functions
5856

59-
// Logging support
60-
#define STK_ERROR_MSG_LEN 200
61-
extern char stk_error_msg[STK_ERROR_MSG_LEN];
62-
#define ESP_LOGD(APP,...) { snprintf(stk_error_msg, STK_ERROR_MSG_LEN, __VA_ARGS__); Serial.println(stk_error_msg); }
63-
6457
#endif
6558

6659
// rtos must be loaded on top of other classes - so we add it here

src/ArdUdp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

2+
#include <ArdStkLogger.h>
23
#include <ArdUdp.h>
4+
35
#ifdef ARDUPD_H
46

57
namespace stk {
@@ -29,11 +31,11 @@ size_t ArdUdp :: write(const uint8_t * buffer, size_t size ) {
2931
result = WiFiUDP::write(buffer, size);
3032
if (result>0){
3133
bool packetOk = this->endPacket();
32-
ESP_LOGD(APP_ArdUdp, "x%x, Number of bytes have %s been sent out: %d ", __func__, packetOk?"":"not", result);
34+
STK_LOGD("x%x, Number of bytes have %s been sent out: %d ", __func__, packetOk?"":"not", result);
3335
}
3436
//this->flush();
3537
} else {
36-
ESP_LOGD(APP_ArdUdp, "x%x, beginPacked has failed ", __func__);
38+
STK_LOGD("x%x, beginPacked has failed ", __func__);
3739
this->isValidHostFlag = false;
3840
}
3941
return result;

src/MemoryFS.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ void MemoryFS :: close(){
7474

7575

7676
bool MemoryFS :: fileRead( StkFrames& frames, unsigned long startFrame, bool doNormalize ){
77-
//ESP_LOGD(APP_VFS, "x%x, %s: reading %d from start %ld of %ld", __func__, p_fd->name, frames.size(), startFrame, this->getSize());
78-
7977
// data is available as array of uint16_t
8078
bool is_finished = false;
8179

src/Stk.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -578,11 +578,7 @@ const unsigned int RT_BUFFER_SIZE = 512;
578578
// move the rawwaves directory to a different location in your file
579579
// system, you will need to set this path definition appropriately.
580580
#if !defined(RAWWAVE_PATH)
581-
# ifdef ESP32
582-
# define RAWWAVE_PATH "/sdcard/rawwaves/"
583-
# else
584-
# define RAWWAVE_PATH "../../rawwaves/"
585-
# endif
581+
# define RAWWAVE_PATH "../../rawwaves/"
586582
#endif
587583

588584
const StkFloat STK_PI = 3.14159265358979;

src/StkAll.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
#include "WvIn.h"
9898
#include "WvOut.h"
9999
#ifdef ARDUINO
100+
#include "ArdStkLogger.h"
100101
#include "ArdBtSource.h"
101102
#include "ArdCommonOut.h"
102103
#include "ArdConfig.h"

0 commit comments

Comments
 (0)