Skip to content

Commit

Permalink
Fix names and built with python script
Browse files Browse the repository at this point in the history
  • Loading branch information
mfs16101 committed May 8, 2020
1 parent 17bdc02 commit ac92532
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
23 changes: 23 additions & 0 deletions bfs/implementations/breadcrumbs/gen/AHRSInputIOProcessor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

#include <iostream>

#include "DataSyncThread.hpp"
#include "AHRSInputIOProcessor.hpp"


int main()
{
IOProcessor* client = new AHRSInputIOProcessor;

if (!client->init())
{
while (client->loopCondition())
client->loop();

int result = client->close();
delete client;
return result;
}

return 0;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef AHRS_OUTPUT_IO_PROCESSOR_HPP
#define AHRS_OUTPUT_IO_PROCESSOR_HPP
#ifndef AHRS_INPUT_IO_PROCESSOR_HPP
#define AHRS_INPUT_IO_PROCESSOR_HPP

#include "IOProcessor.hpp"
#include "DataSyncThread.hpp"
#include "Attribute.hpp"
#include <windows.h>
#include <iostream>

class AHRSOutputIOProcessor : public IOProcessor
class AHRSInputIOProcessor : public IOProcessor
{
public:
using IOProcessor::IOProcessor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "AHRSOutputIOProcessor.hpp"
#include "AHRSInputIOProcessor.hpp"


int AHRSOutputIOProcessor::configAHRS()
int AHRSInputIOProcessor::configAHRS()
{
DCB dcb = {0};
//HANDLE hSerial;
Expand Down Expand Up @@ -92,12 +92,12 @@ int AHRSOutputIOProcessor::configAHRS()
return 0;
}

bool AHRSOutputIOProcessor::loopCondition()
bool AHRSInputIOProcessor::loopCondition()
{
return iterations > 0;
}

void AHRSOutputIOProcessor::loop()
void AHRSInputIOProcessor::loop()
{
if (!configured)
configAHRS();
Expand All @@ -108,7 +108,7 @@ void AHRSOutputIOProcessor::loop()
if (!ReadFile(hSerial, szBuff, 64, &dwBytesRead, NULL))
{
std::cout << "Error occured while trying to read bytes." << std::endl;
return 9;
//return 9;
}

int index = -1;
Expand Down Expand Up @@ -142,7 +142,7 @@ void AHRSOutputIOProcessor::loop()
//std::cout << "Yaw: " << doubleYaw << std::endl;

Attribute attrib("yawAngle", 8, &doubleYaw);
getComs()->sendAttribute(attriv);
getComms()->sendAttribute(attrib);
iterations--;

if (iterations == 0)
Expand Down

0 comments on commit ac92532

Please sign in to comment.