Переглянути джерело

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

dds
PaulStoffregen 9 роки тому
джерело
коміт
17e0291728
3 змінених файлів з 3 додано та 3 видалено
  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 Переглянути файл

* @param threshold Allowed uncertainty * @param threshold Allowed uncertainty
* @param cpu_max How much cpu usage before throttling * @param cpu_max How much cpu usage before throttling
*/ */
void AudioAnalyzeGuitarTuner::initialize( float threshold ) {
void AudioAnalyzeGuitarTuner::begin( float threshold ) {
__disable_irq( ); __disable_irq( );
process_buffer = false; process_buffer = false;
yin_threshold = threshold; yin_threshold = threshold;

+ 1
- 1
analyze_guitartuner.h Переглянути файл

* *
* @return none * @return none
*/ */
void initialize( float threshold );
void begin( float threshold );
/** /**
* sets threshold value * sets threshold value

+ 1
- 1
examples/Analysis/GuitarTuneNotes/GuitarTuneNotes.ino Переглянути файл

* Initialize the yin algorithm's absolute * Initialize the yin algorithm's absolute
* threshold, this is good number. * threshold, this is good number.
*/ */
tuner.initialize(.15);
tuner.begin(.15);
pinMode(LED_BUILTIN, OUTPUT); pinMode(LED_BUILTIN, OUTPUT);
playNoteTimer.begin(playNote, 1000); playNoteTimer.begin(playNote, 1000);
} }

Завантаження…
Відмінити
Зберегти