diff --git a/src/fps.rs b/src/fps.rs index 79e130a..467e14f 100644 --- a/src/fps.rs +++ b/src/fps.rs @@ -36,12 +36,12 @@ pub fn print_fps(fp: &VatlinkDataV3FlightPlan, callsign: &str) { let arrival = fp.arrival.clone(); let alternate = fp.alternate.clone(); - let main_wrap = 68; + let main_wrap = 108; let mut route = fp.route.clone(); - if fp.route.len() > 68 * 3 { - route = route[..68*3-3].to_string() + "..."; + if fp.route.len() > 108 * 3 { + route = route[..108*3-3].to_string() + "..."; } let route_chars: Vec = route.chars().collect(); @@ -54,16 +54,16 @@ pub fn print_fps(fp: &VatlinkDataV3FlightPlan, callsign: &str) { let mut rem = fp.remarks.clone(); - let room_for_remarks = if fp.route.len() < 68 { + let room_for_remarks = if fp.route.len() < 108 { 4 - } else if fp.route.len() < 68 * 2 { + } else if fp.route.len() < 108 * 2 { 3 } else { 2 }; - if fp.remarks.len() > 68 * room_for_remarks { - rem = rem[..68*room_for_remarks-3].to_string() + "..."; + if fp.remarks.len() > 108 * room_for_remarks { + rem = rem[..108*room_for_remarks-3].to_string() + "..."; } let rem_chars: Vec = rem.chars().collect(); @@ -108,12 +108,12 @@ pub fn print_fps(fp: &VatlinkDataV3FlightPlan, callsign: &str) { } println!("--- FLIGHT PROGRESS STRIP READOUT FOR {} ---", callsign); - println!("┌{:─>leftmost_with_padding$}┬{:─>tnd_leftmost_with_padding$}┬──────┬──────────────────────────────────────────────────────────────────────┬──────┬──────┬──────┐", "", ""); + println!("┌{:─>leftmost_with_padding$}┬{:─>tnd_leftmost_with_padding$}┬──────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────┬──────┬──────┐", "", ""); println!("│ {: >longest_block_leftmost$} │ {: >longest_block_2nd_leftmost$} │ {: >4} │ {: leftmost_with_padding$}├{:─>tnd_leftmost_with_padding$}┤ {: >4} │ {: longest_block_leftmost$} │ {: >longest_block_2nd_leftmost$} │ {: >4} │ {: leftmost_with_padding$}├{:─>tnd_leftmost_with_padding$}┤ │ {: 3}{: >ft_offset$} │ {: >longest_block_2nd_leftmost$} │ │ {: leftmost_with_padding$}┴{:─>tnd_leftmost_with_padding$}┴──────┴──────────────────────────────────────────────────────────────────────┴──────┴──────┴──────┘", "", ""); + println!("└{:─>leftmost_with_padding$}┴{:─>tnd_leftmost_with_padding$}┴──────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────┴──────┴──────┘", "", ""); println!("--- END FLIGHT PROGRESS STRIP READOUT FOR {} ---", callsign); } \ No newline at end of file