Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 125 → Rev 126

/bots/Stinger/DebugKey.c
9,11 → 9,13
#define DEBUG 1
 
#include "Stinger.h"
#include "Debug.h"
#include "DebugKey.h"
#include "Delay.h"
#include "Log.h"
#include "Motor.h"
#include "Puts.h"
#include "Sensor.h"
#include "Timer.h"
#include "Uart.h"
 
#if DEBUG
/bots/Stinger/MiniSumo.c
93,16 → 93,14
 
InitUART();
 
ADC_Init( ADC_PRESCALAR_AUTO );
InitSensors();
InitLED();
 
DBG( "******************************\n" );
DBG( "** **\n" );
DBG( "** Stinger MiniSumo Program **\n" );
DBG( "** **\n" );
DBG( "******************************\n\n" );
 
Log( "**\n" );
Log( "** Stinger MiniSumo Program **\n" );
Log( "**\n" );
 
InitTimer();
InitMotors();
 
/bots/Stinger/Avoid.c
14,6 → 14,7
#include "Log.h"
#include "Motor.h"
#include "Sensor.h"
#include "Timer.h"
 
// ---- Private Constants and Types -----------------------------------------
// ---- Private Variables ---------------------------------------------------
/bots/Stinger/Sensor.c
11,6 → 11,7
#include "Stinger.h"
#include "adc.h"
#include "Debug.h"
#include "Delay.h"
#include "Log.h"
#include "Sensor.h"
 
63,6 → 64,11
ClearBits( DDRD, pins ); // Configure inputs
ClearBits( PORTD, pins ); // Disable pullups
}
ADC_Init( ADC_PRESCALAR_AUTO );
 
// Delay for a short time to allow the ADC to initialize
 
ms_spin( 1 );
}
 
uns8 PgmSelect( void )
108,15 → 114,15
{
// Read the line sensors
 
gLineLO = a2d( LineLeftOutside );
gLineLI = a2d( LineLeftInside );
gLineRI = a2d( LineRightInside );
gLineRO = a2d( LineRightOutside );
gLineLO = ADC_Read( LineLeftOutside );
gLineLI = ADC_Read( LineLeftInside );
gLineRI = ADC_Read( LineRightInside );
gLineRO = ADC_Read( LineRightOutside );
 
// Read the Eye sensors
 
gEyeR = a2d( EyeR );
gEyeL = a2d( EyeL );
gEyeR = ADC_Read( EyeR );
gEyeL = ADC_Read( EyeL );
 
gPortD = PIND;
 
/bots/Stinger/Config.h
14,7 → 14,7
#define CFG_LOG_USE_STDIO 0
#define CFG_LOG_ALLOW_DEFERRED_NL 1
 
#define CFG_ADC_8_BIT 0
#define CFG_ADC_8_BIT 1
#define CFG_ADC_POLL 0
#define CFG_ADC_AVERAGE 1
 
/bots/Stinger/Debug.h
10,7 → 10,7
#define DEBUG_H
 
#if !defined( DEBUG )
#define DEBUG 1
#define DEBUG 0
#endif