-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix to get the latest data #58
Merged
Merged
Conversation
This file contains 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
YusukeKato
changed the title
Add a test to get the latest data
Add tests to get the latest data
Aug 20, 2024
最新のデータを取得するように機能が変わっているので、 機能変更がメインで、テストの追加は補助的な要素です。 |
ShotaAk
approved these changes
Aug 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
変更内容OKです。
実機にて、タイマー周期を100msに落としても最新データがpublishされることを確認しました。
YusukeKato
changed the title
Add tests to get the latest data
Fix to get the latest data
Aug 21, 2024
2 tasks
ShotaAk
added a commit
that referenced
this pull request
Aug 23, 2024
* Add unit tests (#52) * Use pointer for SerialPort instance instead of inheritance * Add test using fakeit * Install git comand in indsutrial_ci * Refactoring * Update CI * Use AFTER_SETUP_TARGET_WORKSPACE * driverインスタンスのメンバ変数のテストを追加 * バイナリデータが読み込まれたことを確認するテストを追加 * ASCIIデータが読み込まれたことを確認するテストを追加 * バイナリでもASCIIでもないデータが読み込まれたことを確認するテストを追加 * テストが通る状態に修正 --------- Co-authored-by: ShotaAk <[email protected]> * checkDataFormat() and unit test updates (#54) * Binaryデータ出力時は実機とテストの両方で動作確認完了、ASCIIデータには未対応、デバッグ用出力あり * 実機とテストの両方でBinaryとASCIIの判定に成功、BinaryでもASCIIでもないデータには未対応 * タイムアウト機能を追加&hasCompletedFormatCheck()と関係する変数を削除 * 不正なデータをチェックするようにテストを修正 * readを成功させるためにwhileループにsleep処理を追加 * 必要がなかったため、while文のsleep処理を削除 * テスト用データの作成で重複している箇所を関数化 * RCLCPP_INFOをWARNに変更&不要なコメントを削除 * const autoをできる限り使用 * actions/checkoutのバージョンを3から4に更新 * 読み取ったデータをある程度貯めてからデータ形式を判定するように変更 * 貯めるデータを更新するように修正 * メンバ変数の名前を修正&256を定数化 * Add test for readSensorData() (#57) * readSensorData()実行後のhasRefreshedImuData()の応答のテストを追加 * テストにコメントを追加 * 0.0を入力として与えたテストを追加 * ASCII形式のテストデータを作成する際、引数で値を渡せるように変更 * Binary形式でもテストデータを引数で渡せるように変更 * テストケースを使い回せるように変更 * readSensorData()実行時にセンサデータが正しく変換されたか検証するテストを追加 * デバッグ用の関数を削除 * short intをint16_tに変更 * int16を8bitずつに分ける関数をhighとlowそれぞれ用意 * 既存のテストに影響を与えないようにデータ作成の関数をオーバーロード * set_data関数をprivateに変更 * 変換後の数値を直打ち * data_format_を設定する関数を削除 * 不要な箇所を削除 * Fix to get the latest data (#58) * 最新データ取得のテストを追加 * PR#50を参考に最新のデータを取得できるように変更 * 複数セットのデータ取得時に最新のデータをセットするように変更、テストは通るが挙動がおかしい * 最新データの取得方法を修正 * 取得するデータが適切な長さであることを保証する * 2.1.0リリースのためにCHANGELOG.rstとpackage.xmlを更新 (#59) * CHANGELOGを更新 * 2.1.0 --------- Co-authored-by: ShotaAk <[email protected]>
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.
What does this implement/fix?
複数セットのデータを読み込んだ時に最新のデータが取得されることを確認するテストを追加します。
また、#50 を参考にして繰り返しread関数を実行するように変更しています。
Does this close any currently open issues?
#49 に対応します。
How has this been tested?
colcon test
ですべてのテストが通ることを確認しました。実機においてBinaryモードとASCIIモードのどちらでも動作を確認しました。
Any other comments?
Checklists