ETrobocon2017 - 片山研究所モデルベース開発推進事業部
マクロ定義
common_definition.h ファイル
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
common_definition.h の依存先関係図:

[ソースコード]

マクロ定義

#define DRIVING_POWER   30
 
#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 CMD_START   '1' /* [gX^[gR}h */
 
#define BLACK   2
 
#define WHITE   47
 
#define GREY   (BLACK+WHITE)/2
 
#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
 

マクロ定義詳解

◆ ARM

#define ARM   EV3_PORT_A

common_definition.h35 行目に定義があります。

◆ BLACK

#define BLACK   2

common_definition.h24 行目に定義があります。

◆ CALIB_FONT

#define CALIB_FONT   (EV3_FONT_SMALL)

common_definition.h29 行目に定義があります。

◆ CALIB_FONT_HEIGHT

#define CALIB_FONT_HEIGHT   (8/*TODO: magic number*/)

common_definition.h31 行目に定義があります。

◆ CALIB_FONT_WIDTH

#define CALIB_FONT_WIDTH   (6/*TODO: magic number*/)

common_definition.h30 行目に定義があります。

◆ CMD_START

#define CMD_START   '1' /* [gX^[gR}h */

common_definition.h23 行目に定義があります。

◆ DEL

#define DEL   0.004

common_definition.h41 行目に定義があります。

◆ DRIVE_L

#define DRIVE_L   EV3_PORT_C

common_definition.h33 行目に定義があります。

◆ DRIVE_R

#define DRIVE_R   EV3_PORT_B

common_definition.h34 行目に定義があります。

◆ DRIVING_POWER

#define DRIVING_POWER   30

common_definition.h11 行目に定義があります。

◆ GREY

#define GREY   (BLACK+WHITE)/2

common_definition.h26 行目に定義があります。

◆ GYRO

#define GYRO   EV3_PORT_4

common_definition.h40 行目に定義があります。

◆ GYRO_OFFSET

#define GYRO_OFFSET   0 /* WCZTItZbgl(px0[deg/sec]) */

common_definition.h13 行目に定義があります。

◆ IR

#define IR   EV3_PORT_2

common_definition.h39 行目に定義があります。

◆ LIGHT_BLACK

#define LIGHT_BLACK   0 /* F̌ZTl */

common_definition.h15 行目に定義があります。

◆ LIGHT_WHITE

#define LIGHT_WHITE   40 /* F̌ZTl */

common_definition.h14 行目に定義があります。

◆ P_GAIN

#define P_GAIN   2.5F /* S~p[^W */

common_definition.h19 行目に定義があります。

◆ PWM_ABS_MAX

#define PWM_ABS_MAX   60 /* S~p[^PWM΍ől */

common_definition.h20 行目に定義があります。

◆ SONAR_ALERT_DISTANCE

#define SONAR_ALERT_DISTANCE   30 /* gZTɂQm[cm] */

common_definition.h16 行目に定義があります。

◆ TAIL

#define TAIL   EV3_PORT_D

common_definition.h36 行目に定義があります。

◆ TAIL_ANGLE_DRIVE

#define TAIL_ANGLE_DRIVE   3 /* oXs̊px[x] */

common_definition.h18 行目に定義があります。

◆ TAIL_ANGLE_STAND_UP

#define TAIL_ANGLE_STAND_UP   93 /* S~̊px[x] */

common_definition.h17 行目に定義があります。

◆ TOUCH

#define TOUCH   EV3_PORT_1

common_definition.h38 行目に定義があります。

◆ ULTRASONIC

#define ULTRASONIC   EV3_PORT_3

common_definition.h37 行目に定義があります。

◆ WHITE

#define WHITE   47

common_definition.h25 行目に定義があります。