Revision 1456 branches/colonetmk2/code/projects/libdragonfly/bom.c
| bom.c (revision 1456) | ||
|---|---|---|
| 33 | 33 |
* @author Colony Project, CMU Robotics Club |
| 34 | 34 |
**/ |
| 35 | 35 |
|
| 36 |
#include <dragonfly_lib.h> |
|
| 37 | 36 |
#include "bom.h" |
| 38 | 37 |
#include "dio.h" |
| 39 | 38 |
#include "serial.h" |
| ... | ... | |
| 114 | 113 |
**/ |
| 115 | 114 |
|
| 116 | 115 |
static unsigned int bom_val[NUM_BOM_LEDS]; |
| 117 |
static volatile char bom_type = BOM; |
|
| 116 |
static volatile char bom_type = BOM10; |
|
| 118 | 117 |
static int select_pins[4]; |
| 119 | 118 |
static int analog_pin; |
| 120 | 119 |
|
| ... | ... | |
| 238 | 237 |
**/ |
| 239 | 238 |
int bom_get_max10(int *dist) {
|
| 240 | 239 |
int i, max; |
| 241 |
long long mean, sum; |
|
| 240 |
long long mean = 0, sum = 0; |
|
| 242 | 241 |
|
| 243 | 242 |
max = bom_get_max(); |
| 244 | 243 |
if (max < 0) |
Also available in: Unified diff