author | StephaneLenclud |
Fri, 25 Sep 2015 19:22:44 +0200 | |
changeset 38 | 10d8128ccc60 |
parent 9 | 6b08e3e81cf3 |
permissions | -rw-r--r-- |
StephaneLenclud@35 | 1 |
// |
StephaneLenclud@35 | 2 |
// Copyright (C) 2014-2015 Stéphane Lenclud. |
StephaneLenclud@35 | 3 |
// |
StephaneLenclud@35 | 4 |
// This file is part of MiniDisplay. |
StephaneLenclud@35 | 5 |
// |
StephaneLenclud@35 | 6 |
// MiniDisplay is free software: you can redistribute it and/or modify |
StephaneLenclud@35 | 7 |
// it under the terms of the GNU General Public License as published by |
StephaneLenclud@35 | 8 |
// the Free Software Foundation, either version 3 of the License, or |
StephaneLenclud@35 | 9 |
// (at your option) any later version. |
StephaneLenclud@35 | 10 |
// |
StephaneLenclud@35 | 11 |
// MiniDisplay is distributed in the hope that it will be useful, |
StephaneLenclud@35 | 12 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
StephaneLenclud@35 | 13 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
StephaneLenclud@35 | 14 |
// GNU General Public License for more details. |
StephaneLenclud@35 | 15 |
// |
StephaneLenclud@35 | 16 |
// You should have received a copy of the GNU General Public License |
StephaneLenclud@35 | 17 |
// along with MiniDisplay. If not, see <http://www.gnu.org/licenses/>. |
StephaneLenclud@35 | 18 |
// |
StephaneLenclud@35 | 19 |
|
sl@0 | 20 |
|
sl@0 | 21 |
#include "FutabaVfd.h" |
sl@0 | 22 |
//#include <stdlib.h> |
sl@0 | 23 |
#include <string.h> |
sl@0 | 24 |
|
sl@0 | 25 |
|
sl@0 | 26 |
#ifdef DEBUG_FRAME_DIFF |
sl@0 | 27 |
#include <QImage> |
sl@0 | 28 |
#include <QTextStream> |
sl@0 | 29 |
#endif |
sl@0 | 30 |
|
sl@0 | 31 |
|
sl@0 | 32 |
// |
sl@0 | 33 |
// |
sl@0 | 34 |
// |
sl@0 | 35 |
|
sl@0 | 36 |
FutabaVfdCommand::FutabaVfdCommand():/*iBuffer(NULL),*/iSize(0),iMaxSize(0) |
sl@0 | 37 |
{ |
sl@0 | 38 |
} |
sl@0 | 39 |
|
sl@0 | 40 |
FutabaVfdCommand::~FutabaVfdCommand() |
sl@0 | 41 |
{ |
sl@0 | 42 |
//Delete(); |
sl@0 | 43 |
} |
sl@0 | 44 |
|
sl@0 | 45 |
|
sl@0 | 46 |
/** |
sl@0 | 47 |
|
sl@0 | 48 |
*/ |
sl@0 | 49 |
void FutabaVfdCommand::Reset() |
sl@0 | 50 |
{ |
sl@0 | 51 |
memset(iReports,0,sizeof(iReports)); |
sl@0 | 52 |
} |
sl@0 | 53 |
|
sl@0 | 54 |
|
sl@0 | 55 |
|
sl@0 | 56 |
/** |
sl@0 | 57 |
|
sl@0 | 58 |
*/ |
sl@0 | 59 |
/* |
sl@0 | 60 |
void FutabaVfdCommand::Create(int aMaxSize) |
sl@0 | 61 |
{ |
sl@0 | 62 |
iBuffer=new unsigned char[aMaxSize]; |
sl@0 | 63 |
if (iBuffer) |
sl@0 | 64 |
{ |
sl@0 | 65 |
iMaxSize = aMaxSize; |
sl@0 | 66 |
iSize = 0; |
sl@0 | 67 |
} |
sl@0 | 68 |
} |
sl@0 | 69 |
*/ |
sl@0 | 70 |
|
sl@0 | 71 |
/** |
sl@0 | 72 |
|
sl@0 | 73 |
*/ |
sl@0 | 74 |
/* |
sl@0 | 75 |
void FutabaVfdCommand::Delete() |
sl@0 | 76 |
{ |
sl@0 | 77 |
delete[] iBuffer; |
sl@0 | 78 |
iBuffer = NULL; |
sl@0 | 79 |
iMaxSize = 0; |
sl@0 | 80 |
iSize = 0; |
sl@0 | 81 |
} |
sl@0 | 82 |
*/ |
sl@0 | 83 |
|
sl@0 | 84 |
|
sl@9 | 85 |
// |
sl@9 | 86 |
// class FutabaDisplay |
sl@9 | 87 |
// |
sl@0 | 88 |
|
sl@9 | 89 |
void FutabaGraphicDisplay::Close() |
sl@9 | 90 |
{ |
sl@9 | 91 |
HidDevice::Close(); |
sl@9 | 92 |
} |
sl@0 | 93 |
|
sl@0 | 94 |
|
sl@0 | 95 |
|
sl@0 | 96 |