diff --git a/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp b/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp index 4d06a36..0e051f1 100644 --- a/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp +++ b/bfs/implementations/breadcrumbs/io_procs/AHRSInputIOProcessor.cpp @@ -12,6 +12,7 @@ * 7 : Error occured while trying to send SetOutputConfiguration message. * 8 : Error occured while trying to send GoToMeasurment message. */ + int AHRSInputIOProcessor::configAHRS() { hSerial = CreateFile("COM8", // The COM port to connect to, may have to be changed @@ -70,9 +71,7 @@ int AHRSInputIOProcessor::configAHRS() std::cout << "Connection established!" << std::endl; std::cout << "Setting up Config..." << std::endl; - // This is the GoToConfig message, MID 48 - // Switch the active state of the device from Measurment State to Config State. - unsigned char wBuff1[] = {0xFA,0xFF,0x30,0x00,0xD1}; + unsigned char wBuff1[] = {0xFA,0xFF,0x30,0x00,0xD1}; // This is the GoToConfig message DWORD dwBytesWritten = 0; // Number of bytes actually written if (!WriteFile(hSerial, wBuff1, 6, &dwBytesWritten, NULL)) @@ -80,10 +79,8 @@ int AHRSInputIOProcessor::configAHRS() std::cerr << "Error occured while trying to send GoToConfig message." << std::endl; return 6; } - - // This is the SetOutputConfiguration message, MID 192 - // Set the output configuration of the device. - unsigned char wBuff2[] = {0xFA,0xFF,0xC0,0x04,0x20,0x33,0x00,0x00,0xEA}; + + unsigned char wBuff2[] = {0xFA,0xFF,0xC0,0x04,0x20,0x33,0x00,0x00,0xEA}; // This is the SetOutputConfiguration message dwBytesWritten = 0; if (!WriteFile(hSerial, wBuff2, 10, &dwBytesWritten, NULL)) @@ -91,10 +88,8 @@ int AHRSInputIOProcessor::configAHRS() std::cerr << "Error occured while trying to send SetOutputConfiguration message." << std::endl; return 7; } - - // This is the GoToMeasurment message, MID 16 - // Switch the active state of the device from Config State to Measurment State. - unsigned char wBuff3[] = {0xFA,0xFF,0x10,0x00,0xF1}; + + unsigned char wBuff3[] = {0xFA,0xFF,0x10,0x00,0xF1}; // This is the GoToMeasurment message dwBytesWritten = 0; if (!WriteFile(hSerial, wBuff3, 6, &dwBytesWritten, NULL))