switch (sensor15_up_int) //查表滤波
{
case 0b000000010000000:
case 0b000000111000000:
case 0b000000101000000:offset_point=0;offset_pole=0;break;
case 0b000000011000000:offset_point=1; offset_pole=-1;break;//左边检测到黑线
case 0b000000001000000:
case 0b000000011100000:offset_point=2; offset_pole=-1;break;
case 0b000000001100000:offset_point=3; offset_pole=-1;break;
case 0b000000000100000:offset_point=4; offset_pole=-1;break;
case 0b000000001110000:offset_point=5; offset_pole=-1;break;
case 0b000000000110000:offset_point=6; offset_pole=-1;break;
case 0b000000000010000:offset_point=7; offset_pole=-1;break;
case 0b000000000011000:offset_point=8; offset_pole=-1;break;
case 0b000000000001000:
case 0b000000000011100:offset_point=9; offset_pole=-1;break;
case 0b000000000001100:offset_point=10;offset_pole=-1;break;
case 0b000000000000100:
case 0b000000000001110:offset_point=11;offset_pole=-1;break;
case 0b000000000000110:offset_point=12;offset_pole=-1;break;
case 0b000000000000010:
case 0b000000000000111:offset_point=13;offset_pole=-1;break;
case 0b000000000000011:offset_point=14;offset_pole=-1;break;
case 0b000000000000001:offset_point=15;offset_pole=-1;break;
case 0b000000110000000:offset_point=1; offset_pole=1;break;
case 0b000000100000000:
case 0b000001110000000:offset_point=2; offset_pole=1;break;
case 0b000001100000000:offset_point=3; offset_pole=1;break;
case 0b000001000000000:offset_point=4; offset_pole=1;break;
case 0b000011100000000:offset_point=5; offset_pole=1;break;
case 0b000011000000000:offset_point=6; offset_pole=1;break;
case 0b000010000000000:offset_point=7; offset_pole=1;break;
case 0b000110000000000:offset_point=8; offset_pole=1;break;
case 0b000100000000000:
case 0b001110000000000:offset_point=9; offset_pole=1;break;
case 0b001100000000000:offset_point=10;offset_pole=1;break;
case 0b001000000000000:
case 0b011100000000000:offset_point=11;offset_pole=1;break;
case 0b011000000000000:offset_point=12;offset_pole=1;break;
case 0b010000000000000:
case 0b111000000000000:offset_point=13;offset_pole=1;break;
case 0b110000000000000:offset_point=14;offset_pole=1;break;
case 0b100000000000000:offset_point=15;offset_pole=1;break;
default: break; //不在查表范围内时,保持上一次的偏移量
}