mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15: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:
parent
eb01c55478
commit
7d70d1f9f2
@ -1,5 +1,5 @@
|
|||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "..\delay.h"
|
#include "delay.h"
|
||||||
port::port(PortSettings settings,QString name):mstatus(port::closed)
|
port::port(PortSettings settings,QString name):mstatus(port::closed)
|
||||||
{
|
{
|
||||||
timer.start();
|
timer.start();
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <qwaitcondition.h>
|
#include <qwaitcondition.h>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <conio.h>
|
|
||||||
|
|
||||||
OP_DFU::OP_DFU(bool _debug,bool _use_serial,QString portname): debug(_debug),use_serial(_use_serial),mready(true)
|
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();
|
time.start();
|
||||||
while(true)
|
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)
|
if(time.elapsed()>10000)
|
||||||
qDebug()<<"____timeout";
|
qDebug()<<"____timeout";
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
#include <QList>
|
#include <QList>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "delay.h"
|
#include "delay.h"
|
||||||
#include "../../../libs/qextserialport/src/qextserialport.h"
|
#include "../../libs/qextserialport/src/qextserialport.h"
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include ".\SSP\qssp.h"
|
#include "SSP/qssp.h"
|
||||||
#include ".\SSP\port.h"
|
#include "SSP/port.h"
|
||||||
#include ".\SSP\qsspt.h"
|
#include "SSP/qsspt.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
#define BUF_LEN 64
|
#define BUF_LEN 64
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user