I'm trying to get a couple of 'if/then' statements to output data all at once.

The code continuously reads data from a source (a CAN reader outputting pitch/roll/yaw and linear acceleration over 3 CAN ID's), performs some calculations then outputs onto the screen. I've included the relevant part of my code below:

```
if canid == 372 {
let ywrt:f32 = concathd(decon[1], decon[0]) as f32 *0.01 - 327.68;
let lin_y:f32 = concathd(decon[5], decon[4]) as f32 *0.0002 - 6.55;
println!("YAW = {:.4} Acc Y = {:.4}", ywrt, lin_y);
}
if canid == 376 {
let rrt:f32 = concathd(decon[1], decon[0]) as f32 *0.01 - 327.68;
let lin_x:f32 = concathd(decon[5], decon[4]) as f32 *0.0002 - 6.55;
println!("ROLL = {:.4} Acc X = {:.4}", rrt, lin_x);
}
if canid == 380 {
let prt:f32 = concathd(decon[1], decon[0]) as f32 *0.01 - 327.68;
let lin_z:f32 = concathd(decon[5], decon[4]) as f32 *0.0002 - 6.55;
println!("PITCH = {:.4} Acc Z = {:.4}", prt, lin_z);
}
```

Ideally, I'd like to calculate the various components within one section, then output the P/R/Y and X/Y/Z Acceleration at the end in a nice readable format.

I've been having some issues since the CAN Reader has got to loop (it only outputs one CAN ID at a time) and perform certain calculations based of the ID.

// /// //// ALTERNATVELY //// /// //

I was also thinking to do something like this:

```
if YAW == 1 && PITCH == 1 && ROLL == 1 { // Once all calcs performed, clear screen
print!("\x1B[2J\x1B[1;1H");
}
```

(But that would require me to have global variables which I am unsure how to implement within the *if* statements).

Any help would be much appreciated!!

Logan