ETrobocon2017 - 片山研究所モデルベース開発推進事業部
str
apps
include
common_definition.h
[詳解]
1
#ifndef __COMMON_DEFINITION__
2
#define __COMMON_DEFINITION__
3
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <math.h>
7
#include <string.h>
8
9
10
11
#define DRIVING_POWER 30
12
/* L̃}N͌ ɍ킹ĕύXKv܂ */ #define GYRO_OFFSET 0 /* WCZTItZbgl(px0[deg/sec]) */ #define LIGHT_WHITE 40 /* F̌ZTl */ #define LIGHT_BLACK 0 /* F̌ZTl */ #define SONAR_ALERT_DISTANCE 30 /* gZTɂQm[cm] */ #define TAIL_ANGLE_STAND_UP 93 /* S~̊px[x] */ #define TAIL_ANGLE_DRIVE 3 /* oXs̊px[x] */ #define P_GAIN 2.5F /* S~p[^W */ #define PWM_ABS_MAX 60 /* S~p[^PWMől */ //#define DEVICE_NAME "ET0" /* Bluetooth hrp2/target/ev3.h BLUETOOTH_LOCAL_NAMEŐݒ */ //#define PASS_KEY "1234" /* pXL[ hrp2/target/ev3.h BLUETOOTH_PIN_CODEŐݒ */ #define CMD_START '1' /* [gX^[gR}h */ #define BLACK 2 #define WHITE 47 #define GREY (BLACK+WHITE)/2 /* LCDtHgTCY */ #define CALIB_FONT (EV3_FONT_SMALL) #define CALIB_FONT_WIDTH (6/*TODO: magic number*/) #define CALIB_FONT_HEIGHT (8/*TODO: magic number*/) #define DRIVE_L EV3_PORT_C #define DRIVE_R EV3_PORT_B #define ARM EV3_PORT_A #define TAIL EV3_PORT_D #define ULTRASONIC EV3_PORT_3 #define TOUCH EV3_PORT_1 #define IR EV3_PORT_2 #define GYRO EV3_PORT_4 #define DEL 0.004 #endif /ɍ킹ĕύXKv܂ */
13
#define GYRO_OFFSET 0
/* WCZTItZbgl(px0[deg/sec]) */
14
#define LIGHT_WHITE 40
/* F̌ZTl */
15
#define LIGHT_BLACK 0
/* F̌ZTl */
16
#define SONAR_ALERT_DISTANCE 30
/* gZTɂQm[cm] */
17
#define TAIL_ANGLE_STAND_UP 93
/* S~̊px[x] */
18
#define TAIL_ANGLE_DRIVE 3
/* oXs̊px[x] */
19
#define P_GAIN 2.5F
/* S~p[^W */
20
#define PWM_ABS_MAX 60
/* S~p[^PWMől */
21
//#define DEVICE_NAME "ET0" /* Bluetooth hrp2/target/ev3.h BLUETOOTH_LOCAL_NAMEŐݒ */
22
//#define PASS_KEY "1234" /* pXL[ hrp2/target/ev3.h BLUETOOTH_PIN_CODEŐݒ */
23
#define CMD_START '1'
/* [gX^[gR}h */
24
#define BLACK 2
25
#define WHITE 47
26
#define GREY (BLACK+WHITE)/2
27
28
/* LCDtHgTCY */
29
#define CALIB_FONT (EV3_FONT_SMALL)
30
#define CALIB_FONT_WIDTH (6
/*TODO: magic number*/
)
31
#define CALIB_FONT_HEIGHT (8
/*TODO: magic number*/
)
32
33
#define DRIVE_L EV3_PORT_C
34
#define DRIVE_R EV3_PORT_B
35
#define ARM EV3_PORT_A
36
#define TAIL EV3_PORT_D
37
#define ULTRASONIC EV3_PORT_3
38
#define TOUCH EV3_PORT_1
39
#define IR EV3_PORT_2
40
#define GYRO EV3_PORT_4
41
#define DEL 0.004
42
43
#endif
44
構築:
1.8.13