mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 22:14:45 -04:00
LimeSDR: moved MsgReportDeviceInfo to shared structure
This commit is contained in:
@@ -35,7 +35,6 @@ MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgGetDeviceInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgSetReferenceConfig, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportLimeSDRToGUI, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportStreamInfo, Message)
|
||||
MESSAGE_CLASS_DEFINITION(LimeSDRInput::MsgReportDeviceInfo, Message)
|
||||
|
||||
|
||||
LimeSDRInput::LimeSDRInput(DeviceSourceAPI *deviceAPI) :
|
||||
@@ -458,7 +457,7 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
}
|
||||
|
||||
// send to oneself
|
||||
MsgReportDeviceInfo *report = MsgReportDeviceInfo::create(temp);
|
||||
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
|
||||
m_deviceAPI->getDeviceOutputMessageQueue()->push(report);
|
||||
|
||||
// send to source buddies
|
||||
@@ -467,7 +466,7 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
|
||||
for (; itSource != sourceBuddies.end(); ++itSource)
|
||||
{
|
||||
MsgReportDeviceInfo *report = MsgReportDeviceInfo::create(temp);
|
||||
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
|
||||
(*itSource)->getDeviceOutputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
@@ -477,7 +476,7 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
|
||||
for (; itSink != sinkBuddies.end(); ++itSink)
|
||||
{
|
||||
MsgReportDeviceInfo *report = MsgReportDeviceInfo::create(temp);
|
||||
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
|
||||
(*itSink)->getDeviceOutputMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,26 +208,6 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportDeviceInfo : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
float getTemperature() const { return m_temperature; }
|
||||
|
||||
static MsgReportDeviceInfo* create(float temperature)
|
||||
{
|
||||
return new MsgReportDeviceInfo(temperature);
|
||||
}
|
||||
|
||||
private:
|
||||
float m_temperature;
|
||||
|
||||
MsgReportDeviceInfo(float temperature) :
|
||||
Message(),
|
||||
m_temperature(temperature)
|
||||
{ }
|
||||
};
|
||||
|
||||
LimeSDRInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~LimeSDRInput();
|
||||
|
||||
|
||||
@@ -236,9 +236,9 @@ void LimeSDRInputGUI::handleMessagesToGUI()
|
||||
ui->streamStatusLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
}
|
||||
else if (LimeSDRInput::MsgReportDeviceInfo::match(*message))
|
||||
else if (DeviceLimeSDRShared::MsgReportDeviceInfo::match(*message))
|
||||
{
|
||||
LimeSDRInput::MsgReportDeviceInfo *report = (LimeSDRInput::MsgReportDeviceInfo *) message;
|
||||
DeviceLimeSDRShared::MsgReportDeviceInfo *report = (DeviceLimeSDRShared::MsgReportDeviceInfo *) message;
|
||||
ui->temperatureText->setText(tr("%1C").arg(QString::number(report->getTemperature(), 'f', 0)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user