diff --git a/Filters/OutputFilter/OutputFilter.cpp b/Filters/OutputFilter/OutputFilter.cpp index ca19288..e250a8a 100644 --- a/Filters/OutputFilter/OutputFilter.cpp +++ b/Filters/OutputFilter/OutputFilter.cpp @@ -50,14 +50,20 @@ namespace filter { networkOutPkg.setChannel(1, static_cast(control.state.altitudeAboveGround * 10)); networkOutPkg.setChannel(2, static_cast(control.state.lat * 10)); networkOutPkg.setChannel(3, static_cast(control.state.lon * 10)); - networkOutPkg.setChannel(4, static_cast(control.state.roll*2 + 500)); - networkOutPkg.setChannel(5, static_cast(control.state.pitch*2 + 500)); - networkOutPkg.setChannel(6, static_cast(control.state.yaw*2 + 500)); + networkOutPkg.setChannel(4, static_cast(control.state.roll * 2 + 500)); + networkOutPkg.setChannel(5, static_cast(control.state.pitch * 2 + 500)); + networkOutPkg.setChannel(6, static_cast(control.state.yaw * 2 + 500)); networkOutPkg.setChannel(7, static_cast(control.state.speed * 10)); networkOutPkg.setChannel(8, static_cast(control.state.altitude)); - networkOutPkg.setChannel(9, static_cast(control.state.accX * 10) + 500); - networkOutPkg.setChannel(10, static_cast(control.state.accY * 10) + 500); - networkOutPkg.setChannel(11, static_cast(control.state.accZ * 10) + 500); + networkOutPkg.setChannel(9, + static_cast(static_cast(control.state.accX * 10) + + 500)); + networkOutPkg.setChannel(10, + static_cast(static_cast(control.state.accY * 10) + + 500)); + networkOutPkg.setChannel(11, + static_cast(static_cast(control.state.accZ * 10) + + 500)); networkOutPkg.setChannel(12, static_cast(control.state.pdbPackage.voltageVcc * 50)); flightControllerOut.put(serialOutPkg);