|
@ -128,7 +128,7 @@ void MainWindow::push_reg(QWidget *parent, int off, const char *regname, int32_t |
|
|
ZLOGI(TAG, "write reg 0x%04x %d", regadd, regval); |
|
|
ZLOGI(TAG, "write reg 0x%04x %d", regadd, regval); |
|
|
|
|
|
|
|
|
uint32_t readbackval = 0; |
|
|
uint32_t readbackval = 0; |
|
|
auto ecode = Xsync::Ins().reg_write(regadd, regval, readbackval); |
|
|
|
|
|
|
|
|
auto ecode = XsyncIns()->reg_write(regadd, regval, readbackval); |
|
|
if (ecode == kxs_ec_success) { |
|
|
if (ecode == kxs_ec_success) { |
|
|
ZLOGI(TAG, "write reg 0x%04x %d success", regadd, regval); |
|
|
ZLOGI(TAG, "write reg 0x%04x %d success", regadd, regval); |
|
|
m_regdisplayer[regadd]->regvalcache = readbackval; |
|
|
m_regdisplayer[regadd]->regvalcache = readbackval; |
|
@ -470,19 +470,20 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi |
|
|
|
|
|
|
|
|
// m_xsync.reset(new Xsync());
|
|
|
// m_xsync.reset(new Xsync());
|
|
|
|
|
|
|
|
|
Xsync::Ins().initialize(XSyncUdpFactoryImpl::Ins()); |
|
|
|
|
|
Xsync::Ins().registerOnTimecodeMsgCallback([this](XsyncTimecode_t *timecode_msg) { //
|
|
|
|
|
|
|
|
|
// XsyncIns()->initialize(XSyncUdpFactoryImpl::Ins());
|
|
|
|
|
|
XsyncInit(XSyncUdpFactoryImpl::Ins(), "192.168.8.10"); |
|
|
|
|
|
XsyncIns()->registerOnTimecodeMsgCallback([this](XsyncTimecode_t *timecode_msg) { //
|
|
|
XsyncTimecode_t timecode = *timecode_msg; |
|
|
XsyncTimecode_t timecode = *timecode_msg; |
|
|
QString text = QString(fmt("%02d:%02d:%02d:%02d", timecode.hour, timecode.minute, timecode.second, timecode.frame)); |
|
|
QString text = QString(fmt("%02d:%02d:%02d:%02d", timecode.hour, timecode.minute, timecode.second, timecode.frame)); |
|
|
updateUI_timeCodeInfo_signal(text); |
|
|
updateUI_timeCodeInfo_signal(text); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
Xsync::Ins().registerOnCameraSyncMsgCallback([this](xysnc_camera_sync_data_t *camera_sync_msg) { //
|
|
|
|
|
|
|
|
|
XsyncIns()->registerOnCameraSyncMsgCallback([this](xysnc_camera_sync_data_t *camera_sync_msg) { //
|
|
|
xysnc_camera_sync_data_t camera_sync_data = *camera_sync_msg; |
|
|
xysnc_camera_sync_data_t camera_sync_data = *camera_sync_msg; |
|
|
updateUI_cameraSyncInfo_signal(QString(fmt("%d", camera_sync_data.frameIndex))); |
|
|
updateUI_cameraSyncInfo_signal(QString(fmt("%d", camera_sync_data.frameIndex))); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
Xsync::Ins().registerOnRecordSigChangeMsgCallback([this](uint32_t recordSig, XsyncTimecode_t *timecode_msg) { //
|
|
|
|
|
|
|
|
|
XsyncIns()->registerOnRecordSigChangeMsgCallback([this](uint32_t recordSig, XsyncTimecode_t *timecode_msg) { //
|
|
|
XsyncTimecode_t timecodecpy = *timecode_msg; |
|
|
XsyncTimecode_t timecodecpy = *timecode_msg; |
|
|
QString timecodeStr = QString(fmt("%02d:%02d:%02d:%02d", timecodecpy.hour, timecodecpy.minute, timecodecpy.second, timecodecpy.frame)); |
|
|
QString timecodeStr = QString(fmt("%02d:%02d:%02d:%02d", timecodecpy.hour, timecodecpy.minute, timecodecpy.second, timecodecpy.frame)); |
|
|
emit doinui_signal(QFunction([this, recordSig, timecodeStr]() { |
|
|
emit doinui_signal(QFunction([this, recordSig, timecodeStr]() { |
|
@ -511,7 +512,7 @@ void MainWindow::on_RefreshRegsButton_clicked() { // |
|
|
bool suc = true; |
|
|
bool suc = true; |
|
|
for (auto ® : m_regdisplayer) { |
|
|
for (auto ® : m_regdisplayer) { |
|
|
uint32_t regValue = 0; |
|
|
uint32_t regValue = 0; |
|
|
auto ecode = Xsync::Ins().reg_read(reg.first, regValue); |
|
|
|
|
|
|
|
|
auto ecode = XsyncIns()->reg_read(reg.first, regValue); |
|
|
int regoff = reg.first; |
|
|
int regoff = reg.first; |
|
|
|
|
|
|
|
|
if (ecode == kxs_ec_success) { |
|
|
if (ecode == kxs_ec_success) { |
|
@ -531,9 +532,7 @@ void MainWindow::on_ClearLogButton_clicked() { // |
|
|
ui->logbrowser->clear(); |
|
|
ui->logbrowser->clear(); |
|
|
} |
|
|
} |
|
|
void MainWindow::on_Connect2XsyncButton_clicked() { //
|
|
|
void MainWindow::on_Connect2XsyncButton_clicked() { //
|
|
|
ZLOGI(TAG, "connect %s", ui->IpInput->text().toStdString().c_str()); |
|
|
|
|
|
xs_error_code_t ecode = Xsync::Ins().connect(ui->IpInput->text().toStdString()); |
|
|
|
|
|
ZLOGI(TAG, "connect %s ecode:%s", ui->IpInput->text().toStdString().c_str(), xs_error_code_2_str(ecode)); |
|
|
|
|
|
|
|
|
XsyncIns()->changeXsyncIp(ui->IpInput->text().toStdString()); |
|
|
} |
|
|
} |
|
|
void MainWindow::mainWindowsRun() { //
|
|
|
void MainWindow::mainWindowsRun() { //
|
|
|
} |
|
|
} |
|
@ -549,11 +548,11 @@ void MainWindow::mainWindowsRun() { // |
|
|
} \ |
|
|
} \ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void MainWindow::on_GenNewMac_clicked() { DO_XSYNC_FUNC(Xsync::Ins().generatorNewMac()); } |
|
|
|
|
|
void MainWindow::on_FactoryReset_clicked() { DO_XSYNC_FUNC(Xsync::Ins().factoryReset()); } |
|
|
|
|
|
void MainWindow::on_Reboot_clicked() { DO_XSYNC_FUNC(Xsync::Ins().reboot()); } |
|
|
|
|
|
|
|
|
void MainWindow::on_GenNewMac_clicked() { DO_XSYNC_FUNC(XsyncIns()->generatorNewMac()); } |
|
|
|
|
|
void MainWindow::on_FactoryReset_clicked() { DO_XSYNC_FUNC(XsyncIns()->factoryReset()); } |
|
|
|
|
|
void MainWindow::on_Reboot_clicked() { DO_XSYNC_FUNC(XsyncIns()->reboot()); } |
|
|
void MainWindow::on_ChangeNetCfg_clicked() { //
|
|
|
void MainWindow::on_ChangeNetCfg_clicked() { //
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().changeNetworkConfig(ui->ChangeNetCfg_ip->text().toStdString(), ui->ChangeNetCfg_mask->text().toStdString(), ui->ChangeNetCfg_gateway->text().toStdString())); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->changeNetworkConfig(ui->ChangeNetCfg_ip->text().toStdString(), ui->ChangeNetCfg_mask->text().toStdString(), ui->ChangeNetCfg_gateway->text().toStdString())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void MainWindow::on_TimecodePage_Read_clicked() { |
|
|
void MainWindow::on_TimecodePage_Read_clicked() { |
|
@ -566,14 +565,14 @@ void MainWindow::on_TimecodePage_Read_clicked() { |
|
|
TimecodeFormat_t SysTimecode_Format; |
|
|
TimecodeFormat_t SysTimecode_Format; |
|
|
XsyncTimecode_t SysTimecode_Code; |
|
|
XsyncTimecode_t SysTimecode_Code; |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalTimecode_getFormat(InternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalTimecode_getCode(InternalTimecode_Code)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().ExternalTimecode_getFormat(ExternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().ExternalTimecode_getSource(ExternalTimecode_Source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().ExternalTimecode_readCode(ExternalTimecode_Code)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysTimecode_getSource(SysTimecode_Source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysTimecode_readFormat(SysTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysTimecode_readCode(SysTimecode_Code)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_getFormat(InternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_getCode(InternalTimecode_Code)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_getFormat(ExternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_getSource(ExternalTimecode_Source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_readCode(ExternalTimecode_Code)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_getSource(SysTimecode_Source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_readFormat(SysTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_readCode(SysTimecode_Code)); |
|
|
|
|
|
|
|
|
ui->InternalTimecode_Format->setCurrentText(QString::fromStdString(TimecodeFormatToStr(InternalTimecode_Format))); |
|
|
ui->InternalTimecode_Format->setCurrentText(QString::fromStdString(TimecodeFormatToStr(InternalTimecode_Format))); |
|
|
ui->InternalTimecode_Code->setText(QString(XsyncTimecodeToStr(InternalTimecode_Code).c_str())); |
|
|
ui->InternalTimecode_Code->setText(QString(XsyncTimecodeToStr(InternalTimecode_Code).c_str())); |
|
@ -591,15 +590,15 @@ void MainWindow::on_TimecodePage_Update_clicked() { |
|
|
InputInterface_t ExternalTimecode_Source = Str2InputInterface(ui->ExternalTimecode_Source->currentText().toStdString()); |
|
|
InputInterface_t ExternalTimecode_Source = Str2InputInterface(ui->ExternalTimecode_Source->currentText().toStdString()); |
|
|
uint32_t SysTimecode_Source = ui->SysTimecode_Source->currentText().toInt(); |
|
|
uint32_t SysTimecode_Source = ui->SysTimecode_Source->currentText().toInt(); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalTimecode_setFormat(InternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalTimecode_setCode(InternalTimecode_Code)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().ExternalTimecode_setFormat(ExternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().ExternalTimecode_setSource(ExternalTimecode_Source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysTimecode_setSource(SysTimecode_Source)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_setFormat(InternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_setCode(InternalTimecode_Code)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_setFormat(ExternalTimecode_Format)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_setSource(ExternalTimecode_Source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_setSource(SysTimecode_Source)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// void MainWindow::on_CameraSyncPacketGeneratorModule_ClearPacketIndex_clicked() {
|
|
|
// void MainWindow::on_CameraSyncPacketGeneratorModule_ClearPacketIndex_clicked() {
|
|
|
// DO_XSYNC_FUNC(Xsync::Ins().CameraSyncPacketGeneratorModule_clearPacketIndex());
|
|
|
|
|
|
|
|
|
// DO_XSYNC_FUNC(XsyncIns()->CameraSyncPacketGeneratorModule_clearPacketIndex());
|
|
|
// on_CameraSyncPacketGeneratorModule_Read_clicked();
|
|
|
// on_CameraSyncPacketGeneratorModule_Read_clicked();
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
@ -623,10 +622,10 @@ void MainWindow::on_TTLPage_Read_clicked() { |
|
|
uint32_t freq4 = 0; |
|
|
uint32_t freq4 = 0; |
|
|
bool En; |
|
|
bool En; |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule1_detectFreq(freq1)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule2_detectFreq(freq2)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule3_detectFreq(freq3)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLInputModule4_detectFreq(freq4)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLInputModule1_detectFreq(freq1)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLInputModule2_detectFreq(freq2)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLInputModule3_detectFreq(freq3)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLInputModule4_detectFreq(freq4)); |
|
|
|
|
|
|
|
|
ZLOGI(TAG, "freq1:%d freq2:%d freq3:%d freq4:%d", freq1, freq2, freq3, freq4); |
|
|
ZLOGI(TAG, "freq1:%d freq2:%d freq3:%d freq4:%d", freq1, freq2, freq3, freq4); |
|
|
|
|
|
|
|
@ -643,11 +642,11 @@ void MainWindow::on_TTLPage_Read_clicked() { |
|
|
float outfreq; |
|
|
float outfreq; |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
ui->TTLOutputModule_SrcSigType_1->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_SrcSigType_1->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_FreqDivision_1->setText(QString::number(div)); |
|
|
ui->TTLOutputModule_FreqDivision_1->setText(QString::number(div)); |
|
@ -657,11 +656,11 @@ void MainWindow::on_TTLPage_Read_clicked() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
ui->TTLOutputModule_SrcSigType_2->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_SrcSigType_2->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_FreqDivision_2->setText(QString::number(div)); |
|
|
ui->TTLOutputModule_FreqDivision_2->setText(QString::number(div)); |
|
@ -671,11 +670,11 @@ void MainWindow::on_TTLPage_Read_clicked() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
ui->TTLOutputModule_SrcSigType_3->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_SrcSigType_3->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_FreqDivision_3->setText(QString::number(div)); |
|
|
ui->TTLOutputModule_FreqDivision_3->setText(QString::number(div)); |
|
@ -685,11 +684,11 @@ void MainWindow::on_TTLPage_Read_clicked() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_getSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_getFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_getFreqMultiplication(multi)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_readInFreq(infreq)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_readOutFreq(outfreq)); |
|
|
|
|
|
|
|
|
ui->TTLOutputModule_SrcSigType_4->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_SrcSigType_4->setCurrentText(QString::fromStdString(SignalType2Str(source))); |
|
|
ui->TTLOutputModule_FreqDivision_4->setText(QString::number(div)); |
|
|
ui->TTLOutputModule_FreqDivision_4->setText(QString::number(div)); |
|
@ -704,9 +703,9 @@ void MainWindow::on_TTLPage_Write_clicked() { |
|
|
auto div = ui->TTLOutputModule_FreqDivision_1->text().toUInt(); |
|
|
auto div = ui->TTLOutputModule_FreqDivision_1->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_1->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_1->text().toUInt(); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule1_setFreqMultiplication(multi)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule1_setFreqMultiplication(multi)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
@ -714,9 +713,9 @@ void MainWindow::on_TTLPage_Write_clicked() { |
|
|
auto div = ui->TTLOutputModule_FreqDivision_2->text().toUInt(); |
|
|
auto div = ui->TTLOutputModule_FreqDivision_2->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_2->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_2->text().toUInt(); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule2_setFreqMultiplication(multi)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule2_setFreqMultiplication(multi)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
@ -724,9 +723,9 @@ void MainWindow::on_TTLPage_Write_clicked() { |
|
|
auto div = ui->TTLOutputModule_FreqDivision_3->text().toUInt(); |
|
|
auto div = ui->TTLOutputModule_FreqDivision_3->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_3->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_3->text().toUInt(); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule3_setFreqMultiplication(multi)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule3_setFreqMultiplication(multi)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
@ -734,105 +733,105 @@ void MainWindow::on_TTLPage_Write_clicked() { |
|
|
auto div = ui->TTLOutputModule_FreqDivision_4->text().toUInt(); |
|
|
auto div = ui->TTLOutputModule_FreqDivision_4->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_4->text().toUInt(); |
|
|
auto multi = ui->TTLOutputModule_FreqMultiplication_4->text().toUInt(); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().TTLOutputModule4_setFreqMultiplication(multi)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_setSrcSigType(source)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_setFreqDivision(div)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->TTLOutputModule4_setFreqMultiplication(multi)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void MainWindow::on_GenlockPage_Read_clicked() { |
|
|
void MainWindow::on_GenlockPage_Read_clicked() { |
|
|
{ |
|
|
{ |
|
|
GenlockFormat_t format; |
|
|
GenlockFormat_t format; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalGenlock_getFormat(format)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalGenlock_getFormat(format)); |
|
|
ui->InternalGenlock_Format->setCurrentText(QString::fromStdString(GenlockFormatToStr(format))); |
|
|
ui->InternalGenlock_Format->setCurrentText(QString::fromStdString(GenlockFormatToStr(format))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
float freq; |
|
|
float freq; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().ExternalGenlock_detectFreq(freq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->ExternalGenlock_detectFreq(freq)); |
|
|
ui->ExternalGenlock_Freq->setText(QString::number(freq, 'f', 2)); |
|
|
ui->ExternalGenlock_Freq->setText(QString::number(freq, 'f', 2)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
uint32_t src; |
|
|
uint32_t src; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysGenlock_getSrc(src)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysGenlock_getSrc(src)); |
|
|
ui->SysGenlock_Src->setCurrentText(QString::number(src)); |
|
|
ui->SysGenlock_Src->setCurrentText(QString::number(src)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
float freq; |
|
|
float freq; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysGenlock_readFreq(freq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysGenlock_readFreq(freq)); |
|
|
ui->SysGenlock_Freq->setText(QString::number(freq, 'f', 2)); |
|
|
ui->SysGenlock_Freq->setText(QString::number(freq, 'f', 2)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
void MainWindow::on_GenlockPage_Write_clicked() { |
|
|
void MainWindow::on_GenlockPage_Write_clicked() { |
|
|
{ |
|
|
{ |
|
|
auto format = Str2GenlockFormat(ui->InternalGenlock_Format->currentText().toStdString()); |
|
|
auto format = Str2GenlockFormat(ui->InternalGenlock_Format->currentText().toStdString()); |
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalGenlock_setFormat(format)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalGenlock_setFormat(format)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
auto src = ui->SysGenlock_Src->currentText().toUInt(); |
|
|
auto src = ui->SysGenlock_Src->currentText().toUInt(); |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysGenlock_setSrc(src)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysGenlock_setSrc(src)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void MainWindow::on_SysClockPage_Read_clicked() { |
|
|
void MainWindow::on_SysClockPage_Read_clicked() { |
|
|
{ |
|
|
{ |
|
|
float freq; |
|
|
float freq; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalClock_getFreq(freq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalClock_getFreq(freq)); |
|
|
ui->InternalClock_Freq->setText(QString::number(freq, 'f', 2)); |
|
|
ui->InternalClock_Freq->setText(QString::number(freq, 'f', 2)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
SignalType_t src; |
|
|
SignalType_t src; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_getSrc(src)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_getSrc(src)); |
|
|
ui->SysClock_Src->setCurrentText(QString::fromStdString(SignalType2Str(src))); |
|
|
ui->SysClock_Src->setCurrentText(QString::fromStdString(SignalType2Str(src))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
uint32_t div; |
|
|
uint32_t div; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_geFreqtDivision(div)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_geFreqtDivision(div)); |
|
|
ui->SysClock_FreqtDivision->setText(QString::number(div)); |
|
|
ui->SysClock_FreqtDivision->setText(QString::number(div)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
uint32_t multi; |
|
|
uint32_t multi; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_getFreqMultiplication(multi)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_getFreqMultiplication(multi)); |
|
|
ui->SysClock_FreqMultiplication->setText(QString::number(multi)); |
|
|
ui->SysClock_FreqMultiplication->setText(QString::number(multi)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
float freq; |
|
|
float freq; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_readInSigFreq(freq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_readInSigFreq(freq)); |
|
|
ui->SysClock_InSigFreq->setText(QString::number(freq, 'f', 2)); |
|
|
ui->SysClock_InSigFreq->setText(QString::number(freq, 'f', 2)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
float freq; |
|
|
float freq; |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_readOutSigFreq(freq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_readOutSigFreq(freq)); |
|
|
ui->SysClock_OutSigFreq->setText(QString::number(freq, 'f', 2)); |
|
|
ui->SysClock_OutSigFreq->setText(QString::number(freq, 'f', 2)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
void MainWindow::on_SysClockPage_Wirte_clicked() { |
|
|
void MainWindow::on_SysClockPage_Wirte_clicked() { |
|
|
{ |
|
|
{ |
|
|
auto freq = ui->InternalClock_Freq->text().toFloat(); |
|
|
auto freq = ui->InternalClock_Freq->text().toFloat(); |
|
|
DO_XSYNC_FUNC(Xsync::Ins().InternalClock_setFreq(freq)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->InternalClock_setFreq(freq)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
auto src = Str2SignalType(ui->SysClock_Src->currentText().toStdString()); |
|
|
auto src = Str2SignalType(ui->SysClock_Src->currentText().toStdString()); |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_setSrc(src)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_setSrc(src)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
auto div = ui->SysClock_FreqtDivision->text().toUInt(); |
|
|
auto div = ui->SysClock_FreqtDivision->text().toUInt(); |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_setFreqDivision(div)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_setFreqDivision(div)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
auto multi = ui->SysClock_FreqMultiplication->text().toUInt(); |
|
|
auto multi = ui->SysClock_FreqMultiplication->text().toUInt(); |
|
|
DO_XSYNC_FUNC(Xsync::Ins().SysClock_setFreqMultiplication(multi)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->SysClock_setFreqMultiplication(multi)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -849,16 +848,16 @@ void MainWindow::on_RecordSigGen_Read_clicked() { |
|
|
uint32_t state; |
|
|
uint32_t state; |
|
|
XsyncTimecode_t timecode_snapshot; |
|
|
XsyncTimecode_t timecode_snapshot; |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getContrlMode(mode)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getAutoStartTimecode(autoStartTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getAutoStopTimecode(autoStopTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getTimecodeCtrlFlag(autoStart, autoStop)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getExternalTTLTriggerSrc(ttlPortNum)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getExternalTTLTriggerPolarity(polarity)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getRecordExposureTime(exposureTime)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getRecordExposureOffsetTime(exposureOffsetTime)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_getRecordState(state)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_readTimecodeSnapshot(timecode_snapshot)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getContrlMode(mode)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getAutoStartTimecode(autoStartTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getAutoStopTimecode(autoStopTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getTimecodeCtrlFlag(autoStart, autoStop)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getExternalTTLTriggerSrc(ttlPortNum)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getExternalTTLTriggerPolarity(polarity)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getRecordExposureTime(exposureTime)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getRecordExposureOffsetTime(exposureOffsetTime)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_getRecordState(state)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_readTimecodeSnapshot(timecode_snapshot)); |
|
|
|
|
|
|
|
|
ui->RecordSigGenerator_ContrlMode->setCurrentText(QString::fromStdString(ControlMode2Str(mode))); |
|
|
ui->RecordSigGenerator_ContrlMode->setCurrentText(QString::fromStdString(ControlMode2Str(mode))); |
|
|
ui->RecordSigGenerator_AutoStartTimecode->setText(QString(XsyncTimecodeToStr(autoStartTimecode).c_str())); |
|
|
ui->RecordSigGenerator_AutoStartTimecode->setText(QString(XsyncTimecodeToStr(autoStartTimecode).c_str())); |
|
@ -885,14 +884,14 @@ void MainWindow::on_RecordSigGen_Write_clicked() { |
|
|
|
|
|
|
|
|
// RecordSigGenerator_readTimecodeSnapshot
|
|
|
// RecordSigGenerator_readTimecodeSnapshot
|
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setContrlMode(mode)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setAutoStartTimecode(autoStartTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setAutoStopTimecode(autoStopTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setTimecodeCtrlFlag(autoStart, autoStop)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setExternalTTLTriggerSrc(ttlPortNum)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setExternalTTLTriggerPolarity(polarity)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setRecordExposureTime(exposureTime)); |
|
|
|
|
|
DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_setRecordExposureOffsetTime(exposureOffsetTime)); |
|
|
|
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setContrlMode(mode)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setAutoStartTimecode(autoStartTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setAutoStopTimecode(autoStopTimecode)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setTimecodeCtrlFlag(autoStart, autoStop)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setExternalTTLTriggerSrc(ttlPortNum)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setExternalTTLTriggerPolarity(polarity)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setRecordExposureTime(exposureTime)); |
|
|
|
|
|
DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_setRecordExposureOffsetTime(exposureOffsetTime)); |
|
|
} |
|
|
} |
|
|
void MainWindow::on_RecordSigGenerator_manualStart_clicked() { DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_manualStart()); } |
|
|
|
|
|
void MainWindow::on_RecordSigGenerator_manualStop_clicked() { DO_XSYNC_FUNC(Xsync::Ins().RecordSigGenerator_manualStop()); } |
|
|
|
|
|
|
|
|
void MainWindow::on_RecordSigGenerator_manualStart_clicked() { DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_manualStart()); } |
|
|
|
|
|
void MainWindow::on_RecordSigGenerator_manualStop_clicked() { DO_XSYNC_FUNC(XsyncIns()->RecordSigGenerator_manualStop()); } |