summaryrefslogtreecommitdiffstats
path: root/src/auto.c
blob: 1be01efb57de705601c42454da64f3884e0fdff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <main.h>
#include <zephyr.c>

#define TARGET_RPM 1700

void autonomous(){
	/*static double cl,cr,ca;
	static char speed;

	speed = 30;

	do{
		speed += 10;
		zMotorSet("Left cannon",-speed);
		zMotorSet("Right cannon",speed);
		delay(800);
		cl =  zMotorIMEGetVelocity("Left cannon")  / 16.3333125L * 9;
		cr = -zMotorIMEGetVelocity("Right cannon") / 16.3333125L * 9;
		ca = (cl + cr) / 2;
	}while(ca < TARGET_RPM);

	zMotorSet("Misc",127);
	delay(900);
	zMotorSet("Misc",-127);
	delay(900);
	zMotorSet("Misc",0);

	motorStopAll();*/
}