daad
Dependencies: mbed TrapezoidControl QEI
System/Process/Process.h@14:93776ca449a4, 2018-10-25 (annotated)
- Committer:
- 7ka884
- Date:
- Thu Oct 25 09:00:19 2018 +0000
- Revision:
- 14:93776ca449a4
- Parent:
- 13:b6e02d6261d7
okok
Who changed what in which revision?
User | Revision | Line number | New 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(); |
7ka884 | 4:ba9df71868df | 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] |
7ka884 | 4:ba9df71868df | 10 | */ |
t_yamamoto | 0:669ef71cba68 | 11 | |
kishibekairohan | 12:c09b3e08a316 | 12 | #define BUZZER_PIN PA_15 //ブザー |
kishibekairohan | 12:c09b3e08a316 | 13 | |
kishibekairohan | 12:c09b3e08a316 | 14 | #define TIRE_FR 0 //足回り前右 |
kishibekairohan | 12:c09b3e08a316 | 15 | #define TIRE_FL 1 //足回り前左 |
kishibekairohan | 12:c09b3e08a316 | 16 | #define TIRE_BR 2 //足回り後右 |
kishibekairohan | 12:c09b3e08a316 | 17 | #define TIRE_BL 3 //足回り後左 |
kishibekairohan | 12:c09b3e08a316 | 18 | #define Angle_R 4 //角度調節右 |
kishibekairohan | 12:c09b3e08a316 | 19 | #define Angle_L 5 //角度調節左 |
kishibekairohan | 12:c09b3e08a316 | 20 | |
kishibekairohan | 12:c09b3e08a316 | 21 | #define Lim_AR 3 //角度調節右 |
kishibekairohan | 12:c09b3e08a316 | 22 | #define Lim_AL 4 //角度調節左 |
kishibekairohan | 12:c09b3e08a316 | 23 | #define Lim_R 0 //センター右 |
kishibekairohan | 12:c09b3e08a316 | 24 | #define Lim_L 1 //センター左 |
kishibekairohan | 12:c09b3e08a316 | 25 | #define EMS_0 LimitSw::IsPressed(8) //非常停止ブザー0 |
kishibekairohan | 12:c09b3e08a316 | 26 | #define EMS_1 LimitSw::IsPressed(9) //非常停止ブザー1 |
kishibekairohan | 13:b6e02d6261d7 | 27 | #define RedSW LimitSw::IsPressed(7) //赤ゾーン用スイッチ |
kishibekairohan | 13:b6e02d6261d7 | 28 | #define BlueSW LimitSw::IsPressed(6) //青ゾーン用スイッチ |
t_yamamoto | 0:669ef71cba68 | 29 | |
7ka884 | 14:93776ca449a4 | 30 | #define ROTATE_PER_REVOLUTIONS 50 //ロタコン解像度 |
7ka884 | 14:93776ca449a4 | 31 | |
7ka884 | 14:93776ca449a4 | 32 | #define startP 35 |
7ka884 | 14:93776ca449a4 | 33 | |
7ka884 | 14:93776ca449a4 | 34 | |
t_yamamoto | 0:669ef71cba68 | 35 | |
kishibekairohan | 11:028a150943b5 | 36 | typedef union |
kishibekairohan | 11:028a150943b5 | 37 | { |
kishibekairohan | 11:028a150943b5 | 38 | struct |
kishibekairohan | 11:028a150943b5 | 39 | { |
kishibekairohan | 11:028a150943b5 | 40 | unsigned int blue : 8; |
kishibekairohan | 11:028a150943b5 | 41 | unsigned int green : 8; |
kishibekairohan | 11:028a150943b5 | 42 | unsigned int red : 8; |
kishibekairohan | 11:028a150943b5 | 43 | unsigned int : 8; |
kishibekairohan | 11:028a150943b5 | 44 | }; |
kishibekairohan | 11:028a150943b5 | 45 | uint32_t code; |
kishibekairohan | 11:028a150943b5 | 46 | } TapeLedData; |
kishibekairohan | 11:028a150943b5 | 47 | |
kishibekairohan | 11:028a150943b5 | 48 | enum TapeLED_Mode |
kishibekairohan | 11:028a150943b5 | 49 | { |
kishibekairohan | 11:028a150943b5 | 50 | EMS, |
kishibekairohan | 11:028a150943b5 | 51 | Normal, |
kishibekairohan | 11:028a150943b5 | 52 | Launch, |
kishibekairohan | 11:028a150943b5 | 53 | }; |
kishibekairohan | 11:028a150943b5 | 54 | |
kishibekairohan | 11:028a150943b5 | 55 | enum TapeLED_Color |
kishibekairohan | 11:028a150943b5 | 56 | { |
kishibekairohan | 11:028a150943b5 | 57 | Black = 0x000000, |
kishibekairohan | 11:028a150943b5 | 58 | // Red = 0xff0000, |
kishibekairohan | 11:028a150943b5 | 59 | Green = 0x008000, |
kishibekairohan | 11:028a150943b5 | 60 | Blue = 0x0000ff, |
kishibekairohan | 11:028a150943b5 | 61 | White = 0xffffff, |
kishibekairohan | 11:028a150943b5 | 62 | // Orange = 0xffa500, |
kishibekairohan | 11:028a150943b5 | 63 | // Yellow = 0xffff00, |
kishibekairohan | 11:028a150943b5 | 64 | // Purple = 0x800080, |
kishibekairohan | 11:028a150943b5 | 65 | // Cyan = 0x00ffff, |
kishibekairohan | 11:028a150943b5 | 66 | // Magenta = 0xff00ff, |
kishibekairohan | 11:028a150943b5 | 67 | // Lime = 0x00ff00 |
t_yamamoto | 0:669ef71cba68 | 68 | |
t_yamamoto | 0:669ef71cba68 | 69 | |
kishibekairohan | 11:028a150943b5 | 70 | Dimgray = 0x696969, |
kishibekairohan | 11:028a150943b5 | 71 | Gray = 0x808080, |
kishibekairohan | 11:028a150943b5 | 72 | DarkGray = 0xa9a9a9, |
kishibekairohan | 11:028a150943b5 | 73 | Silver = 0xc0c0c0, |
kishibekairohan | 11:028a150943b5 | 74 | LightGray = 0xd3d3d3, |
kishibekairohan | 11:028a150943b5 | 75 | Gainsboro = 0xdcdcdc, |
kishibekairohan | 11:028a150943b5 | 76 | Whitesmoke = 0xf5f5f5, |
kishibekairohan | 11:028a150943b5 | 77 | Snow = 0xfffafa, |
kishibekairohan | 11:028a150943b5 | 78 | Ghostwhite = 0xf8f8ff, |
kishibekairohan | 11:028a150943b5 | 79 | Floralwhite = 0xfffaf0, |
kishibekairohan | 11:028a150943b5 | 80 | Linen = 0xfaf0e6, |
kishibekairohan | 11:028a150943b5 | 81 | Antiquewhite = 0xfaebd7, |
kishibekairohan | 11:028a150943b5 | 82 | Papayawhip = 0xffefd5, |
kishibekairohan | 11:028a150943b5 | 83 | Blanchedalmond = 0xffebcd, |
kishibekairohan | 11:028a150943b5 | 84 | Bisque = 0xffe4c4, |
kishibekairohan | 11:028a150943b5 | 85 | Moccasin = 0xffe4b5, |
kishibekairohan | 11:028a150943b5 | 86 | Navajowhite = 0xffdead, |
kishibekairohan | 11:028a150943b5 | 87 | Peachpuff = 0xffdab9, |
kishibekairohan | 11:028a150943b5 | 88 | Mistyrose = 0xffe4e1, |
kishibekairohan | 11:028a150943b5 | 89 | Lavenderblush = 0xfff0f5, |
kishibekairohan | 11:028a150943b5 | 90 | Seashell = 0xfff5ee, |
kishibekairohan | 11:028a150943b5 | 91 | Oldlace = 0xfdf5e6, |
kishibekairohan | 11:028a150943b5 | 92 | Ivory = 0xfffff0, |
kishibekairohan | 11:028a150943b5 | 93 | Honeydew = 0xf0fff0, |
kishibekairohan | 11:028a150943b5 | 94 | Mintcream = 0xf5fffa, |
kishibekairohan | 11:028a150943b5 | 95 | Azure = 0xf0ffff, |
kishibekairohan | 11:028a150943b5 | 96 | Aliceblue = 0xf0f8ff, |
kishibekairohan | 11:028a150943b5 | 97 | Lavender = 0xe6e6fa, |
kishibekairohan | 11:028a150943b5 | 98 | Lightsteelblue = 0xb0c4de, |
kishibekairohan | 11:028a150943b5 | 99 | Lightslategray = 0x778899, |
kishibekairohan | 11:028a150943b5 | 100 | Slategray = 0x708090, |
kishibekairohan | 11:028a150943b5 | 101 | Steelblue = 0x4682b4, |
kishibekairohan | 11:028a150943b5 | 102 | Royalblue = 0x4169e1, |
kishibekairohan | 11:028a150943b5 | 103 | Midnightblue = 0x191970, |
kishibekairohan | 11:028a150943b5 | 104 | Navy = 0x000080, |
kishibekairohan | 11:028a150943b5 | 105 | Darkblue = 0x00008b, |
kishibekairohan | 11:028a150943b5 | 106 | Mediumblue = 0x0000cd, |
kishibekairohan | 11:028a150943b5 | 107 | Dodgerblue = 0x1e90ff, |
kishibekairohan | 11:028a150943b5 | 108 | Cornflowerblue = 0x6495ed, |
kishibekairohan | 11:028a150943b5 | 109 | Deepskyblue = 0x00bfff, |
kishibekairohan | 11:028a150943b5 | 110 | Lightskyblue = 0x87cefa, |
kishibekairohan | 11:028a150943b5 | 111 | Skyblue = 0x87ceeb, |
kishibekairohan | 11:028a150943b5 | 112 | Lightblue = 0xadd8e6, |
kishibekairohan | 11:028a150943b5 | 113 | Powderblue = 0xb0e0e6, |
kishibekairohan | 11:028a150943b5 | 114 | Paleturquoise = 0xafeeee, |
kishibekairohan | 11:028a150943b5 | 115 | // Lightcyan = 0xe0ffff, |
kishibekairohan | 11:028a150943b5 | 116 | Cyan = 0x00ffff, |
kishibekairohan | 11:028a150943b5 | 117 | // Aqua = 0x00ffff, |
kishibekairohan | 11:028a150943b5 | 118 | Turquoise = 0x40e0d0, |
kishibekairohan | 11:028a150943b5 | 119 | Mediumturquoise = 0x48d1cc, |
kishibekairohan | 11:028a150943b5 | 120 | Darkturquoise = 0x00ced1, |
kishibekairohan | 11:028a150943b5 | 121 | Lightseagreen = 0x20b2aa, |
kishibekairohan | 11:028a150943b5 | 122 | Cabetblue = 0x5f9ea0, |
kishibekairohan | 11:028a150943b5 | 123 | Darkcyan = 0x008b8b, |
kishibekairohan | 11:028a150943b5 | 124 | Teal = 0x008080, |
kishibekairohan | 11:028a150943b5 | 125 | Darkslategray = 0x2f4f4f, |
kishibekairohan | 11:028a150943b5 | 126 | Darkgreen = 0x006400, |
kishibekairohan | 11:028a150943b5 | 127 | Forestgreen = 0x228b22, |
kishibekairohan | 11:028a150943b5 | 128 | Seagreen = 0x2e8b57, |
kishibekairohan | 11:028a150943b5 | 129 | Mediumseagreen = 0x3cb371, |
kishibekairohan | 11:028a150943b5 | 130 | Mediumaquamarine = 0x66cdaa, |
kishibekairohan | 11:028a150943b5 | 131 | Darkseagreen = 0x8fbc8f, |
kishibekairohan | 11:028a150943b5 | 132 | Aquamarine = 0x7fffd4, |
kishibekairohan | 11:028a150943b5 | 133 | Palegreen = 0x98fb98, |
kishibekairohan | 11:028a150943b5 | 134 | Lightgreen = 0x90ee90, |
kishibekairohan | 11:028a150943b5 | 135 | Springgreen = 0x00ff7f, |
kishibekairohan | 11:028a150943b5 | 136 | Mediumspringgreen = 0x00fa9a, |
kishibekairohan | 11:028a150943b5 | 137 | Lawngreen = 0x7cfc00, |
kishibekairohan | 11:028a150943b5 | 138 | Chartreuse = 0x7fff00, |
kishibekairohan | 11:028a150943b5 | 139 | Greenyellow = 0xadff2f, |
kishibekairohan | 11:028a150943b5 | 140 | Lime = 0x00ff00, |
kishibekairohan | 11:028a150943b5 | 141 | Limegreen = 0x32cd32, |
kishibekairohan | 11:028a150943b5 | 142 | Yellowgreen = 0x9acd32, |
kishibekairohan | 11:028a150943b5 | 143 | Darkolivegreen = 0x556b2f, |
kishibekairohan | 11:028a150943b5 | 144 | Olivedrab = 0x6b8e23, |
kishibekairohan | 11:028a150943b5 | 145 | Olive = 0x808000, |
kishibekairohan | 11:028a150943b5 | 146 | Darkkhaki = 0xbdb76b, |
kishibekairohan | 11:028a150943b5 | 147 | Palegoldenrod = 0xeee8aa, |
kishibekairohan | 11:028a150943b5 | 148 | Cornsilk = 0xfff8dc, |
kishibekairohan | 11:028a150943b5 | 149 | Beige = 0xf5f5dc, |
kishibekairohan | 11:028a150943b5 | 150 | Lightyellow = 0xffffe0, |
kishibekairohan | 11:028a150943b5 | 151 | Lightgoldenrodyellow = 0xfafad2, |
kishibekairohan | 11:028a150943b5 | 152 | Lemonchiffon = 0xfffacd, |
kishibekairohan | 11:028a150943b5 | 153 | Wheat = 0xf5deb3, |
kishibekairohan | 11:028a150943b5 | 154 | Burlywood = 0xdeb887, |
kishibekairohan | 11:028a150943b5 | 155 | Tan = 0xd2b48c, |
kishibekairohan | 11:028a150943b5 | 156 | Khaki = 0xf0e68c, |
kishibekairohan | 11:028a150943b5 | 157 | Yellow = 0xffff00, |
kishibekairohan | 11:028a150943b5 | 158 | Gold = 0xffd700, |
kishibekairohan | 11:028a150943b5 | 159 | // Orange = 0xffa500, |
kishibekairohan | 11:028a150943b5 | 160 | Orange = 0xff2500, |
kishibekairohan | 11:028a150943b5 | 161 | Sandybrown = 0xf4a460, |
kishibekairohan | 11:028a150943b5 | 162 | Darkorange = 0xff8c00, |
kishibekairohan | 11:028a150943b5 | 163 | Goldenrod = 0xdaa520, |
kishibekairohan | 11:028a150943b5 | 164 | Peru = 0xcd853f, |
kishibekairohan | 11:028a150943b5 | 165 | Darkgoldenrod = 0xb8860d, |
kishibekairohan | 11:028a150943b5 | 166 | Chocolate = 0xd2691e, |
kishibekairohan | 11:028a150943b5 | 167 | Sienna = 0xa0522d, |
kishibekairohan | 11:028a150943b5 | 168 | Saddlebrown = 0x8b4513, |
kishibekairohan | 11:028a150943b5 | 169 | Marron = 0x800000, |
kishibekairohan | 11:028a150943b5 | 170 | Darkred = 0x8b0000, |
kishibekairohan | 11:028a150943b5 | 171 | Brown = 0xa52a2a, |
kishibekairohan | 11:028a150943b5 | 172 | Firebrick = 0xb22222, |
kishibekairohan | 11:028a150943b5 | 173 | Indeanred = 0xcd5c5c, |
kishibekairohan | 11:028a150943b5 | 174 | Rosybrown = 0xbc8f8f, |
kishibekairohan | 11:028a150943b5 | 175 | Darksalmon = 0xe9967a, |
kishibekairohan | 11:028a150943b5 | 176 | Lightcoral = 0xf08080, |
kishibekairohan | 11:028a150943b5 | 177 | Salmon = 0xfa8072, |
kishibekairohan | 11:028a150943b5 | 178 | Lightsalmon = 0xffa07a, |
kishibekairohan | 11:028a150943b5 | 179 | Coral = 0xff7f50, |
kishibekairohan | 11:028a150943b5 | 180 | Tomato = 0xff6347, |
kishibekairohan | 11:028a150943b5 | 181 | Orangered = 0xff4500, |
kishibekairohan | 11:028a150943b5 | 182 | Red = 0xff0000, |
kishibekairohan | 11:028a150943b5 | 183 | Crimson = 0xdc143c, |
kishibekairohan | 11:028a150943b5 | 184 | Mediumvioletred = 0xc71585, |
kishibekairohan | 11:028a150943b5 | 185 | Deeppink = 0xff1493, |
kishibekairohan | 11:028a150943b5 | 186 | Hotpink = 0xff69b4, |
kishibekairohan | 11:028a150943b5 | 187 | Palevioletred = 0xdb7093, |
kishibekairohan | 11:028a150943b5 | 188 | Pink = 0xffc0cb, |
kishibekairohan | 11:028a150943b5 | 189 | Lightpink = 0xffb6c1, |
kishibekairohan | 11:028a150943b5 | 190 | Thistle = 0xd8bfd8, |
kishibekairohan | 11:028a150943b5 | 191 | Magenta = 0xff00ff, |
kishibekairohan | 11:028a150943b5 | 192 | // Fuchsia = 0xff00ff, |
kishibekairohan | 11:028a150943b5 | 193 | Violet = 0xee82ee, |
kishibekairohan | 11:028a150943b5 | 194 | Plum = 0xdda0dd, |
kishibekairohan | 11:028a150943b5 | 195 | Orchid = 0xda70d6, |
kishibekairohan | 11:028a150943b5 | 196 | Mediumorchid = 0xba55d3, |
kishibekairohan | 11:028a150943b5 | 197 | Darkorchid = 0x9932cc, |
kishibekairohan | 11:028a150943b5 | 198 | Darkviolet = 0x9400d3, |
kishibekairohan | 11:028a150943b5 | 199 | Darkmagenta = 0x8b008b, |
kishibekairohan | 11:028a150943b5 | 200 | Purple = 0x800080, |
kishibekairohan | 11:028a150943b5 | 201 | Indigo = 0x4b0082, |
kishibekairohan | 11:028a150943b5 | 202 | Darkslateblue = 0x483d8b, |
kishibekairohan | 11:028a150943b5 | 203 | Blueviolet = 0x8a2be2, |
kishibekairohan | 11:028a150943b5 | 204 | Mediumpurple = 0x9370db, |
kishibekairohan | 11:028a150943b5 | 205 | Slateblue = 0x6a5acd, |
kishibekairohan | 11:028a150943b5 | 206 | Mediumslateblue = 0x7b68ee |
kishibekairohan | 11:028a150943b5 | 207 | }; |
kishibekairohan | 11:028a150943b5 | 208 | |
kishibekairohan | 11:028a150943b5 | 209 | extern TapeLedData sendLedData; |
kishibekairohan | 12:c09b3e08a316 | 210 | |
t_yamamoto | 0:669ef71cba68 | 211 | #endif |