aa

Dependencies:   mbed TrapezoidControl QEI

Committer:
yabahiro
Date:
Thu Sep 26 09:56:28 2019 +0000
Revision:
38:391a0c8e4c16
Parent:
37:7cfa39c41245
aa

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