五力全開 / Mbed 2 deprecated Robotics_test1

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers setup.h Source File

setup.h

00001 
00002 
00003 void InitVars(void);
00004 
00005 
00006 void setup(void)
00007 {
00008     Bluetooth_Init();
00009     setup_Interrupt();
00010     InitVars();
00011     Stra1_Init();
00012     GREEN_BALL_MODE = !Switch_0;
00013     
00014     pc.printf("Hi");
00015 }
00016 
00017 void InitVars(void)
00018 {
00019     LeftWheelCounter = 0;
00020     RightWheelCounter = 0;
00021     LeftWheelRPM = 0;
00022     RightWheelRPM = 0;
00023     DesiredLeftWheelRPM = 0;
00024     DesiredRightWheelRPM = 0;
00025     TargetCoordinateValid = false;
00026     Goal_1_Coordinate[0] = FieldLength;
00027     Goal_1_Coordinate[1] = FieldWidth/2;
00028     Goal_2_Coordinate[0] = 0;
00029     Goal_2_Coordinate[1] = FieldWidth/2;
00030     NowDirectionInRad = 0;
00031     NowCoordinate[0] = 0;
00032     NowCoordinate[1] = 0;
00033     SelfRotation = 0;
00034 }