Remove compile warning and possible error on zero size

This commit is contained in:
Christophe De Wagter
2010-12-11 14:55:21 +01:00
parent b6da8eaf73
commit 8189a25e5f
@@ -365,6 +365,9 @@ bool_t InitializePolygonSurvey(uint8_t EntryWP, uint8_t Size, float sw, float Or
CSurveyStatus = Init;
if (Size == 0)
return TRUE;
//Don't initialize if Polygon is too big or if the orientation is not between 0 and 90
if(Size <= PolygonSize && Orientation >= -90 && Orientation <= 90)
{