// Checks if there are alerts to be displayed void roadmap_alerter_check(const RoadMapGpsPosition *gps_position, const PluginLine *line){ if( (!line) || (line->line_id == -1) ) return; //check that alerts are enabled if (!config_alerts_enabled()) { return; } // check if there is a alert in range if (is_alert_in_range(gps_position, line) > 0) { alert_should_be_visible = TRUE; } else { alert_should_be_visible = FALSE; } }
// Checks if there are alerts to be displayed void roadmap_alerter_check(const RoadMapGpsPosition *gps_position, const PluginLine *line) { //check that alerts are enabled if (!config_alerts_enabled()) { return; } // check minimum speed if (roadmap_math_to_speed_unit(gps_position->speed) < config_alerts_min_speed()) { // If there is any active alert turn it off. the_active_alert.active_alert_id = -1; alert_should_be_visible = FALSE; return; } // check if there is a alert in range if (is_alert_in_range(gps_position, line) > 0) { alert_should_be_visible = TRUE; } else { alert_should_be_visible = FALSE; } }