small changes

This commit is contained in:
Kizarm 2024-10-26 14:32:07 +02:00
parent 0b9c978a6d
commit 59cbd2a84f
6 changed files with 12 additions and 25 deletions

View file

@ -58,8 +58,8 @@ function initWebSocket() {
return;
}
DrawTrig ();
DrawPolyLine (0, obj.a, '#FF0000');
DrawPolyLine (1, obj.b, '#00FF00');
DrawPolyLine (0, obj.a, '#00FF00');
DrawPolyLine (1, obj.b, '#FF0000');
};
websocket.onerror = function (evt) {
console.log ('ERROR: ' + evt.data);
@ -203,13 +203,6 @@ function Connect () {
} else {
initWebSocket ();
}
/*
DrawTrig ();
const d1 = [10,20,30,40,50];
const d2 = [3000];
DrawPolyLine (0, d1, '#FF0000');
DrawPolyLine (1, d2, '#00FF00');
*/
};
function Start () {
SendEvent ({ type : 'start', value : 1 });

View file

@ -14,18 +14,10 @@ using namespace std;
using namespace seasocks;
static string channels_to_json (const vector<int> & a, const vector<int> & b) {
string res ("{\"a\":[");
for (const int e: a) {
res += to_string(e) + ",";
}
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;
json msg;
msg["a"] = a;
msg["b"] = b;
return to_string(msg);
}
bool WsClient::start() {
cout << "Client Start\n";

View file

@ -103,7 +103,6 @@ void DataSource::parse_reply(const char * data, const int len) {
trigerSettings.rising = as.part.trg.rising;
trigerSettings.offset = as.part.trg.offset;
trigerSettings.value = as.part.trg.value;
//trigerSettings. = as.part.trg.channel;
emit SettingReceived (as);
}

View file

@ -182,10 +182,14 @@ void DisplayWidget::reloadMatrix(const QSize & sz) {
m_forward = tm;
m_inverse = m_forward.inverted();
}
void DisplayWidget::Refresh() {
/*
void DisplayWidget::Refresh(int n) {
m_timeBase = n;
reloadMatrix (size());
drawBackground();
update();
}
*/
void DisplayWidget::TimeBaseRange(int n) {
m_timeBase = n;
reloadMatrix (size());

View file

@ -39,7 +39,6 @@ class DisplayWidget : public QWidget {
void MarkerChanged (bool);
void saveSettings (QSettings & setting);
void restSettings (QSettings & setting);
void Refresh ();
void resizeEvent (QResizeEvent * event) override;
void paintEvent (QPaintEvent * event) override;

View file

@ -74,7 +74,7 @@ void MainWindow::SetSelections(AllSettings as) {
ui->comboMode ->setCurrentIndex(as.part.trg.mode);
ui->comboRissing ->setCurrentIndex(as.part.trg.rising ? 1 : 0);
ui->comboTimeRange->setCurrentIndex(as.part.tim);
ui->Display->Refresh();
ui->Display->TimeBaseRange(as.part.tim);
}
MainWindow::~MainWindow () {