Log in Page Discussion History Go to the site toolbox

Spike293/Programming/IP-7-2-2008-8722/spike floor switch.h

From BluWiki

from Spike293/Programming/IP-7-2-2008-8722


/*
 * spike_floor_switch.h
 *
 * Created for IntProj-7-2-2008
 *
 * Slow Loop Routines:
 *   - Reset_Position_Routine()
 *
 * Config Parameters:
 *   - SWITCH_WIDTH
 *
 */

#ifndef _spike_floor_switch_h
#define _spike_floor_switch_h 1

#include "spike_config.h"
#include "spike_trig.h"
#include "spike_position_finder.h"
#include "spike_drive_train.h"

#include <timers.h>

/*
 * The correction we perform
 *
 */
extern int heading_error;
extern int new_heading;

extern char got_one_floor_switch;
extern char got_two_floor_switches;
extern char first_to_cross;

extern char line_calculation_done;
extern long timer_delay;

/*
 * Sets up the necessary interrupts and timers
 *
 */
extern void Floor_Switch_Init(void);

/*
 * SLOW LOOP routine.
 *
 * Called in the time when the robot is expected to
 * be crossing the white line
 *
 * This will cause heading_error to be modified. spike_position_finder
 * adds heading_error to the heading from now on
 *
 */
extern void Floor_Switch_Routine(void);

#endif /* defined _spike_floor_switch_h */

Site Toolbox:

Personal tools
GNU Free Documentation License 1.2
This page was last modified on 18 February 2008, at 22:08.
Disclaimers - About BluWiki