small changes
This commit is contained in:
parent
0b9c978a6d
commit
59cbd2a84f
6 changed files with 12 additions and 25 deletions
|
@ -58,8 +58,8 @@ function initWebSocket() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DrawTrig ();
|
DrawTrig ();
|
||||||
DrawPolyLine (0, obj.a, '#FF0000');
|
DrawPolyLine (0, obj.a, '#00FF00');
|
||||||
DrawPolyLine (1, obj.b, '#00FF00');
|
DrawPolyLine (1, obj.b, '#FF0000');
|
||||||
};
|
};
|
||||||
websocket.onerror = function (evt) {
|
websocket.onerror = function (evt) {
|
||||||
console.log ('ERROR: ' + evt.data);
|
console.log ('ERROR: ' + evt.data);
|
||||||
|
@ -203,13 +203,6 @@ function Connect () {
|
||||||
} else {
|
} else {
|
||||||
initWebSocket ();
|
initWebSocket ();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
DrawTrig ();
|
|
||||||
const d1 = [10,20,30,40,50];
|
|
||||||
const d2 = [3000];
|
|
||||||
DrawPolyLine (0, d1, '#FF0000');
|
|
||||||
DrawPolyLine (1, d2, '#00FF00');
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
function Start () {
|
function Start () {
|
||||||
SendEvent ({ type : 'start', value : 1 });
|
SendEvent ({ type : 'start', value : 1 });
|
||||||
|
|
|
@ -14,18 +14,10 @@ using namespace std;
|
||||||
using namespace seasocks;
|
using namespace seasocks;
|
||||||
|
|
||||||
static string channels_to_json (const vector<int> & a, const vector<int> & b) {
|
static string channels_to_json (const vector<int> & a, const vector<int> & b) {
|
||||||
string res ("{\"a\":[");
|
json msg;
|
||||||
for (const int e: a) {
|
msg["a"] = a;
|
||||||
res += to_string(e) + ",";
|
msg["b"] = b;
|
||||||
}
|
return to_string(msg);
|
||||||
res = res.substr(0, res.length() - 1);
|
|
||||||
res+= "],\"b\":[";
|
|
||||||
for (const int e: b) {
|
|
||||||
res += to_string(e) + ",";
|
|
||||||
}
|
|
||||||
res = res.substr(0, res.length() - 1);
|
|
||||||
res+= "]}";
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
bool WsClient::start() {
|
bool WsClient::start() {
|
||||||
cout << "Client Start\n";
|
cout << "Client Start\n";
|
||||||
|
|
|
@ -103,7 +103,6 @@ void DataSource::parse_reply(const char * data, const int len) {
|
||||||
trigerSettings.rising = as.part.trg.rising;
|
trigerSettings.rising = as.part.trg.rising;
|
||||||
trigerSettings.offset = as.part.trg.offset;
|
trigerSettings.offset = as.part.trg.offset;
|
||||||
trigerSettings.value = as.part.trg.value;
|
trigerSettings.value = as.part.trg.value;
|
||||||
//trigerSettings. = as.part.trg.channel;
|
|
||||||
emit SettingReceived (as);
|
emit SettingReceived (as);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,10 +182,14 @@ void DisplayWidget::reloadMatrix(const QSize & sz) {
|
||||||
m_forward = tm;
|
m_forward = tm;
|
||||||
m_inverse = m_forward.inverted();
|
m_inverse = m_forward.inverted();
|
||||||
}
|
}
|
||||||
void DisplayWidget::Refresh() {
|
/*
|
||||||
|
void DisplayWidget::Refresh(int n) {
|
||||||
|
m_timeBase = n;
|
||||||
|
reloadMatrix (size());
|
||||||
drawBackground();
|
drawBackground();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
void DisplayWidget::TimeBaseRange(int n) {
|
void DisplayWidget::TimeBaseRange(int n) {
|
||||||
m_timeBase = n;
|
m_timeBase = n;
|
||||||
reloadMatrix (size());
|
reloadMatrix (size());
|
||||||
|
|
|
@ -39,7 +39,6 @@ class DisplayWidget : public QWidget {
|
||||||
void MarkerChanged (bool);
|
void MarkerChanged (bool);
|
||||||
void saveSettings (QSettings & setting);
|
void saveSettings (QSettings & setting);
|
||||||
void restSettings (QSettings & setting);
|
void restSettings (QSettings & setting);
|
||||||
void Refresh ();
|
|
||||||
|
|
||||||
void resizeEvent (QResizeEvent * event) override;
|
void resizeEvent (QResizeEvent * event) override;
|
||||||
void paintEvent (QPaintEvent * event) override;
|
void paintEvent (QPaintEvent * event) override;
|
||||||
|
|
|
@ -74,7 +74,7 @@ void MainWindow::SetSelections(AllSettings as) {
|
||||||
ui->comboMode ->setCurrentIndex(as.part.trg.mode);
|
ui->comboMode ->setCurrentIndex(as.part.trg.mode);
|
||||||
ui->comboRissing ->setCurrentIndex(as.part.trg.rising ? 1 : 0);
|
ui->comboRissing ->setCurrentIndex(as.part.trg.rising ? 1 : 0);
|
||||||
ui->comboTimeRange->setCurrentIndex(as.part.tim);
|
ui->comboTimeRange->setCurrentIndex(as.part.tim);
|
||||||
ui->Display->Refresh();
|
ui->Display->TimeBaseRange(as.part.tim);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow () {
|
MainWindow::~MainWindow () {
|
||||||
|
|
Loading…
Reference in a new issue