SITL: use ARRAY_SIZE macro

This commit is contained in:
Lucas De Marchi 2015-07-20 16:56:22 -03:00 committed by Randy Mackay
parent fd5d25b1d5
commit 5c9bf90d94

View File

@ -109,7 +109,7 @@ MultiCopter::MultiCopter(const char *home_str, const char *frame_str) :
terminal_velocity(15.0),
terminal_rotation_rate(4*radians(360.0))
{
for (uint8_t i=0; i<sizeof(supported_frames)/sizeof(supported_frames[0]); i++) {
for (uint8_t i=0; i < ARRAY_SIZE(supported_frames); i++) {
if (strcasecmp(frame_str, supported_frames[i].name) == 0) {
frame = &supported_frames[i];
}