From 2c29b4d2033c050ca43fa2a33170f182f8295df7 Mon Sep 17 00:00:00 2001 From: Christoffer Fremling Date: Thu, 29 Oct 2026 16:23:08 +0200 Subject: [PATCH] camerad: EXPTIME in msec when an exposure is stopped early EXPTIME is written in msec ("exptime" command, and per frame at the expose), but stop_exposure overwrote it with the elapsed time in seconds, so a frame stopped early carried EXPTIME 1000 times too small, as a float. It now writes the elapsed time in msec. do_modify_exptime already wrote msec; only its FITS comment said sec. Co-Authored-By: Claude Opus 5.5 --- camerad/astrocam.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/camerad/astrocam.cpp b/camerad/astrocam.cpp index 6a5792d1..41956529 100644 --- a/camerad/astrocam.cpp +++ b/camerad/astrocam.cpp @@ -4405,7 +4405,7 @@ logwrite(function, message.str()); // this->camera.shutter_timer.modify( requested_exptime ); - this->fitsinfo[this->get_expbuf()]->systemkeys.primary().addkey( "EXPTIME", requested_exptime, "exposure time in sec" ); + this->fitsinfo[this->get_expbuf()]->systemkeys.primary().addkey( "EXPTIME", requested_exptime, "exposure time in msec" ); message.str(""); message << "modified exptime to " << requested_exptime << " msec"; logwrite( function, message.str() ); @@ -4457,11 +4457,11 @@ logwrite(function, message.str()); // this->camera.shutter_timer.stop( remaining_time ); - double actual_exptime = (this->camera.exposure_time - remaining_time)/1000.; + long actual_exptime = this->camera.exposure_time - remaining_time; logwrite( function, "exposure stopped early" ); - this->fitsinfo[this->get_expbuf()]->systemkeys.primary().addkey( "EXPTIME", actual_exptime, "exposure time in sec" ); + this->fitsinfo[this->get_expbuf()]->systemkeys.primary().addkey( "EXPTIME", actual_exptime, "exposure time in msec" ); return NO_ERROR; }