약간의 수정
This commit is contained in:
11
ccs/util.c
Normal file → Executable file
11
ccs/util.c
Normal file → Executable file
@@ -95,4 +95,13 @@ int is_crossroad_robust(SensorBuffer *sb) {
|
||||
return 1;
|
||||
fail:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void print_binary(const uint8_t n) {
|
||||
int i;
|
||||
for (i = 7; i >= 0; i--) printf("%d", (n >> i) & 0b1);
|
||||
}
|
||||
|
||||
uint8_t extract_ir_value(const uint8_t mask, const uint8_t ir_value) {
|
||||
return mask & ir_value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user