Browse Source

SITL: use ARRAY_SIZE macro

master
Lucas De Marchi 10 years ago committed by Randy Mackay
parent
commit
5c9bf90d94
  1. 2
      libraries/SITL/SIM_Multicopter.cpp

2
libraries/SITL/SIM_Multicopter.cpp

@ -109,7 +109,7 @@ MultiCopter::MultiCopter(const char *home_str, const char *frame_str) : @@ -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];
}

Loading…
Cancel
Save