From b35cbd12fffad14852b5725ef6ee3937571b2810 Mon Sep 17 00:00:00 2001 From: Huibean Date: Tue, 31 Dec 2024 23:13:57 +0800 Subject: [PATCH] fix tune len back to 128 --- Inc/eeprom.h | 3 +-- Src/sounds.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Inc/eeprom.h b/Inc/eeprom.h index e412484b..8e3bae14 100644 --- a/Inc/eeprom.h +++ b/Inc/eeprom.h @@ -47,8 +47,7 @@ typedef union EEprom_u { uint8_t sine_mode_power; // 45 uint8_t input_type; // 46 uint8_t auto_advance; // 47 - uint8_t reserved_2[4]; //48-51 - uint8_t tune[124]; // 52-175 + uint8_t tune[128]; // 48-175 struct { uint8_t can_node; // 176 uint8_t esc_index; // 177 diff --git a/Src/sounds.c b/Src/sounds.c index 05eb358b..69515bac 100644 --- a/Src/sounds.c +++ b/Src/sounds.c @@ -62,7 +62,8 @@ void playBlueJayTune() uint16_t frequency; comStep(3); // read_flash_bin(blueJayTuneBuffer , eeprom_address + 48 , 128); - for (int i = 0; i < 124; i += 2) { + // first 4 bytes are reserved for rtttl duration, octave, beat, tempo + for (int i = 4; i < 128; i += 2) { RELOAD_WATCHDOG_COUNTER(); signaltimeout = 0;