#include "spartonsandbox.h"
#include "ui_spartonsandbox.h"
#include "rs232.h"

SpartonSandbox::SpartonSandbox(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::SpartonSandbox)
{
    ui->setupUi(this);



    if (OpenComport(0,9600)) {
        qDebug("Error opening port!");
    } else qDebug("Port Opened..");

    qDebug("Sending $xxHDM");

    outbc = -1;
    outbc = sprintf((char *)outb,"$xxHDM\r\n");

    if (outbc > 0) {
        if (SendBuf(COMPORT,outb,outbc) <=0) {
            qDebug("Sending error...");
        }
    }

}

SpartonSandbox::~SpartonSandbox()
{
    delete ui;
}

void SpartonSandbox::on_getMagHdg_clicked()
{

}

void receiveData() {

}
