daad

Dependencies:   mbed TrapezoidControl QEI

Committer:
t_yamamoto
Date:
Sat Sep 08 06:05:22 2018 +0000
Revision:
0:669ef71cba68
Child:
4:ba9df71868df
Child:
5:3ae504b88679
???????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
t_yamamoto 0:669ef71cba68 1 #ifndef PROCESS_H_
t_yamamoto 0:669ef71cba68 2 #define PROCESS_H_
t_yamamoto 0:669ef71cba68 3
t_yamamoto 0:669ef71cba68 4 #include "mbed.h"
t_yamamoto 0:669ef71cba68 5
t_yamamoto 0:669ef71cba68 6 void SystemProcess();
t_yamamoto 0:669ef71cba68 7
t_yamamoto 0:669ef71cba68 8 #define ROLLER_LF motor[ROLLER_LF_NUM]
t_yamamoto 0:669ef71cba68 9 #define ROLLER_LL motor[ROLLER_LL_NUM]
t_yamamoto 0:669ef71cba68 10 #define ROLLER_LB motor[ROLLER_LB_NUM]
t_yamamoto 0:669ef71cba68 11 #define ROLLER_LR motor[ROLLER_LR_NUM]
t_yamamoto 0:669ef71cba68 12 #define ROLLER_CF motor[ROLLER_CF_NUM]
t_yamamoto 0:669ef71cba68 13 #define ROLLER_CL motor[ROLLER_CL_NUM]
t_yamamoto 0:669ef71cba68 14 #define ROLLER_CB motor[ROLLER_CB_NUM]
t_yamamoto 0:669ef71cba68 15 #define ROLLER_CR motor[ROLLER_CR_NUM]
t_yamamoto 0:669ef71cba68 16 #define ROLLER_RF motor[ROLLER_RF_NUM]
t_yamamoto 0:669ef71cba68 17 #define ROLLER_RL motor[ROLLER_RL_NUM]
t_yamamoto 0:669ef71cba68 18 #define ROLLER_RB motor[ROLLER_RB_NUM]
t_yamamoto 0:669ef71cba68 19 #define ROLLER_RR motor[ROLLER_RR_NUM]
t_yamamoto 0:669ef71cba68 20
t_yamamoto 0:669ef71cba68 21 #define ROLLER_LF_NUM 8
t_yamamoto 0:669ef71cba68 22 #define ROLLER_LL_NUM 9
t_yamamoto 0:669ef71cba68 23 #define ROLLER_LB_NUM 13
t_yamamoto 0:669ef71cba68 24 #define ROLLER_LR_NUM 14
t_yamamoto 0:669ef71cba68 25 #define ROLLER_CF_NUM 15
t_yamamoto 0:669ef71cba68 26 #define ROLLER_CL_NUM 16
t_yamamoto 0:669ef71cba68 27 #define ROLLER_CB_NUM 17
t_yamamoto 0:669ef71cba68 28 #define ROLLER_CR_NUM 18
t_yamamoto 0:669ef71cba68 29 #define ROLLER_RF_NUM 19
t_yamamoto 0:669ef71cba68 30 #define ROLLER_RL_NUM 20
t_yamamoto 0:669ef71cba68 31 #define ROLLER_RB_NUM 21
t_yamamoto 0:669ef71cba68 32 #define ROLLER_RR_NUM 22
t_yamamoto 0:669ef71cba68 33
t_yamamoto 0:669ef71cba68 34 #define FRONT_R tire[0]
t_yamamoto 0:669ef71cba68 35 #define FRONT_L tire[1]
t_yamamoto 0:669ef71cba68 36 #define REAR_L tire[2]
t_yamamoto 0:669ef71cba68 37 #define REAR_R tire[3]
t_yamamoto 0:669ef71cba68 38
t_yamamoto 0:669ef71cba68 39 #define TIRE_FR motor[0]
t_yamamoto 0:669ef71cba68 40 #define TIRE_FL motor[1]
t_yamamoto 0:669ef71cba68 41 #define TIRE_RL motor[2]
t_yamamoto 0:669ef71cba68 42 #define TIRE_RR motor[3]
t_yamamoto 0:669ef71cba68 43 #define STR_FR motor[4]
t_yamamoto 0:669ef71cba68 44 #define STR_FL motor[5]
t_yamamoto 0:669ef71cba68 45 #define STR_RL motor[6]
t_yamamoto 0:669ef71cba68 46 #define STR_RR motor[7]
t_yamamoto 0:669ef71cba68 47
t_yamamoto 0:669ef71cba68 48 #define SENSOR_FR POTENTIOMETER::adc[1].read_u16()
t_yamamoto 0:669ef71cba68 49 #define SENSOR_FL (POTENTIOMETER::adc[2].read_u16() / 65535.0 * 1024.0)
t_yamamoto 0:669ef71cba68 50 #define SENSOR_RL POTENTIOMETER::adc[3]
t_yamamoto 0:669ef71cba68 51 #define SENSOR_RR POTENTIOMETER::adc[4]
t_yamamoto 0:669ef71cba68 52
t_yamamoto 0:669ef71cba68 53 #define PLUS90_FR 605
t_yamamoto 0:669ef71cba68 54 // #define PLUS90_FL 31100
t_yamamoto 0:669ef71cba68 55 #define PLUS90_FL 480
t_yamamoto 0:669ef71cba68 56 #define PLUS90_RL 505
t_yamamoto 0:669ef71cba68 57 #define PLUS90_RR 550
t_yamamoto 0:669ef71cba68 58
t_yamamoto 0:669ef71cba68 59 #define ZERO_FR 880
t_yamamoto 0:669ef71cba68 60 // #define ZERO_FL 48800
t_yamamoto 0:669ef71cba68 61 #define ZERO_FL 760
t_yamamoto 0:669ef71cba68 62 #define ZERO_RL 775
t_yamamoto 0:669ef71cba68 63 #define ZERO_RR 800
t_yamamoto 0:669ef71cba68 64
t_yamamoto 0:669ef71cba68 65 extern Timer rollerTimer[4];
t_yamamoto 0:669ef71cba68 66 extern float rollerSpeed[4];
t_yamamoto 0:669ef71cba68 67
t_yamamoto 0:669ef71cba68 68
t_yamamoto 0:669ef71cba68 69 #endif