-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oscilloscope模块改用Qt Charts做波形显示。修复了oscilloscope的一些bug。增加一些功能。
gztss
committed
Mar 13, 2018
1 parent
f5db6f8
commit 3ff9739
Showing
37 changed files
with
835 additions
and
37,531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef POINTDATABUFFER_H | ||
#define POINTDATABUFFER_H | ||
|
||
#include <QVector> | ||
#include <QList> | ||
#include <QPointF> | ||
|
||
namespace QtCharts { | ||
class QLineSeries; | ||
} | ||
|
||
class PointDataBuffer | ||
{ | ||
public: | ||
PointDataBuffer(const QVector<QtCharts::QLineSeries*> *series); | ||
void append(int channel, double value); | ||
int update(); | ||
int maximumCount(); | ||
void clear(); | ||
|
||
private: | ||
const QVector<QtCharts::QLineSeries*> *m_series; | ||
QVector<QList<QPointF>> m_data; | ||
QVector<int> m_count; | ||
}; | ||
|
||
#endif // POINTDATABUFFER_H |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#ifndef __VERSION_H | ||
#define __VERSION_H | ||
|
||
#define MAIN_VERSION 1.1.8 | ||
#define MAIN_VERSION 1.2.0 | ||
|
||
#define SOFTWARE_NAME "SerialTool" | ||
#define COPYRIGHT "Copyleft 2017 by Wenliang" | ||
|
||
#define _STR_(s) #s | ||
#define __STR(s) _STR_(s) | ||
|
||
#define BUILD_VERSION _STR_(384f0) | ||
#define BUILD_VERSION _STR_(393a3M) | ||
#define SOFTWARE_VERSION __STR(MAIN_VERSION) | ||
|
||
#endif |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include "pointdatabuffer.h" | ||
#include <QVector> | ||
#include <QLineSeries> | ||
|
||
QT_CHARTS_USE_NAMESPACE | ||
|
||
PointDataBuffer::PointDataBuffer(const QVector<QLineSeries*> *series) | ||
{ | ||
m_series = series; | ||
m_data.resize(series->size()); | ||
m_count.resize(series->size()); | ||
clear(); | ||
} | ||
|
||
void PointDataBuffer::append(int channel, double value) | ||
{ | ||
m_data[channel].append(QPointF(m_count[channel]++, value)); | ||
} | ||
|
||
int PointDataBuffer::update() | ||
{ | ||
int size = m_data.size(); | ||
|
||
for (int i = 0; i < size; ++i) { | ||
if (m_data[i].size()) { | ||
m_series->at(i)->append(m_data[i]); // append data | ||
m_data[i].clear(); // clear buffer | ||
} | ||
} | ||
return maximumCount(); | ||
} | ||
|
||
int PointDataBuffer::maximumCount() | ||
{ | ||
int max = 0; | ||
int size = m_count.size(); | ||
|
||
for (int i = 0; i < size; ++i) { | ||
if (m_count[i] > max) { | ||
max = m_count[i]; | ||
} | ||
} | ||
return max; | ||
} | ||
|
||
void PointDataBuffer::clear() | ||
{ | ||
int size = m_data.size(); | ||
|
||
for (int i = 0; i < size; ++i) { | ||
m_series->at(i)->clear(); // clear series data | ||
m_data[i].clear(); // clear buffer | ||
m_count[i] = 0; // clear count | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.