From: Caisking <3449750381@qq.com> Date: Tue, 12 Dec 2023 12:16:56 +0000 (+0800) Subject: 增加传输速率 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=b4674aefb0d0580b0d6f2e0c27f3a2b49ead1226;p=mirrors%2FFD230.git 增加传输速率 --- diff --git a/code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersModel.h b/code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersModel.h index dceda4b35..ada17bab6 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersModel.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersModel.h @@ -107,7 +107,7 @@ private: AudioInterrupt interrupt; std::shared_ptr playerInterruptListener{nullptr}; int64_t circleProgress{0}; - bool playButtonState{false}; + bool playButtonState{true}; void SequencePlayout(void); void RandomPlayout(void); void NextSong(int16_t index); diff --git a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersModel.cpp b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersModel.cpp index fbcd64fd8..cb0ba2e7a 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersModel.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersModel.cpp @@ -254,6 +254,7 @@ int PlayersModel::PlayerInit(void) playersPresenter->SetTitleSetText(songName); playersPresenter->SetPlaybackProgress(circleProgress); playersPresenter->SetPlayerState(playButtonState); + PlayerStat(); return 0; } diff --git a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp index ffa5ac4ad..6744d6d73 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp @@ -501,6 +501,7 @@ void ButtonOnClickListener::PlayerButtonOnClick() int32_t connTgState = avrcp_tg_get_device_connect_state(BluetoothModel::GetInstance()->GetLastConnedAddr()); state = playersView->GetPlayerButtonState(); + if (PlayersModel::GetInstance()->GetPlayerCtr() == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PlayersModel::GetInstance()->GetPlayerCtr() nullptr"); return; diff --git a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp index 1e0215f44..801f2697f 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp @@ -583,6 +583,9 @@ bool PlayersView::InitView(void) if (ret == OHOS_FAILURE) { return false; } + // 需要一个模拟信息,假装发生了按键点击,开始播放音乐 + // 调用 OnClick 回调函数来处理点击事件 + //playerButton.OnClick(,); // 遍历文件名到list链表 PlayersListGroup::GetInstance()->SetUpListCase(); PlayersModel::GetInstance()->PlayerInit(); diff --git a/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c b/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c index b6f409070..e308f60cc 100755 --- a/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c +++ b/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c @@ -221,7 +221,7 @@ static uart_config_t g_uart_config[UART_BUS_MAX_NUMBER] = { log_factory_at_callback, #endif { - .baud_rate = 500000, + .baud_rate = 2000000, .data_bits = UART_DATA_BIT_8, .parity = UART_PARITY_NONE, .stop_bits = UART_STOP_BIT_1,