2.关于显示坐标与角度方位情况的函数操作
if((angledot < 22.5) || (angledot > 337.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"South");
}
if((angledot> 22.5) && (angledot < 67.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"South-West");
}
if((angledot > 67.5) && (angledot < 112.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"West");
}
if((angledot > 112.5) && (angledot < 157.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"North-West");
}
if((angledot > 157.5) && (angledot < 202.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"North");
}
if((angledot> 202.5) && (angledot < 247.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"NorthEast");
}
if((angledot > 247.5) && (angledot < 292.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"East");
}
if((angledot > 292.5) && (angledot < 337.5 ))
{
LCD_ShowString(170,290,200,16,16," ");
LCD_ShowString(170,290,200,16,16,"SouthEast");
}
|