Skip to content

#KL25-27 モータコントローラクラスの作成#9

Merged
takuchi17 merged 23 commits intomainfrom
ticket-KL25-27
Jun 1, 2025
Merged

#KL25-27 モータコントローラクラスの作成#9
takuchi17 merged 23 commits intomainfrom
ticket-KL25-27

Conversation

@nishijima515
Copy link
Copy Markdown
Contributor

@nishijima515 nishijima515 commented May 23, 2025

チェックリスト

  • clang-format している
  • コーディング規約に準じている
  • チケットの完了条件を満たしている

変更点

  • 公式のAPIラッパークラスを直接参照するようにmodules/API/MotorController.cpp,modules/API/MotorController.h,etrobocon2025/Makefile.incを変更
  • 新しいモックデータtests/dummy/Motor.h, tests/dummy/Port.hの追加

動作テスト

うごきました
動作確認 (Notion)

添付資料

@notion-workspace
Copy link
Copy Markdown

@nishijima515 nishijima515 requested a review from a team May 23, 2025 07:06
@nishijima515 nishijima515 changed the title #KL25-27 #KL25-27 モータコントローラクラスの作成 May 23, 2025
@nishijima515 nishijima515 self-assigned this May 23, 2025
@HaruArima08 HaruArima08 marked this pull request as ready for review May 25, 2025 11:36
Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更がモックくらいだからほとんどないかな。

でも、これってmain取り込んだ?Makefile系は触らなくていいはずだけど。Robotとかもないから最新のを取り込めていないはず。一度手元のmainブランチを更新して、このブランチにgit merge mainして欲しい。

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あと少しだけ修正お願いします.

@takahashitom takahashitom self-assigned this May 27, 2025
Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

問題なさそうです!
何回も見たのでザルになってるところはあるかも。
2週連続ありがとうございました🙏
LGTM!!

@molpui0726 molpui0726 requested a review from Copilot May 27, 2025 15:24
Copy link
Copy Markdown
Contributor

@molpui0726 molpui0726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

僕も見た感じは大丈夫そうだとは思う。
dummy とかを除いた、直接動作に関わるところの変更が少ないから、どちらかというと他プルリクで取り込みとかコンフリクト(起きたら)の解消が大変そう。
お疲れ様でした👍️🙆

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the project’s local Motor/Port wrappers with the official spikeapi versions and updates MotorController to use those, while providing new dummy stubs for testing.

  • Removed outdated spike/pup and pbio dummy headers.
  • Added tests/dummy/Port.h and tests/dummy/Motor.h as new test stubs.
  • Updated modules/API/MotorController to directly use EPort and spikeapi::Motor.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/dummy/spike/pup/motor.h Removed old dummy pup motor implementation.
tests/dummy/pbio/port.h Removed old dummy pbio port definitions.
tests/dummy/Port.h Added new Port enum stub for test builds.
tests/dummy/Motor.h Added new Motor class stub for test builds.
modules/API/MotorController.h Imported spikeapi namespace and switched to EPort.
modules/API/MotorController.cpp Updated constructor initializer to use EPort::PORT_* values.
modules/API/Motor.h Removed local Motor wrapper (now using official spikeapi).
modules/API/Port.h Removed local Port enum wrapper (now using official spikeapi).
Comments suppressed due to low confidence (4)

tests/dummy/Port.h:11

  • [nitpick] The macro name NUM_PORT_S is ambiguous; consider renaming to NUM_SENSOR_PORTS for clarity.
#define NUM_PORT_S (6)  // number of sensor ports

tests/dummy/Port.h:14

  • [nitpick] The macro name NUM_PORT_M is ambiguous; consider renaming to NUM_MOTOR_PORTS for clarity.
#define NUM_PORT_M (6)  // number of motor ports

tests/dummy/Motor.h:145

  • [nitpick] The member name Port shadows the type name and uses uppercase; consider renaming it (e.g., mPort or port_) to avoid confusion.
EPort Port;

modules/API/MotorController.h:11

  • Avoid using namespace directives in header files, as they pollute global namespace for consumers. Prefer fully qualified names or move this directive to the source file.
using namespace spikeapi;

Copy link
Copy Markdown
Contributor

