Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:magao-x/MagAOX into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredmales committed Dec 1, 2023
2 parents 386ba52 + 462dfd6 commit 75d4654
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 24 deletions.
2 changes: 1 addition & 1 deletion gui/apps/stageGUI/stageGUI_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int main(int argc, char *argv[])
{
if(argc < 2)
{
std::cerr << "Must specify DM INDI name.\n";
std::cerr << "Must specify stage INDI name.\n";
return -1;
}

Expand Down
27 changes: 21 additions & 6 deletions gui/rtimv/plugins/pwfsAlignment/pwfsAlignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,31 @@ int pwfsAlignment::attachOverlay( rtimvOverlayAccess & roa,
)
{

config.configUnused(m_deviceName, mx::app::iniFile::makeKey("pwfsAlignment", "name"));
config.configUnused(m_deviceName, mx::app::iniFile::makeKey("pwfsAlignment", "name"));

if(m_deviceName == "") return 1; //Tell rtimv we can't be used.
if(m_deviceName == "") return 1; //Tell rtimv we can't be used.

m_roa = roa;
m_roa = roa;

if(m_enabled) enableOverlay();
else disableOverlay();

return 0;

if(m_roa.m_dictionary != nullptr)
{
//Register these
(*m_roa.m_dictionary)[m_deviceName + ".numPupils"].setBlob(nullptr, 0);
(*m_roa.m_dictionary)[m_deviceName + ".sm_frameSize"].setBlob(nullptr, 0);
(*m_roa.m_dictionary)[m_deviceName + ".quadrant1"].setBlob(nullptr, 0);
(*m_roa.m_dictionary)[m_deviceName + ".quadrant2"].setBlob(nullptr, 0);
(*m_roa.m_dictionary)[m_deviceName + ".quadrant3"].setBlob(nullptr, 0);
(*m_roa.m_dictionary)[m_deviceName + ".quadrant4"].setBlob(nullptr, 0);
//(*m_roa.m_dictionary)[m_deviceName + "."].setBlob(nullptr, 0);

}

if(m_enabled) enableOverlay();
else disableOverlay();

return 0;
}

int pwfsAlignment::updateOverlay()
Expand Down
2 changes: 1 addition & 1 deletion gui/widgets/camera/camera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ camera::camera( std::string & camName,

m_updateTimer = new QTimer(this);

connect(this, SIGNAL(doUpdateGUI()), this, SLOT(updateGUI()));
connect(this, SIGNAL(doUpdateGUI()), this, SLOT(updateGUI()));

connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(updateGUI()));
connect(this, SIGNAL(updateTimerStop()), m_updateTimer, SLOT(stop()));
Expand Down
37 changes: 21 additions & 16 deletions gui/widgets/stage/stage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public slots:
signals:
void setPointEditTimerStart(int);

void doUpdateGUI();

protected:
virtual void paintEvent(QPaintEvent * e);

Expand All @@ -99,27 +101,28 @@ stage::stage( std::string & stageName,
QWidget * Parent,
Qt::WindowFlags f) : xWidget(Parent, f), m_stageName{stageName}
{
ui.setupUi(this);
ui.setupUi(this);

m_winTitle = m_stageName;
m_winTitle = m_stageName;

ui.fsmState->device(m_stageName);
QFont qf = ui.stageName->font();
qf.setPixelSize(XW_FONT_SIZE+3);
ui.stageName->setFont(qf);
ui.fsmState->device(m_stageName);
QFont qf = ui.stageName->font();
qf.setPixelSize(XW_FONT_SIZE+3);
ui.stageName->setFont(qf);

ui.stageName->setText(m_stageName.c_str());
ui.stageName->setText(m_stageName.c_str());

ui.setPoint->setProperty("isStatus", true);
ui.setPoint->setProperty("isStatus", true);

ui.position->setAlignment(Qt::AlignCenter);
ui.stepSize->setAlignment(Qt::AlignCenter);
ui.position->setAlignment(Qt::AlignCenter);
ui.stepSize->setAlignment(Qt::AlignCenter);

m_setPointEditTimer = new QTimer(this);
connect(m_setPointEditTimer, SIGNAL(timeout()), this, SLOT(setPointEditTimerOut()));
connect(this, SIGNAL(setPointEditTimerStart(int)), m_setPointEditTimer, SLOT(start(int)));
m_setPointEditTimer = new QTimer(this);
connect(m_setPointEditTimer, SIGNAL(timeout()), this, SLOT(setPointEditTimerOut()));
connect(this, SIGNAL(setPointEditTimerStart(int)), m_setPointEditTimer, SLOT(start(int)));
connect(this, SIGNAL(doUpdateGUI()), this, SLOT(updateGUI()));

onDisconnect();
onDisconnect();
}

stage::~stage()
Expand Down Expand Up @@ -251,12 +254,14 @@ void stage::handleSetProperty( const pcf::IndiProperty & ipRecv)
if(m_filterWheel) m_maxPos = n + 0.5;
}

updateGUI();
emit doUpdateGUI();
}

void stage::updateGUI()
{
if( m_appState != "READY" && m_appState != "OPERATING" && m_appState != "CONFIGURING" && m_appState != "NOTHOMED" && m_appState != "HOMING")
if( m_appState != "READY" && m_appState != "OPERATING"
&& m_appState != "CONFIGURING" && m_appState != "NOTHOMED"
&& m_appState != "HOMING")
{
ui.stageName->setEnabled(false);
ui.fsmState->setEnabled(false);
Expand Down

0 comments on commit 75d4654

Please sign in to comment.