Drain 8CH inventory responses before antenna restore#70
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.
概要
8CH順次Inventory中にCtrl+Cした場合、復元コマンド送信前に受信バッファへ残ったInventory応答をクリアする処理を追加しました。
背景
実機確認で、ANT3 Inventory中にCtrl+Cした場合、finally側の自動復元は呼び出されましたが、復元コマンドの応答としてInventory残留データを読んでしまい、ACK/NACKなし扱いになりました。
実機ログ例:
これは復元コマンド自体の不正というより、Ctrl+C直前のInventory応答がシリアル受信バッファに残っていた可能性が高いです。
変更内容
src/utr_8ch_sequential_inventory_cli.py_drain_serial_input_before_restore()を追加安全ガード
UHF_SET_INVENTORY_PARAM送信なし実機確認観点
finally: 使用アンテナ番号の自動復元を試みます。が出る復元前に受信バッファをクリアしました: ... bytesが出る場合がある自動復元完了: ANT3/EXT5 / 使用アンテナ番号 44hが出る接続を閉じました。が出る備考
PR #69 のREADME更新は別PRとして維持しています。このPRは実機で見つかったCtrl+C時の復元失敗対策に絞っています。