@aridome222 aridome222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

見た感じ問題ないです!
LGTM

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

細かいところをお願いします.

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よさそうです。
あと一人くらい再レビューしたらマージしてもよいかなと思います。

Copy link
Copy Markdown
Contributor

@aridome222 aridome222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

リファクタリング系の修正お願いします。

Copy link
Copy Markdown
Collaborator

@takahashitom takahashitom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

遅くなってしまって申し訳ないです
対応していただけると助かります

有留さんと被ってたらごめんなさい

よろしくお願いします。

@nishijima515
Copy link
Copy Markdown
Contributor Author

修正しました。お手数ですが再レビューお願いします。

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あと少しお願いします.

Copy link
Copy Markdown
Contributor

@aridome222 aridome222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

何度も修正で大変だろうけど、お願いします。

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すこし!

Copy link
Copy Markdown
Contributor

@aridome222 aridome222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

夜遅い中、すぐに修正対応してくれてありがとう!
宅間くんが指摘してくれたところさえ修正すればオッケーなので、先にlgtm出します!!
LGTM

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

見逃しですこし!

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正漏れがあるのと,フォーマットチェックが通ってない.
slackでおくったからそれを参考にやってみてもらえると助かる

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント

Copy link
Copy Markdown
Collaborator

@takahashitom takahashitom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すぐに対応してくれてありがとう
ひじょうにたすかります

本当に軽微なやつがあるから、そこだけおねがい
本当に軽微なヤツだからさきにアプルーブにします

おつかれさまでした!

Copy link
Copy Markdown
Collaborator

@takuchi17 takuchi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本当に夜遅くまでありがとう.
完全にこちらの対応不足です.申し訳ない.
LGTM!!!

@takuchi17 takuchi17 merged commit 6abf5f6 into main Jun 1, 2025
6 checks passed
Hara1274 added a commit that referenced this pull request Jun 2, 2025
commit 182dfe5
Merge: 6abf5f6 3861b8a
Author: Chihaya Takuma <138369240+takuchi17@users.noreply.github.com>
Date:   Mon Jun 2 01:53:48 2025 +0900

    Merge pull request #10 from KatLab-MiyazakiUniv/ticket-KL25-30

commit 3861b8a
Merge: 7b00b34 6abf5f6
Author: Chihaya Takuma <138369240+takuchi17@users.noreply.github.com>
Date:   Mon Jun 2 01:48:12 2025 +0900

    Merge branch 'main' into ticket-KL25-30

commit 6abf5f6
Merge: 6b1d016 d047303
Author: Chihaya Takuma <138369240+takuchi17@users.noreply.github.com>
Date:   Mon Jun 2 01:45:34 2025 +0900

    Merge pull request #9 from KatLab-MiyazakiUniv/ticket-KL25-27

commit d047303
Author: zima <ibrmark21@gmail.com>
Date:   Mon Jun 2 01:36:36 2025 +0900

    refactor: コメントの修正

commit 31b4188
Author: zima <ibrmark21@gmail.com>
Date:   Mon Jun 2 01:30:32 2025 +0900

    refactor: フォーマットエラー解消のための空行

commit 65d9141
Author: zima <ibrmark21@gmail.com>
Date:   Mon Jun 2 01:29:23 2025 +0900

    refactor: フォーマットエラー解消のための空行

commit 9a42ec2
Author: zima <ibrmark21@gmail.com>
Date:   Mon Jun 2 00:57:35 2025 +0900

    refactor: フォーマットエラー解消のための空行追加

commit 38bcd70
Author: zima <ibrmark21@gmail.com>
Date:   Mon Jun 2 00:34:26 2025 +0900

    refactor: コメントの修正

commit e94426c
Author: zima <ibrmark21@gmail.com>
Date:   Mon Jun 2 00:25:14 2025 +0900

    update: RADIUSをWHEEL_RADIUSに変更

commit 7da9972
Author: zima <ibrmark21@gmail.com>
Date:   Sun Jun 1 23:48:33 2025 +0900

    refactor: 細かい修正

commit 653b3ce
Author: zima <ibrmark21@gmail.com>
Date:   Sun Jun 1 23:41:14 2025 +0900

    refactor: 細かい修正

