#include "go_task.h"
#include "TopDefine.h"
#include "FreeRTOS.h"
#include "attrTask.h"
#include <cmsis_os2.h>
#include "go.h"
#include "main.h"
#include "remote_control.h"
#include "led.h"
#include "djiMotor.h"
#include "Xiaomi.h"

#define GOUSE 1

extern RC_mess_t RC_mess;
int anglexiaomi = 0;

void Task_Go(void *argument)
{
	#if GOUSE==1
	HAL_Delay(500);              //一定时间延时 等待电机初始化完成 
	init_cybergear(&mi_motor[0], 0x01, Motion_mode);//小米电机 启动!
	//HAL_Delay(2000);
//	gimbalInit();
	//HAL_GPIO_WritePin(ledGreen_GPIO_Port,ledGreen_Pin,GPIO_PIN_RESET);

	while(1)
	{
          
		LED_green();
		LED_bule();
		motor_controlmode(&mi_motor[0], 0.5, anglexiaomi, 4, 0.5 , 0.5); //小米暂时锁住就行 
      //  gimbalFlow();
        osDelay(1);
	}
	#else
	while(1)
	{


	}
    #endif
}

