Revision 491
removed print statements from new BOM code, recompiled library.
bom.c | ||
---|---|---|
38 | 38 |
#include "dio.h" |
39 | 39 |
#include "analog.h" |
40 | 40 |
|
41 |
//TODO: DELETE THIS |
|
42 |
void printi(int i) |
|
43 |
{ |
|
44 |
char c3 = (i % 10) + '0'; |
|
45 |
i /= 10; |
|
46 |
char c2 = (i % 10) + '0'; |
|
47 |
i /= 10; |
|
48 |
char c1 = (i % 10) + '0'; |
|
49 |
if (c1 == '0') |
|
50 |
{ |
|
51 |
c1 = ' '; |
|
52 |
if (c2 == '0') |
|
53 |
c2 = ' '; |
|
54 |
} |
|
55 |
usb_putc(c1); |
|
56 |
usb_putc(c2); |
|
57 |
usb_putc(c3); |
|
58 |
} |
|
59 |
|
|
60 | 41 |
//constants |
61 | 42 |
static const char lookup[16] = {7,6,5,0xe,1,4,3,2,0xf,0,0xd,8,0xc,0xb,9,0xa}; |
62 | 43 |
|
... | ... | |
190 | 171 |
lowest_i = -1; |
191 | 172 |
lowest_val = 255; |
192 | 173 |
for(i = 0; i < NUM_BOM_LEDS; i++) { |
193 |
printi(bom_val[i]); |
|
194 |
usb_puts(" "); |
|
195 | 174 |
if(bom_val[i] < lowest_val) { |
196 | 175 |
lowest_val = bom_val[i]; |
197 | 176 |
lowest_i = i; |
198 | 177 |
} |
199 |
} |
|
200 |
usb_puts("<< BOM_GET_MAX\n\r"); |
|
178 |
} |
|
201 | 179 |
|
202 | 180 |
if(lowest_val < BOM_VALUE_THRESHOLD) |
203 | 181 |
return lowest_i; |
Also available in: Unified diff