commit a3364c5
Author: zima <ibrmark21@gmail.com>
Date:   Sun Jun 1 22:50:10 2025 +0900

    update: 細かい処理の変更とコメントの修正

commit a34553b
Author: zima <ibrmark21@gmail.com>
Date:   Sun Jun 1 22:48:04 2025 +0900

    refactor: 細かい修正

commit c10df1a
Author: zima <ibrmark21@gmail.com>
Date:   Sun Jun 1 22:46:45 2025 +0900

    add: 円周率の定義とRAD_TO_DEGを追加

commit d5b68a8
Author: zima <ibrmark21@gmail.com>
Date:   Sat May 31 12:17:04 2025 +0900

    refactor: 細かい修正

commit 7f04876
Author: zima <ibrmark21@gmail.com>
Date:   Thu May 29 17:41:59 2025 +0900

    update: speed値をmm/sで受け取れるように変更

commit b1568b5
Merge: 2f32911 5f82ed6
Author: zima <ibrmark21@gmail.com>
Date:   Thu May 29 15:34:12 2025 +0900

    Merge branch 'work-KL25-27' into ticket-KL25-27

commit 5f82ed6
Author: zima <ibrmark21@gmail.com>
Date:   Thu May 29 15:30:35 2025 +0900

    update: 名前空間をcppのほうに記述

commit 7b00b34
Author: HaruArima08 <uharubxxcd@gmail.com>
Date:   Thu May 29 01:54:04 2025 +0900

    refactor:細かい修正

commit 5ffa31b
Author: HaruArima08 <uharubxxcd@gmail.com>
Date:   Thu May 29 00:51:02 2025 +0900

    refactor:細かい修正

commit 1e57bbe
Author: HaruArima08 <uharubxxcd@gmail.com>
Date:   Tue May 27 17:50:59 2025 +0900

    update:関数名と引数の修正、実装部分の可読性を上げる修正

commit 2f32911
Author: zima <ibrmark21@gmail.com>
Date:   Tue May 27 13:25:34 2025 +0900

    refactor: 細かな修正

commit 8eae213
Author: zima <ibrmark21@gmail.com>
Date:   Tue May 27 12:22:12 2025 +0900

    refactor: 細かな修正

commit 559bd91
Merge: 68ea327 6b1d016
Author: zima <ibrmark21@gmail.com>
Date:   Tue May 27 12:21:10 2025 +0900

    update: ロボットクラス追加後のメインの取り込み

commit 77a11fb
Author: HaruArima08 <uharubxxcd@gmail.com>
Date:   Sun May 25 16:55:40 2025 +0900

    update:ColorJudgeのメンバ関数stringToColorの修正,ColorJudgeTest.cppの不要テストケースの削除

commit b9737c6
Author: HaruArima08 <uharubxxcd@gmail.com>
Date:   Sun May 25 01:17:15 2025 +0900

    update:Robotクラスとテストファイルのコメントアウト削除、ColorSensor.cppをColorSensor.hに集約

commit e00c80e
Author: HaruArima08 <uharubxxcd@gmail.com>
Date:   Sat May 24 23:26:06 2025 +0900

    add:カラージャッジクラスの実装とテストファイルの追加

commit 68ea327
Merge: 6fd84bf 82a5ded
Author: zima <ibrmark21@gmail.com>
Date:   Fri May 23 15:53:40 2025 +0900

    update: mileageクラスを追加したメインの取り込み

commit 6fd84bf
Author: zima <ibrmark21@gmail.com>
Date:   Fri May 23 15:42:51 2025 +0900

    add: 新しいモックデータの追加

commit 8bba3f2
Author: zima <ibrmark21@gmail.com>
Date:   Fri May 23 15:42:01 2025 +0900

    delete: 不要ファイルの削除

commit a64683e
Author: zima <ibrmark21@gmail.com>
Date:   Fri May 23 15:40:21 2025 +0900

    update: パスを追加

commit 1e426d7
Author: zima <ibrmark21@gmail.com>
Date:   Fri May 23 15:36:17 2025 +0900

    update: 公式のAPIラッパークラスを参照するように変更
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants