udp_thread = std::thread(&MainWindow::udp_thread_func, this, 6000);
udp_thread2 = std::thread(&MainWindow::udp_thread_func, this, 6001);
+ udp_thread3 = std::thread(&MainWindow::udp_thread_func, this, 6002);
connect(ui->ws_disconnect_btn, &QPushButton::clicked, this, &MainWindow::ws_disconnect_clicked);
connect(ui->set_initials_btn, &QPushButton::clicked, this, &MainWindow::set_initials_clicked);
connect(ui->set_match_2_initials_btn, &QPushButton::clicked, this, &MainWindow::set_match_2_initials_clicked);
+ connect(ui->set_match_3_initials_btn, &QPushButton::clicked, this, &MainWindow::set_match_3_initials_clicked);
connect(ui->set_color_btn, &QPushButton::clicked, this, &MainWindow::set_color_clicked);
connect(ui->set_score_btn, &QPushButton::clicked, this, &MainWindow::set_score_clicked);
connect(ui->set_all_scorebug_btn, &QPushButton::clicked, this, &MainWindow::set_all_scorebug_clicked);
connect(ui->hide_clock_btn, &QPushButton::clicked, this, &MainWindow::hide_clock_clicked);
connect(ui->show_match_2_btn, &QPushButton::clicked, this, &MainWindow::show_match_2_clicked);
connect(ui->hide_match_2_btn, &QPushButton::clicked, this, &MainWindow::hide_match_2_clicked);
+ connect(ui->show_match_3_btn, &QPushButton::clicked, this, &MainWindow::show_match_3_clicked);
+ connect(ui->hide_match_3_btn, &QPushButton::clicked, this, &MainWindow::hide_match_3_clicked);
connect(ui->set_comment_btn, &QPushButton::clicked, this, &MainWindow::set_comment_clicked);
connect(ui->set_and_show_comment_btn, &QPushButton::clicked, this, &MainWindow::set_and_show_comment_clicked);
ws->send_command("eval setteams2()");
}
+void MainWindow::set_match_3_initials_clicked()
+{
+ map<string, string> param;
+ param["team1"] = escape_html(ui->match_3_initials_1_edit->text().toStdString());
+ param["team2"] = escape_html(ui->match_3_initials_2_edit->text().toStdString());
+ ws->send_command("update " + serialize_as_json(param));
+ ws->send_command("eval setteams2()");
+}
+
void MainWindow::set_color_clicked()
{
map<string, string> param;
ws->send_command("eval hidematch2()");
}
+void MainWindow::show_match_3_clicked()
+{
+ ws->send_command("eval showmatch3()");
+}
+
+void MainWindow::hide_match_3_clicked()
+{
+ ws->send_command("eval hidematch3()");
+}
+
void MainWindow::set_comment_clicked()
{
map<string, string> param;
void MainWindow::bt6000_message_received(const string &msg, int port)
{
fprintf(stderr, "BT6000 message: '%s' (port %d)\n", msg.c_str(), port);
- if (port == 6001) {
+ if (port == 6002) {
+ if (!ui->bt6000_3_enable->isChecked()) {
+ return;
+ }
+ } else if (port == 6001) {
if (!ui->bt6000_2_enable->isChecked()) {
return;
}