This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rock_debug.c
59 lines (53 loc) · 1.59 KB
/
rock_debug.c
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef _rock_headers_h
#include "rock_headers.h"
#endif
void abort(void) {cli();while(1){m_red(ON);m_green(OFF);}}
void doUSB(void)
{
m_usb_tx_string("\n");
// if(m_usb_isconnected())
// {
// m_red(ON);
//m_usb_tx_char(97);
// m_usb_tx_int(debugVar);
// m_usb_tx_char(32);
// int i;for (i=0;i<12;i++)
// {
// m_usb_tx_uint(blobMemAddr[i]);
// m_usb_tx_char(32);
// }
if (currentTeam == RED) {
m_usb_tx_string("RED ");
} else if (currentTeam == BLUE) {
m_usb_tx_string("BLUE ");
} else {
m_usb_tx_string("NO TEAM! ");
}
// m_usb_tx_char(40);
// m_usb_tx_int(robotX);
// m_usb_tx_char(44);
// m_usb_tx_int(robotY);
// m_usb_tx_char(41);
m_usb_tx_char(32);
m_usb_tx_char(60);
m_usb_tx_int(angleOfRobot); // (X,Y) <ANGLE
m_usb_tx_char(32);
m_usb_tx_string("DUTY: ");
m_usb_tx_int(MOTOR_TIMER_OCR_R);
m_usb_tx_int(MOTOR_TIMER_OCR_L);
m_usb_tx_int(motorDutyL);
m_usb_tx_char(32);
m_usb_tx_int(motorDutyR);
m_usb_tx_string("ANGLE_TO_ENEMY_GOAL:");
m_usb_tx_int(angleToEnemyGoal);
m_usb_tx_string("\n");
// m_usb_tx_uint(robotY);
// m_usb_tx_int( angleOfRobot);
// }
//****************************
m_usb_tx_string(" ROBOT ANGLE: ");m_usb_tx_int(angleOfRobot);m_usb_tx_char(32);
m_usb_tx_string(" THETA1: ");m_usb_tx_int(angleToRobot);m_usb_tx_char(32);
m_usb_tx_string(" THETA2: ");m_usb_tx_int(theta2);m_usb_tx_char(32);
m_usb_tx_string("ROBOT COORDS: (");m_usb_tx_int(robotX);m_usb_tx_char(32);
m_usb_tx_int(robotY);m_usb_tx_string(")");m_usb_tx_char(32);
}