|
@ -221,16 +221,6 @@ void MainWindow::construct_reg_table() { // |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "ttlout4_config", reg::kttlout4_config, 0, kreg_val_type_hex); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "ttlout4_config", reg::kttlout4_config, 0, kreg_val_type_hex); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "ttlout4_pulse_mode_duration", reg::kttlout4_pulse_mode_duration, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "ttlout4_pulse_mode_duration", reg::kttlout4_pulse_mode_duration, 0, kreg_val_type_decimal); |
|
|
|
|
|
|
|
|
// kSigGenerator_ctl
|
|
|
|
|
|
// kSigGenerator_genlock_format
|
|
|
|
|
|
// kSigGenerator_timecode_format
|
|
|
|
|
|
// kSigGenerator_control_trigger_reg
|
|
|
|
|
|
// kSigGenerator_timecode0
|
|
|
|
|
|
// kSigGenerator_timecode1
|
|
|
|
|
|
// kSigGenerator_timecode_start0
|
|
|
|
|
|
// kSigGenerator_timecode_start1
|
|
|
|
|
|
// kSigGenerator_work_state
|
|
|
|
|
|
|
|
|
|
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_ctl", reg::kSigGenerator_ctl, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_ctl", reg::kSigGenerator_ctl, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_genlock_format", reg::kSigGenerator_genlock_format, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_genlock_format", reg::kSigGenerator_genlock_format, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_timecode_format", reg::kSigGenerator_timecode_format, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_timecode_format", reg::kSigGenerator_timecode_format, 0, kreg_val_type_decimal); |
|
@ -241,9 +231,18 @@ void MainWindow::construct_reg_table() { // |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_timecode_start1", reg::kSigGenerator_timecode_start1, 0, kreg_val_type_dotted_hex); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_timecode_start1", reg::kSigGenerator_timecode_start1, 0, kreg_val_type_dotted_hex); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_work_state", reg::kSigGenerator_work_state, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "SigGenerator_work_state", reg::kSigGenerator_work_state, 0, kreg_val_type_decimal); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push_reg(ui->gridLayoutWidget, regoff++, "camera_sync_out_camera_sync_select", reg::kcamera_sync_out_camera_sync_select, 0, kreg_val_type_decimal); |
|
|
push_reg(ui->gridLayoutWidget, regoff++, "camera_sync_out_camera_sync_select", reg::kcamera_sync_out_camera_sync_select, 0, kreg_val_type_decimal); |
|
|
|
|
|
|
|
|
|
|
|
// ktimecode_in_timecode_sig_selt
|
|
|
|
|
|
// ktimecode_in_timecode_format
|
|
|
|
|
|
// ktimecode_in_timecode0
|
|
|
|
|
|
// ktimecode_in_timecode1
|
|
|
|
|
|
|
|
|
|
|
|
push_reg(ui->gridLayoutWidget, regoff++, "timecode_in_timecode_sig_selt", reg::ktimecode_in_timecode_sig_selt, 0, kreg_val_type_decimal); |
|
|
|
|
|
push_reg(ui->gridLayoutWidget, regoff++, "timecode_in_timecode_format", reg::ktimecode_in_timecode_format, 0, kreg_val_type_decimal); |
|
|
|
|
|
push_reg(ui->gridLayoutWidget, regoff++, "timecode_in_timecode0", reg::ktimecode_in_timecode0, 0, kreg_val_type_dotted_hex); |
|
|
|
|
|
push_reg(ui->gridLayoutWidget, regoff++, "timecode_in_timecode1", reg::ktimecode_in_timecode1, 0, kreg_val_type_dotted_hex); |
|
|
|
|
|
|
|
|
// 设置table的高度
|
|
|
// 设置table的高度
|
|
|
auto qrect = ui->gridLayoutWidget->geometry(); |
|
|
auto qrect = ui->gridLayoutWidget->geometry(); |
|
|
qrect.setHeight(31 * regoff - 1); |
|
|
qrect.setHeight(31 * regoff - 1); |
|
@ -313,6 +312,24 @@ void MainWindow::UI_CameraSyncPacketGeneratorModuleConstruct() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::UI_TimecodeInModuleConstruct() { |
|
|
|
|
|
ui->TimecodeInputModule_Format->clear(); |
|
|
|
|
|
for (auto &str : TimecodeFormatStrSet()) { |
|
|
|
|
|
ui->TimecodeInputModule_Format->addItem(QString::fromStdString(str)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ui->TimecodeInputModule_TriggerSigType->clear(); |
|
|
|
|
|
for (auto &str : timecode_input_module::TriggerSigTypeStrSet()) { |
|
|
|
|
|
ui->TimecodeInputModule_TriggerSigType->addItem(QString::fromStdString(str)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
void MainWindow::UI_TTLInModuleConstruct() { |
|
|
|
|
|
ui->TTLInputModule_Index->clear(); |
|
|
|
|
|
for (int i = 1; i <= 4; i++) { |
|
|
|
|
|
ui->TTLInputModule_Index->addItem(QString::number(i)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { |
|
|
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { |
|
|
ui->setupUi(this); |
|
|
ui->setupUi(this); |
|
|
m_mainWindow = this; |
|
|
m_mainWindow = this; |
|
@ -326,6 +343,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi |
|
|
UI_SigGeneratorConstruct(); |
|
|
UI_SigGeneratorConstruct(); |
|
|
UI_TimecodeOutputModuleConstruct(); |
|
|
UI_TimecodeOutputModuleConstruct(); |
|
|
UI_CameraSyncPacketGeneratorModuleConstruct(); |
|
|
UI_CameraSyncPacketGeneratorModuleConstruct(); |
|
|
|
|
|
UI_TimecodeInModuleConstruct(); |
|
|
|
|
|
UI_TTLInModuleConstruct(); |
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
/*******************************************************************************
|
|
|
* 连接信号与槽 * |
|
|
* 连接信号与槽 * |
|
@ -589,3 +608,55 @@ void MainWindow::on_CameraSyncPacketGeneratorModule_ClearPacketIndex_clicked() { |
|
|
DO_XSYNC_FUNC(Xsync::Ins().CameraSyncPacketGeneratorModule_clearPacketIndex()); |
|
|
DO_XSYNC_FUNC(Xsync::Ins().CameraSyncPacketGeneratorModule_clearPacketIndex()); |
|
|
on_CameraSyncPacketGeneratorModule_Read_clicked(); |
|
|
on_CameraSyncPacketGeneratorModule_Read_clicked(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::on_TTLInputModule_Read_clicked() { |
|
|
|
|
|
int32_t Index = ui->TTLInputModule_Index->currentText().toInt(); |
|
|
|
|
|
uint32_t DivideFactor; |
|
|
|
|
|
uint32_t FilterFactor; |
|
|
|
|
|
bool En; |
|
|
|
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule_getDivideFactor(Index, DivideFactor)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule_getFilterFactor(Index, FilterFactor)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule_getEn(Index, En)); |
|
|
|
|
|
|
|
|
|
|
|
ui->TTLInputModule_DivideFactor->setText(QString::number(DivideFactor)); |
|
|
|
|
|
ui->TTLInputModule_FilterFactor->setText(QString::number(FilterFactor)); |
|
|
|
|
|
ui->TTLInputModule_En->setText(QString::number(En)); |
|
|
|
|
|
} |
|
|
|
|
|
void MainWindow::on_TTLInputModule_Update_clicked() { |
|
|
|
|
|
int32_t Index = ui->TTLInputModule_Index->currentText().toInt(); |
|
|
|
|
|
uint32_t DivideFactor; |
|
|
|
|
|
uint32_t FilterFactor; |
|
|
|
|
|
bool En; |
|
|
|
|
|
|
|
|
|
|
|
DivideFactor = ui->TTLInputModule_DivideFactor->text().toUInt(); |
|
|
|
|
|
FilterFactor = ui->TTLInputModule_FilterFactor->text().toUInt(); |
|
|
|
|
|
En = ui->TTLInputModule_En->text().toUInt(); |
|
|
|
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule_setDivideFactor(Index, DivideFactor)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule_setFilterFactor(Index, FilterFactor)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule_setEn(Index, En)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::on_TimecodeInputModule_Read_clicked() { |
|
|
|
|
|
TimecodeFormat_t Format; |
|
|
|
|
|
timecode_input_module::TriggerSigType_t TriggerSig; |
|
|
|
|
|
XsyncTimecode_t Timecode; |
|
|
|
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TimecodeInputModule_getSrcSelect(TriggerSig)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TimecodeInputModule_getTimecodeFormat(Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TimecodeInputModule_getTimecode(Timecode)); |
|
|
|
|
|
|
|
|
|
|
|
// ZLOGI(TAG, "on_TimecodeInputModule_Read_clicked TriggerSig:%d Format:%d Timecode:%d %d %d %d", TriggerSig, Format, Timecode.hour, Timecode.minute, Timecode.second, Timecode.frame);
|
|
|
|
|
|
|
|
|
|
|
|
ui->TimecodeInputModule_TriggerSigType->setCurrentText(QString::fromStdString(timecode_input_module::TriggerSigType2Str(TriggerSig))); |
|
|
|
|
|
ui->TimecodeInputModule_Format->setCurrentText(QString::fromStdString(TimecodeFormatToStr(Format))); |
|
|
|
|
|
ui->TimecodeInputModule_Timecode->setText(QString(XsyncTimecodeToStr(Timecode).c_str())); |
|
|
|
|
|
} |
|
|
|
|
|
void MainWindow::on_TimecodeInputModule_Update_clicked() { |
|
|
|
|
|
auto TriggerSig = timecode_input_module::Str2TriggerSigType(ui->TimecodeInputModule_TriggerSigType->currentText().toStdString()); |
|
|
|
|
|
TimecodeFormat_t Format = Str2TimecodeFormat(ui->TimecodeInputModule_Format->currentText().toStdString()); |
|
|
|
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TimecodeInputModule_setSrcSelect(TriggerSig)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TimecodeInputModule_setTimecodeFormat(Format)); |
|
|
|
|
|
} |