Przeglądaj źródła

rename initialize() to begin(), Arduino's naming convention

dds
PaulStoffregen 9 lat temu
rodzic
commit
17e0291728
3 zmienionych plików z 3 dodań i 3 usunięć
  1. +1
    -1
      analyze_guitartuner.cpp
  2. +1
    -1
      analyze_guitartuner.h
  3. +1
    -1
      examples/Analysis/GuitarTuneNotes/GuitarTuneNotes.ino

+ 1
- 1
analyze_guitartuner.cpp Wyświetl plik

@@ -202,7 +202,7 @@ uint16_t AudioAnalyzeGuitarTuner::estimate( int64_t *yin, int64_t *rs, uint16_t
* @param threshold Allowed uncertainty
* @param cpu_max How much cpu usage before throttling
*/
void AudioAnalyzeGuitarTuner::initialize( float threshold ) {
void AudioAnalyzeGuitarTuner::begin( float threshold ) {
__disable_irq( );
process_buffer = false;
yin_threshold = threshold;

+ 1
- 1
analyze_guitartuner.h Wyświetl plik

@@ -57,7 +57,7 @@ public:
*
* @return none
*/
void initialize( float threshold );
void begin( float threshold );
/**
* sets threshold value

+ 1
- 1
examples/Analysis/GuitarTuneNotes/GuitarTuneNotes.ino Wyświetl plik

@@ -61,7 +61,7 @@ void setup() {
* Initialize the yin algorithm's absolute
* threshold, this is good number.
*/
tuner.initialize(.15);
tuner.begin(.15);
pinMode(LED_BUILTIN, OUTPUT);
playNoteTimer.begin(playNote, 1000);
}

Ładowanie…
Anuluj
Zapisz