Oliver Fabel 1 год назад
Родитель
Сommit
80f0dc2f91
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      mp_flipper_modflipperzero.c

+ 2 - 4
mp_flipper_modflipperzero.c

@@ -628,10 +628,8 @@ static const float const_factor = 1.05946309436;
 static inline float get_frequency_by_note(const uint8_t octave, const char note, const bool is_sharp) {
 static inline float get_frequency_by_note(const uint8_t octave, const char note, const bool is_sharp) {
     float frequency = base_frequency;
     float frequency = base_frequency;
 
 
-    for(size_t i = 0; i < octave; i++) {
-        for(size_j = 0; j < 12; j++) {
-            frequency *= const_factor;
-        }
+    for(size_t i = 0; i < octave * 12; i++) {
+        frequency *= const_factor;
     }
     }
 
 
     for(size_t j = 0; j < 12; j++) {
     for(size_t j = 0; j < 12; j++) {