fix: 修复光电吊舱左右方向调节相反的问题

video_old
cbwu 6 months ago
parent 4636475de9
commit c65d401b5d

@ -72,12 +72,11 @@ void GDDCCmdDlg::initParam() {
m_paramInfraredWarning = 0; m_paramInfraredWarning = 0;
ui->swtichButton_4_1->setChecked(false); ui->swtichButton_4_1->setChecked(false);
ui->swtichButton_4_1->setFixedSize(100,20); ui->swtichButton_4_1->setFixedSize(100, 20);
ui->swtichButton_4_1->setButtonStyle(ImageSwitch::ButtonStyle_1); ui->swtichButton_4_1->setButtonStyle(ImageSwitch::ButtonStyle_1);
//绑定选中切换信号 // 绑定选中切换信号
connect(ui->swtichButton_4_1, SIGNAL(checkedChanged(bool)), this, SLOT(checkedChangedSlot(bool))); connect(ui->swtichButton_4_1, SIGNAL(checkedChanged(bool)), this,
SLOT(checkedChangedSlot(bool)));
/*稳定平台*/ /*稳定平台*/
ui->comboBox_5_1->addItem("非常慢"); ui->comboBox_5_1->addItem("非常慢");
@ -664,26 +663,23 @@ void GDDCCmdDlg::on_pushButton_4_18_pressed() {
void GDDCCmdDlg::on_pushButton_4_18_released() { clearTJDCCmdBuffer(); } void GDDCCmdDlg::on_pushButton_4_18_released() { clearTJDCCmdBuffer(); }
// 红外报警设置 // 红外报警设置
void GDDCCmdDlg::on_pushButton_4_19_pressed() void GDDCCmdDlg::on_pushButton_4_19_pressed() {
{ UINT8 Bit0 = 0b00000001; // 测温型
UINT8 Bit0 = 0b00000001; // 测温型 int sel = ui->lineEdit_4_2->text().toDouble() * 10;
int sel = ui->lineEdit_4_2->text().toDouble()*10; TJDCCmdBuffer[0] = (std::byte)(m_paramInfraredWarning + Bit0);
TJDCCmdBuffer[0] = (std::byte)(m_paramInfraredWarning+Bit0); TJDCCmdBuffer[1] = (std::byte)sel;
TJDCCmdBuffer[1] = (std::byte)sel; TJDCCmdBuffer[2] = (std::byte)(sel >> 8);
TJDCCmdBuffer[2] = (std::byte)(sel>>8);
} }
void GDDCCmdDlg::on_pushButton_4_19_released() { clearTJDCCmdBuffer(); }
void GDDCCmdDlg::on_pushButton_4_19_released(){ clearTJDCCmdBuffer(); }
// 开启/关闭温度报警或者阈值检测功能 // 开启/关闭温度报警或者阈值检测功能
void GDDCCmdDlg::checkedChangedSlot(bool param) void GDDCCmdDlg::checkedChangedSlot(bool param) {
{ if (!param) {
if(!param) { m_paramInfraredWarning = 0b00000000; // 关闭
m_paramInfraredWarning = 0b00000000;// 关闭 } else {
} else { m_paramInfraredWarning = 0b10000000; // 开启
m_paramInfraredWarning = 0b10000000;// 开启 }
}
} }
// 俯仰+ // 俯仰+
@ -713,8 +709,8 @@ void GDDCCmdDlg::on_pushButton_5_2_pressed() {
int sel = ui->comboBox_5_1->currentIndex(); int sel = ui->comboBox_5_1->currentIndex();
sel += 1; sel += 1;
TJDCCmdBuffer[5] = (std::byte)0x70; TJDCCmdBuffer[5] = (std::byte)0x70;
TJDCCmdBuffer[6] = (std::byte)(sel * 2); TJDCCmdBuffer[6] = (std::byte)(-sel * 2);
TJDCCmdBuffer[7] = (std::byte)((sel * 2) >> 8); TJDCCmdBuffer[7] = (std::byte)((-sel * 2) >> 8);
TJDCCmdBuffer[8] = (std::byte)0x00; TJDCCmdBuffer[8] = (std::byte)0x00;
TJDCCmdBuffer[9] = (std::byte)0x00; TJDCCmdBuffer[9] = (std::byte)0x00;
} else { } else {
@ -753,8 +749,8 @@ void GDDCCmdDlg::on_pushButton_5_4_pressed() {
int sel = ui->comboBox_5_1->currentIndex(); int sel = ui->comboBox_5_1->currentIndex();
sel += 1; sel += 1;
TJDCCmdBuffer[5] = (std::byte)0x70; TJDCCmdBuffer[5] = (std::byte)0x70;
TJDCCmdBuffer[6] = (std::byte)(-sel * 2); TJDCCmdBuffer[6] = (std::byte)(sel * 2);
TJDCCmdBuffer[7] = (std::byte)((-sel * 2) >> 8); TJDCCmdBuffer[7] = (std::byte)((sel * 2) >> 8);
TJDCCmdBuffer[8] = (std::byte)0x00; TJDCCmdBuffer[8] = (std::byte)0x00;
TJDCCmdBuffer[9] = (std::byte)0x00; TJDCCmdBuffer[9] = (std::byte)0x00;
} else { } else {
@ -960,6 +956,3 @@ void GDDCCmdDlg::on_pushButton_6_8_clicked() {
ui->pushButton_6_8->setDown(false); ui->pushButton_6_8->setDown(false);
} }
} }

@ -80,7 +80,7 @@
<enum>QTabWidget::TabShape::Rounded</enum> <enum>QTabWidget::TabShape::Rounded</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>5</number> <number>4</number>
</property> </property>
<property name="elideMode"> <property name="elideMode">
<enum>Qt::TextElideMode::ElideNone</enum> <enum>Qt::TextElideMode::ElideNone</enum>

@ -145,6 +145,9 @@ bool Cffmpeg_decode::open_input_file() {
decoderCtx->height, // decoderCtx->height, //
AV_PIX_FMT_RGB32, // AV_PIX_FMT_RGB32, //
SWS_BICUBIC, NULL, NULL, NULL); SWS_BICUBIC, NULL, NULL, NULL);
// 颜色空间调整(可选)
// sws_setColorspaceDetails(swsCtx, sws_getCoefficients(SWS_CS_DEFAULT), 0,
// sws_getCoefficients(SWS_CS_DEFAULT), 0, 0, 0, 0);
numBytes = av_image_get_buffer_size(AV_PIX_FMT_RGB32, // numBytes = av_image_get_buffer_size(AV_PIX_FMT_RGB32, //
decoderCtx->width, // decoderCtx->width, //
decoderCtx->height, // decoderCtx->height, //

Loading…
Cancel
Save