diff --git a/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp index b5a4663..c40bfe0 100644 --- a/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp @@ -45,6 +45,8 @@ typedef enum BackupState bool s_ExistAPSettingAnnotation = false; BackupState s_BackupState = STARTUP; +bool s_PlayedStartCursor = false; +bool s_PlayedSdPullOutCursor = false; bool s_PlayedFinishedSound = false; bool s_PlayedFailSound = false; @@ -130,13 +132,17 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, if(!error) { operationMessage.push_back(::std::string("Push A or START Button")); + if(!s_PlayedStartCursor) + { + common::PlaySound(common::SOUND_CURSOR); + s_PlayedStartCursor = true; + } } if (nextStep && !error) { COMMON_LOGGER("Start Export Data\n"); s_BackupState = EXPORT_TWL_SOUND; - common::PlaySound(common::SOUND_CURSOR); } } break; @@ -227,6 +233,11 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, case DONE: { operationMessage.push_back(::std::string("Backup Done. Pull Out SD Card.")); + if(!s_PlayedSdPullOutCursor) + { + common::PlaySound(common::SOUND_CURSOR); + s_PlayedSdPullOutCursor = true; + } } break; @@ -291,6 +302,8 @@ void InitializeState() s_PlayedFailSound = false; s_PlayedFinishedSound = false; s_ExistAPSettingAnnotation = false; + s_PlayedStartCursor = false; + s_PlayedSdPullOutCursor = false; } } // namespace ConsoleBackup diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp index 7ce1d79..2384767 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp @@ -40,6 +40,7 @@ typedef enum RestoreState SERIAL_IS_NOT_IN_SD, // シリアルナンバーファイルがSDカードにないことを表示 SERIAL_IN_SD, // シリアルナンバーの情報を表示 UPDATE_IN_PROGRESS, // アップデート中 + UPDATE_DONE, // アップデート完了 RESTORE_TWL_SOUND, // TWLサウンドの書き込み中 RESTORE_TWL_PHOTO, // TWL写真の書き込み中 RESTORE_IN_PROGRESS, // 書き込み中 @@ -71,6 +72,12 @@ bool s_APSettingAnnotation = false; bool s_SerialNumberAnnotation = false; // 失敗サウンドを鳴らしたかどうか bool s_PlayedFailSound = false; +// 操作開始サウンドを鳴らしたかどうか +bool s_PlayedStartCursor = false; +// リブート開始前サウンドを鳴らしたかどうか +bool s_PlayedRebootCursor = false; +// SD抜き出し前サウンドを鳴らしたかどうか +bool s_PlayedSdPullOutCursor = false; // ネットワークアップデートを開始したかどうか bool s_ExecuteFgNup = false; @@ -298,6 +305,12 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, { operationMessage.push_back(::std::string("Import Data Mode")); } + + if(!s_PlayedStartCursor) + { + PlaySound(SOUND_CURSOR); + s_PlayedStartCursor = true; + } } if (nextStep && !error) @@ -311,20 +324,18 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, ExecSyncMcuRtc(); s_RestoreState = UPDATE_IN_PROGRESS; - PlaySound(SOUND_CURSOR); } else if(needsErase) { COMMON_LOGGER("Erase Trash\n"); s_RestoreState = ERASE; - PlaySound(SOUND_CURSOR); } else { COMMON_LOGGER("Start Import Data\n"); s_RestoreState = RESTORE_TWL_SOUND; - PlaySound(SOUND_CURSOR); } + } } break; @@ -394,8 +405,8 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, // アップデート完了ファイルを作成 CreateUpdateFinishedFile(); - // リブートする - s_RestoreState = REBOOTING; + s_RestoreState = UPDATE_DONE; + } else { @@ -418,6 +429,26 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, } break; + // アップデート完了 + case UPDATE_DONE: + { + operationMessage.push_back(::std::string("Network Update Done.")); + operationMessage.push_back(::std::string("Press A or START Button to Reboot")); + + if(!s_PlayedRebootCursor) + { + PlaySound(SOUND_CURSOR); + s_PlayedRebootCursor = true; + } + + if (nextStep) + { + s_RestoreState = REBOOTING; + } + } + break; + + // TWLサウンド領域の書き込み中 case RESTORE_TWL_SOUND: { @@ -538,6 +569,12 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, operationMessage.push_back(::std::string("Restore Done.")); operationMessage.push_back(::std::string("Press A or START Button to Reboot")); + if(!s_PlayedRebootCursor) + { + PlaySound(SOUND_CURSOR); + s_PlayedRebootCursor = true; + } + if (nextStep) { s_RestoreState = REBOOTING; @@ -609,6 +646,12 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, operationMessage.push_back(::std::string("ALL Done. Pull Out SD Card.")); // SDカード抜けのみで次の状態に遷移する + if (!s_PlayedSdPullOutCursor) + { + common::PlaySound(common::SOUND_CURSOR); + s_PlayedSdPullOutCursor = true; + } + } break; @@ -682,6 +725,9 @@ void InitializeState() s_PlayedFailSound = false; s_ExecuteFgNup = false; s_FgNupRetryCount = 0; + s_PlayedStartCursor = false; + s_PlayedRebootCursor = false; + s_PlayedSdPullOutCursor = false; } u32 GetProgress()