ArduPlane: use ARRAY_SIZE macro
This commit is contained in:
parent
0bc09adc78
commit
e97034f8e9
@ -92,7 +92,7 @@ void Plane::setup()
|
||||
init_ardupilot();
|
||||
|
||||
// initialise the main loop scheduler
|
||||
scheduler.init(&scheduler_tasks[0], sizeof(scheduler_tasks)/sizeof(scheduler_tasks[0]));
|
||||
scheduler.init(&scheduler_tasks[0], ARRAY_SIZE(scheduler_tasks));
|
||||
}
|
||||
|
||||
void Plane::loop()
|
||||
|
@ -523,7 +523,7 @@ void Plane::start_logging()
|
||||
*/
|
||||
void Plane::log_init(void)
|
||||
{
|
||||
DataFlash.Init(log_structure, sizeof(log_structure)/sizeof(log_structure[0]));
|
||||
DataFlash.Init(log_structure, ARRAY_SIZE(log_structure));
|
||||
if (!DataFlash.CardInserted()) {
|
||||
gcs_send_text_P(SEVERITY_LOW, PSTR("No dataflash card inserted"));
|
||||
g.log_bitmask.set(0);
|
||||
|
@ -1257,7 +1257,7 @@ void Plane::load_parameters(void)
|
||||
uint32_t before = micros();
|
||||
// Load all auto-loaded EEPROM variables
|
||||
AP_Param::load_all();
|
||||
AP_Param::convert_old_parameters(&conversion_table[0], sizeof(conversion_table)/sizeof(conversion_table[0]));
|
||||
AP_Param::convert_old_parameters(&conversion_table[0], ARRAY_SIZE(conversion_table));
|
||||
cliSerial->printf_P(PSTR("load_all took %luus\n"), micros() - before);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user