diff --git a/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp b/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp index 6201ab1..91fae83 100644 --- a/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp +++ b/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp @@ -131,29 +131,17 @@ void AHRSInputIOProcessor::loop() } } - unsigned char rollArray[8]; - unsigned char pitchArray[8]; unsigned char yawArray[8]; if (index != -1) // This puts all those bytes { - for (int i = 0; i < 8; i++) - { - rollArray[i] = szBuff[index - (i + 8)]; - pitchArray[i] = szBuff[index - i]; - yawArray[i] = szBuff[index + (8 - i)]; - } + for (int i=0; i < 8; i++) + yawArray[i] = szBuff[index + (8-i)]; } - double doubleRoll = *reinterpret_cast(rollArray); - double doublePitch = *reinterpret_cast(pitchArray); double doubleYaw = *reinterpret_cast(yawArray); - Attribute attRoll("rolAngle", 8, &doubleRoll); - getComms()->sendAttribute(attRoll); - Attribute attPitch("pitAngle", 8, &doublePitch); - getComms()->sendAttribute(attPitch); - Attribute attYaw("yawAngle", 8, &doubleYaw); - getComms()->sendAttribute(attYaw); + Attribute attrib("yawAngle", 8, &doubleYaw); + getComms()->sendAttribute(attrib); // I am not sure if it will close autimatically when the process ends, at the moment I guess we just won't close it... //CloseHandle(hSerial); -} +} \ No newline at end of file