1.3.1 Updates

- Add startup and network failure sound effects
- 12864 OLED scroll text
- Internalization of volume actions
This commit is contained in:
Terrence
2025-03-03 07:29:22 +08:00
parent 36d98ce1a4
commit 7945da0c84
30 changed files with 217 additions and 104 deletions

View File

@@ -1,16 +1,17 @@
#include "ml307_board.h"
#include "audio_codecs/no_audio_codec.h"
#include "xingzhi_lcd_display.h"
#include "system_reset.h"
#include "application.h"
#include "button.h"
#include "config.h"
#include "iot/thing_manager.h"
#include "led/single_led.h"
#include "assets/lang_config.h"
#include <esp_log.h>
#include <esp_lcd_panel_vendor.h>
#define TAG "XINGZHI_CUBE_1_54TFT_ML307"
LV_FONT_DECLARE(font_puhui_16_4);
@@ -48,12 +49,12 @@ private:
volume = 100;
}
codec->SetOutputVolume(volume);
GetDisplay()->ShowNotification("音量 " + std::to_string(volume));
GetDisplay()->ShowNotification(Lang::Strings::VOLUME + std::to_string(volume));
});
volume_up_button_.OnLongPress([this]() {
GetAudioCodec()->SetOutputVolume(100);
GetDisplay()->ShowNotification("最大音量");
GetDisplay()->ShowNotification(Lang::Strings::MAX_VOLUME);
});
volume_down_button_.OnClick([this]() {
@@ -63,12 +64,12 @@ private:
volume = 0;
}
codec->SetOutputVolume(volume);
GetDisplay()->ShowNotification("音量 " + std::to_string(volume));
GetDisplay()->ShowNotification(Lang::Strings::VOLUME + std::to_string(volume));
});
volume_down_button_.OnLongPress([this]() {
GetAudioCodec()->SetOutputVolume(0);
GetDisplay()->ShowNotification("已静音");
GetDisplay()->ShowNotification(Lang::Strings::MUTED);
});
}