Skip to content

Commit 1aaa6f4

Browse files
committed
fix: 公式APIのインクルードパスの修正.テストは通らないが,実機でAPIが使えるか確認するためのコミット
1 parent e5b973a commit 1aaa6f4

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

Makefile.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ INCLUDES += \
2424
-I$(mkfile_path)modules/calculators\
2525
-I$(mkfile_path)modules/motions\
2626
-I$(mkfile_path)modules/CameraCapture \
27-
-I$(mkfile_path)../../raspike-athrill-v850e2m/sdk/common/library/libcpp-spike/include \
27+
-I$(mkfile_path)../../common/library/libcpp-spike/include \
2828
-I/usr/include/opencv4
2929

3030
APPL_LIBS += $(shell pkg-config --libs opencv4)

modules/Robot.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include "Robot.h"
88

9-
Robot::Robot() : motorController(), cameraCapture() /*, colorSensor()*/ {}
9+
Robot::Robot() : motorController(), cameraCapture(), colorSensor(EPort::PORT_E) {}
1010

1111
MotorController& Robot::getMotorControllerInstance()
1212
{
@@ -18,7 +18,7 @@ CameraCapture& Robot::getCameraCaptureInstance()
1818
return cameraCapture;
1919
}
2020

21-
// ColorSensor& Robot::getColorSensorInstance()
22-
// {
23-
// return colorSensor;
24-
// }
21+
spikeapi::ColorSensor& Robot::getColorSensorInstance()
22+
{
23+
return colorSensor;
24+
}

modules/Robot.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "MotorController.h"
1111
#include "CameraCapture.h"
12-
// #include "ColorSensor.h"
12+
#include "ColorSensor.h"
1313

1414
class Robot {
1515
public:
@@ -31,10 +31,16 @@ class Robot {
3131
*/
3232
CameraCapture& getCameraCaptureInstance();
3333

34+
/**
35+
* @brief ColorSensorのインスタンスの参照を返す
36+
* @return メンバ変数colorSensor(ColorSensorのインスタンス)の参照
37+
*/
38+
spikeapi::ColorSensor& getColorSensorInstance();
39+
3440
private:
35-
MotorController motorController; // MotorControllerインスタンス
36-
CameraCapture cameraCapture; // CameraCaptureインスタンス
37-
// ColorSensor colorSensor; //ColorSensorインスタンス
41+
MotorController motorController; // MotorControllerインスタンス
42+
CameraCapture cameraCapture; // CameraCaptureインスタンス
43+
spikeapi::ColorSensor colorSensor; // ColorSensorインスタンス
3844
};
3945

4046
#endif

0 commit comments

Comments
 (0)