Harden output power restore state handling#71
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
標準Inventory統合側の送信出力一時変更について、変更送信後の復元保証を強化しました。
背景
従来は
_offer_temporary_output_power_change()が、送信出力変更フレーム送信後に現在設定を読み戻し、その後にplansを返していました。そのため、変更フレーム送信後、読み戻し処理で例外が発生した場合、
main()側のoutput_power_plansがNoneのままとなり、finally 側の復元対象から漏れる可能性がありました。変更内容
src/utr_usb_inventory_with_output_power.py_create_output_power_restore_state()を追加_offer_temporary_output_power_change()にrestore_stateを渡せるように変更plansをrestore_stateに保持restore_required=Trueを立てるplansを参照できるように変更_restore_temporary_output_power()がrestore_stateからも復元計画を取得できるように変更restore_doneで二重復元を防止安全ガード
UHF_SET_INVENTORY_PARAM送信なし確認観点
py -m pytestが成功すること実機確認メモ
送信出力変更に関わるため、マージ後にUTR-SUN02-4CH / USM02で実機確認してください。8CH制御は変更していません。