Skip to content

Commit

Permalink
Fix temperature reading in the GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
DominykasPetke committed Feb 26, 2024
1 parent 8e2d70e commit f0d3333
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lms7002_wxgui/lms7002_mainPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,8 @@ void lms7002_mainPanel::OnUploadAll(wxCommandEvent& event)

void lms7002_mainPanel::OnReadTemperature(wxCommandEvent& event)
{
double t = 0.0;
int status = -1; // TODO: LMS_GetChipTemperature(sdrDevice, 0, &t);
if (status != 0)
double t = soc->GetTemperature();
if (t == 0)
wxMessageBox(_("Failed to read chip temperature"), _("Warning"));
txtTemperature->SetLabel(wxString::Format("Temperature: %.0f C", t));
}
Expand Down

0 comments on commit f0d3333

Please sign in to comment.