Skip to content

Commit

Permalink
inti some variables
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Dec 18, 2024
1 parent cb3e35e commit 42cee7e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions indi-gphoto/gphoto_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,8 +1346,8 @@ int gphoto_start_exposure(gphoto_driver *gphoto, uint32_t exptime_usec, int mirr

int gphoto_read_exposure_fd(gphoto_driver *gphoto, int fd)
{
CameraFilePath *fn;
CameraEventType event;
CameraFilePath *fn = nullptr;
CameraEventType event = GP_EVENT_UNKNOWN;
void *data = nullptr;
int result;

Expand All @@ -1374,7 +1374,7 @@ int gphoto_read_exposure_fd(gphoto_driver *gphoto, int fd)
return GP_OK;
}

result = download_image(gphoto, &gphoto->camerapath, fd);
result = download_image(gphoto, &gphoto->camerapath, fd);
gphoto->command = 0;
//Set exposure back to original value
// JM 2018-08-06: Why do we really need to reset values here?
Expand All @@ -1384,10 +1384,10 @@ int gphoto_read_exposure_fd(gphoto_driver *gphoto, int fd)
}

//Bulb mode
gphoto->command = 0;
gphoto->command = 0;
uint32_t waitMS = gphoto->download_timeout * 1000;
bool downloadComplete = false;
DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Waiting for event for %d seconds.", gphoto->download_timeout);
DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "BULB Mode: Waiting for event for %d seconds.", gphoto->download_timeout);

while (1)
{
Expand All @@ -1410,7 +1410,7 @@ int gphoto_read_exposure_fd(gphoto_driver *gphoto, int fd)

case GP_EVENT_FILE_ADDED:
DEBUGDEVICE(device, INDI::Logger::DBG_DEBUG, "File added event completed.");
fn = static_cast<CameraFilePath *>(data);
fn = static_cast<CameraFilePath *>(data);
if (gphoto->handle_sdcard_image != IGNORE_IMAGE)
download_image(gphoto, fn, fd);
waitMS = 100;
Expand Down

0 comments on commit 42cee7e

Please sign in to comment.