Skip to content

Commit

Permalink
Better error message for RGB FITS file from INDI (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
pchev authored Dec 30, 2023
1 parent c3a12fa commit ad6dae4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cam_indi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,15 @@ bool CameraINDI::ReadFITS(CapturedFrame *frame, usImage& img, bool takeSubframe,
int nhdus = 0;
fits_get_num_hdus(fptr, &nhdus, &status);

if (naxis == 3)
{
pFrame->Alert(_("RGB images are not supported, please switch the INDI driver to Mono"));
PHD_fits_close_file(fptr);
return true;
}
if (nhdus != 1 || naxis != 2)
{
pFrame->Alert(_("Unsupported type or read error loading FITS file"));
pFrame->Alert(_("Unsupported FITS file"));
PHD_fits_close_file(fptr);
return true;
}
Expand Down

0 comments on commit ad6dae4

Please sign in to comment.