ETrobocon2017 - 片山研究所モデルベース開発推進事業部
str
apps
include
Walker.h
[詳解]
1
#ifndef __WALKER__
2
#define __WALKER__
3
4
#include "
Motor.h
"
5
#include "
Clock.h
"
6
#include "
util.h
"
7
8
using namespace
ev3api
;
9
10
class
Walker
{
11
public
:
12
Walker
();
13
void
stop();
14
void
run
(int8_t pwm, int8_t
turn
);
15
int
edgeChange();
16
void
moveAngle(int8_t pwm,
int
angle);
17
void
angleChange(
int
angle,
int
rotation);
18
int32_t get_count_L();
19
int32_t get_count_R();
20
void
init();
21
void
terminate();
22
void
reset();
23
void
setBrakeMotor(
bool
brake);
24
25
private
:
26
Motor
leftWheel;
27
Motor
rightWheel;
28
Clock
clock;
29
int8_t leftRight = 1;
// 1 -> 右, -1 -> 左
30
};
31
32
33
#endif
ev3api
Definition:
Clock.h:12
Clock.h
run
void run(Navigation &navi, float goal_x, float goal_y, bool)
Definition:
example_Navigation.cpp:40
Motor.h
ev3api::Motor
Definition:
Motor.h:17
util.h
ev3api::Clock
Definition:
Clock.h:16
turn
int turn
Definition:
example_SelfLocalization.cpp:18
Walker
Definition:
Walker.h:10
構築:
1.8.13