Project

General

Profile

Revision 733

Added by Chris Mar almost 16 years ago

reverted projects/template/ directory to pre-demo state. moved run_around demo code into behaviors/smart_run_around_fsm/ directory.

View differences:

smart_run_around_fsm.c
11 11
void run_around_init(void)
12 12
{
13 13
  range_init();
14
  analog_init();
15
  motors_init();
16
  orb_init();
17
  orb_enable();
18
  usb_init();
19 14
 
20 15
  /*Start in the default state, MOVING*/ 
21 16
  avoid_state=MOVING;
22 17
  /*Set timers to their maximum values.*/
23 18
  crazy_count=CRAZY_MAX;
24
  backup_count=0; 
19
  backup_count=BACKUP_MAX; 
25 20
  pControl=0;
26 21
  
27 22
  /*Initialize distances to zero.*/ 
......
123 118
      move(STRAIT_SPEED,-pControl);
124 119
      break;
125 120
    
126
    case(BACKWARDS): orb_set_color(ORANGE);
127
      move(-STRAIT_SPEED,0);
121
    case(BACKWARDS): orb_set_color(MAGENTA);
122
      move(-STRAIT_SPEED-50,0);
128 123
      break;
129 124
      
130 125
    case(CRAZY): orb_set_color(RED);

Also available in: Unified diff