Page 762 - 2
P. 762

while(GetCount)
                {
                    if(is_ended)
                    {
                        GetCount--;;
                        function_sensor_end();
                    }
                    else if(is_available)
                    {
                        function_sensor_start();
                        is_available = 0; //  센서 사용불가 상태로 바꾼다.
                    }
                }


                for(i = 0; i < SORT_COUNT; i++)
                {
                    for(j = 0; j < SORT_COUNT; j++)
                    {
                        if(dis[j] > dis[j+1])
                            SWAP(dis[j], dis[j+1], sorttemp);


                    }
                }


                distance = dis[(SORT_COUNT/2)];
                if(mode == 0)
                    default_height = distance;






                if(mode == 0)
                {


                    d_1 = distance %100 /10;
                    d_10 = distance%10;
                    distance = distance/100;


                    lcd_clear();
                    lcd_gotoxy(0,0);
                    sprintf(sbuf,"Default = %d.%d%d",distance,d_1,d_10);
                    lcd_puts(sbuf);
                }
                else
                {


                                                         - 762 -
   757   758   759   760   761   762   763   764   765   766   767