Требуется программист в Зеленограде
- обработка данных с датчиков; ColdFire; 40 тыс. e-mail:jobsmp@pochta.ru |
half = 1;
last = 0;
data = 0;
recived = 0;
while (received < 14) {
timer = 0;
while (last == RC5in) {
if (timer > 2.223) {
return 0;
}
}
if (half) {
if ((0.667 < timer) && (1.111 > timer)) {
data <<= 1; received++;
if (last < RC5in) data++;
half = 0;
} else {
return 0;
}
} else {
if ((0.667 < timer) && (1.111 > timer)) {
half = 1;
} else if ((1.334 < timer) && (2.223 > timer)) {
data <<= 1; received++;
if (last < RC5in) data++;
half = 0;
} else {
return 0;
}
}
last = RCin;
}
return data;
}