1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

Bootloader: A few cross-platform changes for the serial uploading functionality

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2213 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-12-10 20:19:28 +00:00 committed by peabody124
parent eb01c55478
commit 7d70d1f9f2
3 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#include "port.h"
#include "..\delay.h"
#include "delay.h"
port::port(PortSettings settings,QString name):mstatus(port::closed)
{
timer.start();

View File

@ -2,7 +2,6 @@
#include <cmath>
#include <qwaitcondition.h>
#include <QMutex>
#include <conio.h>
OP_DFU::OP_DFU(bool _debug,bool _use_serial,QString portname): debug(_debug),use_serial(_use_serial),mready(true)
{
@ -809,7 +808,7 @@ int OP_DFU::receiveData(void * data,int size)
time.start();
while(true)
{
if(x=serialhandle->read_Packet(data+1)!=-1||time.elapsed()>10000)
if(x=serialhandle->read_Packet(((char *) data)+1)!=-1||time.elapsed()>10000)
{
if(time.elapsed()>10000)
qDebug()<<"____timeout";

View File

@ -9,11 +9,11 @@
#include <QList>
#include <iostream>
#include "delay.h"
#include "../../../libs/qextserialport/src/qextserialport.h"
#include "../../libs/qextserialport/src/qextserialport.h"
#include <QTime>
#include ".\SSP\qssp.h"
#include ".\SSP\port.h"
#include ".\SSP\qsspt.h"
#include "SSP/qssp.h"
#include "SSP/port.h"
#include "SSP/qsspt.h"
using namespace std;
#define BUF_LEN 64