File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 5
5
#include " AudioTools/AudioLogger.h"
6
6
#include " AudioTools/AudioOutput.h"
7
7
#include " AudioTools/Buffers.h"
8
+ #include " vector"
8
9
9
10
namespace audio_tools {
10
11
@@ -16,8 +17,8 @@ namespace audio_tools {
16
17
17
18
class R2RConfig : public AudioInfo {
18
19
public:
19
- Vector <int > channel1_pins{ 0 } ;
20
- Vector <int > channel2_pins{ 0 } ;
20
+ std::vector <int > channel1_pins;
21
+ std::vector <int > channel2_pins;
21
22
};
22
23
23
24
/* *
@@ -80,13 +81,13 @@ class R2ROutput : public AudioOutput {
80
81
81
82
void setupPins () {
82
83
TRACED ();
83
- for (int j = 0 ; j < rcfg.channel1_pins . size (); j++ ) {
84
- LOGI (" Setup pin %d" , rcfg. channel1_pins [j] );
85
- pinMode (rcfg. channel1_pins [j] , OUTPUT);
84
+ for (auto pin : rcfg.channel1_pins ) {
85
+ LOGI (" Setup channel1 pin %d" , pin );
86
+ pinMode (pin , OUTPUT);
86
87
}
87
- for (int j = 0 ; j < rcfg.channel2_pins . size (); j++ ) {
88
- LOGI (" Setup pin %d" , rcfg. channel1_pins [j] );
89
- pinMode (rcfg. channel2_pins [j] , OUTPUT);
88
+ for (int pin : rcfg.channel2_pins ) {
89
+ LOGI (" Setup channel2 pin %d" , pin );
90
+ pinMode (pin , OUTPUT);
90
91
}
91
92
}
92
93
You can’t perform that action at this time.
0 commit comments