Browse Source

APMrover2: use ARRAY_SIZE macro

master
Lucas De Marchi 10 years ago committed by Andrew Tridgell
parent
commit
8f74d7d982
  1. 2
      APMrover2/APMrover2.cpp
  2. 2
      APMrover2/Log.cpp

2
APMrover2/APMrover2.cpp

@ -100,7 +100,7 @@ void Rover::setup() @@ -100,7 +100,7 @@ void Rover::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));
}
/*

2
APMrover2/Log.cpp

@ -394,7 +394,7 @@ const LogStructure Rover::log_structure[] PROGMEM = { @@ -394,7 +394,7 @@ const LogStructure Rover::log_structure[] PROGMEM = {
void Rover::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);

Loading…
Cancel
Save