Project

General

Profile

Revision 1115

Added by Rich Hong about 15 years ago

Smart run around mostly works!!!

Thanks to Brian for fixing a bug in motion code
divide by 0 zero error in motion.c

Makefile cleans .csim and copy it over

GUI no longer fill the robot

View differences:

rangefinder.c
59 59
// hacky conversion
60 60
#define IR_MAX 800
61 61
#define IR_MIN 100
62
#define IR_CONVERSION_FACTOR 2.0
62
#define IR_CONVERSION_FACTOR 1.0
63 63

  
64 64
void range_init(void)
65 65
{
......
92 92
	}
93 93
	ir_value = ((temp / IR_CONVERSION_FACTOR) + IR_MIN);
94 94
	ir_value = ir_value > IR_MAX ? IR_MAX : ir_value;
95
	printf("[%d]: %d\n", range_id, ir_value);
96 95
	if (temp >= 0 && temp <= 1000) return ir_value;
97 96
	return -1;
98 97
}

Also available in: Unified diff