Project

General

Profile

Revision 120

Seems to work until we get to seeking, where there may be issues with the motors.

View differences:

recharge.c
28 28
void recharge_init(void)
29 29
{
30 30
	wl_recharge_register();
31
	recharge_i2c_init();
31
	//TODO: uncomment to use homing sensor
32
	//recharge_i2c_init();
32 33
}
33 34

  
34 35
/**
......
86 87
	if (old_state != wl_recharge_get_state())
87 88
	{
88 89
		old_state = wl_recharge_get_state();
89
		RECHARGE_DEBUG_PUTI(old_state);
90
		switch (wl_recharge_get_state())
90
		switch (old_state)
91 91
		{
92 92
			case NOT_RECHARGING:
93
				RECHARGE_DEBUG_PRINT("Not recharging.\n");
93 94
				orb_set_color(GREEN);
94 95
				break;
95 96
			case POLLING:
97
				RECHARGE_DEBUG_PRINT("Polling available stations.\n");
98
				orb_set_color(CYAN);
99
				break;
96 100
			case REQUESTING:
101
				RECHARGE_DEBUG_PRINT("Requesting a station.\n");
97 102
				orb_set_color(RED);
98
				//we shouldn't be in this state
99 103
				break;
100 104
			case SEEKING:
105
				RECHARGE_DEBUG_PRINT("Seeking.\n");
101 106
				orb_set_color(YELLOW);
102 107
				break;
103 108
			case DOCKED:
109
				RECHARGE_DEBUG_PRINT("Docked.\n");
104 110
				orb_set_color(BLUE);
105 111
				break;
106 112
			case DEPARTING:
113
				RECHARGE_DEBUG_PRINT("Departing.\n");
107 114
				orb_set_color(PURPLE);
108 115
				break;
109 116
			default:

Also available in: Unified diff