void Display::update_all() { update_arm(); update_prearm(); update_gps(); update_gps_sats(); update_ekf(); }
void Display::update_all() { update_text(0); update_mode(1); update_battery(2); update_gps(3); //update_gps_sats(4); update_prearm(4); update_ekf(5); }
void Display::update() { static uint8_t timer = 0; // return immediately if not enabled if (!_healthy) { return; } // max update frequency 2Hz if (timer++ < 25) { return; } timer = 0; // check if status has changed if (_flags.armed != AP_Notify::flags.armed) { update_arm(); _flags.armed = AP_Notify::flags.armed; } if (_flags.pre_arm_check != AP_Notify::flags.pre_arm_check) { update_prearm(); _flags.pre_arm_check = AP_Notify::flags.pre_arm_check; } if (_flags.gps_status != AP_Notify::flags.gps_status) { update_gps(); _flags.gps_status = AP_Notify::flags.gps_status; } if (_flags.gps_num_sats != AP_Notify::flags.gps_num_sats) { update_gps_sats(); _flags.gps_num_sats = AP_Notify::flags.gps_num_sats; } if (_flags.ekf_bad != AP_Notify::flags.ekf_bad) { update_ekf(); _flags.ekf_bad = AP_Notify::flags.ekf_bad; } // if somethings has changed, update display if (_need_update) { hw_update(); _need_update = false; } }