소스 검색

increase size of note counter variable to avoid overflow

Marco Monaco 6 년 전
부모
커밋
73d8593352
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      quantum/audio/audio.c
  2. 1 1
      quantum/audio/audio_arm.c
  3. 1 1
      quantum/audio/audio_pwm.c

+ 1 - 1
quantum/audio/audio.c

@@ -141,7 +141,7 @@ uint16_t notes_count;
 bool     notes_repeat;
 bool     note_resting = false;
 
-uint8_t current_note = 0;
+uint16_t current_note = 0;
 uint8_t rest_counter = 0;
 
 #ifdef VIBRATO_ENABLE

+ 1 - 1
quantum/audio/audio_arm.c

@@ -54,7 +54,7 @@ uint16_t notes_count;
 bool     notes_repeat;
 bool     note_resting = false;
 
-uint8_t current_note = 0;
+uint16_t current_note = 0;
 uint8_t rest_counter = 0;
 
 #ifdef VIBRATO_ENABLE

+ 1 - 1
quantum/audio/audio_pwm.c

@@ -94,7 +94,7 @@ bool     notes_repeat;
 float    notes_rest;
 bool     note_resting = false;
 
-uint8_t current_note = 0;
+uint16_t current_note = 0;
 uint8_t rest_counter = 0;
 
 #ifdef VIBRATO_ENABLE