#include "overlay_device.h"

extern Telemetry_String telstring; 
//extern Vehicle vehicle;
int overlay_string_status = 0;
char   comm_overlay_string[100];
int overlay_string_timer = 0;

OverlayDevice::OverlayDevice(char* devName, int freq, int type)
: SerialDevice(devName, freq, type) 
{}


OverlayDevice::~OverlayDevice()
{
}

bool OverlayDevice::parse()
{
        int n = 0;
        memset(this->overlayBuf, 0, 100);

	if ((n = read(this->handle(), this->overlayBuf, 100)) > 0)
		{
		overlay_string_status = 1;
                return true;
		}
	return false;
}



void OverlayDevice::setSystemData()
{
	if(overlay_string_status) 
		{
		snprintf(comm_overlay_string, 100, "%s%" , this->overlayBuf);	
 		overlay_string_status = 0;
 		}
}


int OverlayDevice::send()
{
	return 0;
}


