Skip to content

Commit

Permalink
Build 180, working on CONFORMU and the camera driver
Browse files Browse the repository at this point in the history
  • Loading branch information
msproul committed Jun 26, 2024
1 parent 90d1a41 commit 69129c3
Show file tree
Hide file tree
Showing 9 changed files with 564 additions and 416 deletions.
35 changes: 21 additions & 14 deletions alpacapi_EditHistory.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
History Comments found =3505 in 522 files
History Comments found =3512 in 522 files
PDS_ReadNASAfiles.c:28 //* Jan 26, 1992 Reading of PDS files into Mac program from CD working
PDS_ReadNASAfiles.c:29 //* Mar 14, 1992 Starting on more detailed interpretation of label (header)
PDS_ReadNASAfiles.c:30 //* Mar 16, 1992 Changed number of displayed bytes from 836 to 800
Expand Down Expand Up @@ -1854,7 +1854,7 @@ alpacadriver.cpp:133 //* Apr 13, 2022 <MLS> Added CreateDriverObjects()
alpaca_defs.h:42 //* Apr 13, 2022 <MLS> Build 136
cameradriver_ATIK.cpp:52 //* Apr 15, 2022 <MLS> Installed ATIK 460ex on WO71 telescope, updating ATIK drivers
cameradriver_QHY.cpp:39 //* Apr 15, 2022 <MLS> Installed QHY5III462C on WO102 ONAG guider
cameradriver_save.cpp:108 //* Apr 15, 2022 <MLS> Disabled Histogram to speed up saving files
cameradriver_save.cpp:107 //* Apr 15, 2022 <MLS> Disabled Histogram to speed up saving files
cameradriver.cpp:168 //* Apr 16, 2022 <MLS> Added CreateFakeImageData() for debugging without a sky
cameradriver_ATIK.cpp:53 //* Apr 16, 2022 <MLS> Fixed bug in GetImage_ROI_info()
cameradriver_QSI.cpp:33 //* Apr 16, 2022 <MLS> Added simulation option to QSI camera driver
Expand Down Expand Up @@ -2674,7 +2674,7 @@ rotatordriver_sim.cpp:26 //* Mar 2, 2023 <MLS> CONFORMU-rotatordriver_sim -> P
switchdriver_sim.cpp:25 //* Mar 2, 2023 <MLS> Created switchdriver_sim.cpp
switchdriver_sim.h:11 //* Mar 2, 2023 <MLS> Created switchdriver_sim.h
alpacadriver.cpp:157 //* Mar 3, 2023 <MLS> Added ProcessAlpacaCommand()
alpacadriver.cpp:4089 //* Mar 3, 2023 <MLS> Make CONFORMU happy, check for valid device number
alpacadriver.cpp:4124 //* Mar 3, 2023 <MLS> Make CONFORMU happy, check for valid device number
alpacadriver_helper.c:13 //* Mar 3, 2023 <MLS> Added FindDeviceTypeByStringLowerCase()
calibration_sim.cpp:20 //* Mar 3, 2023 <MLS> Created calibration_sim.cpp
cameradriver_SONY.cpp:1295 //* Mar 3, 2023 <MLS> this line caused a compile err
Expand Down Expand Up @@ -3492,31 +3492,38 @@ alpaca_defs.h:100 //* Jun 16, 2024 <MLS> Build 179 - pushed to github
Makefile:68 #++ Jun 16, 2024 <MLS> Updated QSI Makefile entry
alpacadriver.cpp:194 //* Jun 17, 2024 <MLS> Fixed bug in ProcessCmdLineArgs(), -p6502 caused a segmentation fault
cameradriver_QSI.cpp:42 //* Jun 17, 2024 <MLS> Fixed bug in CreateCameraObjects_QSI() invalid camera count
cameradriver.cpp:214 //* Jan 1, 2119 <TODO> ----------------------------------------
cameradriver.cpp:215 //* Jun 26, 2119 <TODO> Add support for sub frames
cameradriver_QSI.cpp:43 //* Jun 21, 2024 <MLS> Added Read_SensorTargetTemp() & Write_SensorTargetTemp() to QSI camera
alpacadriver.cpp:195 //* Jun 25, 2024 <MLS> Added contentdata to requestlog file for PUT cmds
alpaca_defs.h:101 //* Jun 25, 2024 <MLS> Build 180 - pushed to github
cameradriver.cpp:213 //* Jun 25, 2024 <MLS> Updated PUT_CoolerOn() to pass CONFORMU
cameradriver.cpp:214 //* Jun 25, 2024 <MLS> Updated Put_Fastreadout() to pass CONFORMU
cameradriver.cpp:215 //* Jun 25, 2024 <MLS> Updated Put_SetCCDtemperature() to pass CONFORMU
cameradriver_ASI.cpp:87 //* Jun 25, 2024 <MLS> Changed all kASCOM_Err_FailedUnknown to kASCOM_Err_UnspecifiedError
cameradriver.cpp:217 //* Jan 1, 2119 <TODO> ----------------------------------------
cameradriver.cpp:218 //* Jun 26, 2119 <TODO> Add support for sub frames
cameradriver_png.cpp:33 //* Jan 31, 2120 <TODO> Add support for libpng
cameradriver_TOUP.cpp:48 //* Feb 4, 2120 <TODO> Add 16 bit readout to Toupcam
cameradriver_TOUP.cpp:49 //* Feb 16, 2120 <TODO> Add gain setting to Toupcam
cameradriver_ASI.cpp:1041 //* Jun 29, 2120 <TODO> Change video timestamp to an option
cameradriver_ASI.cpp:1042 //* Jun 29, 2120 <TODO> Change video timestamp to an option
controller_camera.cpp:77 //* Jan 1, 2121 <TODO> control key for different step size.
controller_camera.cpp:78 //* Jan 1, 2121 <TODO> add error list window
controller_camera.cpp:79 //* Feb 6, 2121 <TODO> Move downloading of images to a separate thread
cameradriver_QHY.cpp:52 //* Oct 10, 2122 <TODO> Add support for percentcompleted to QHY camera driver
spectrodriver.cpp:33 //* May 7, 2123 <TODO> Add support for SlitID, SlitAngle, SlitWidth
controller_dome.cpp:47 //* Jun 25, 2123 <ADD> Add slaved to DeviceState
History Comments found = 3505 in 522 files
Total lines = 246878
Total comment Lines = 40487 (16.4%)
Total comments = 45472 (18.4%)
Total history comments = 3505 (1.4%)
History Comments found = 3512 in 522 files
Total lines = 247019
Total comment Lines = 40531 (16.4%)
Total comments = 45516 (18.4%)
Total history comments = 3512 (1.4%)
Total C files = 69
Total C++ files = 196
Total H files = 255
Preprocssor cnt = 7893
Total SLOC = 156884
Total SLOC-Logical = 120997
Total SLOC = 156965
Total SLOC-Logical = 121078
Programmer comment summary
MLS = 3095
MLS = 3102
TODO = 11
DDB = 1
JMH = 3
Expand Down
3 changes: 2 additions & 1 deletion src/alpaca_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
//* May 15, 2024 <MLS> Added TYPE_GuideDirections enums
//* May 26, 2024 <MLS> Build 178
//* Jun 16, 2024 <MLS> Build 179 - pushed to github
//* Jun 25, 2024 <MLS> Build 180 - pushed to github
//*****************************************************************************
//#include "alpaca_defs.h"

Expand All @@ -117,7 +118,7 @@

#define kApplicationName "AlpacaPi"
#define kVersionString "V0.7.2"
#define kBuildNumber 179
#define kBuildNumber 180
#define kAlpacaDiscoveryPORT 32227
#define kAlpacaPiDefaultPORT 6800

Expand Down
40 changes: 38 additions & 2 deletions src/alpacadriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
//* May 18, 2024 <MLS> Fixed cSendJSONresponse bug, not initialized to true
//* Jun 1, 2024 <MLS> Global GPS now looks for Emlid and if found, uses that port
//* Jun 17, 2024 <MLS> Fixed bug in ProcessCmdLineArgs(), -p6502 caused a segmentation fault
//* Jun 25, 2024 <MLS> Added contentdata to requestlog file for PUT cmds
//*****************************************************************************
//* to install code blocks 20
//* Step 1: sudo add-apt-repository ppa:codeblocks-devs/release
Expand Down Expand Up @@ -3283,6 +3284,7 @@ static void LogRequest(TYPE_GetPutRequestData *reqData)
{
char lineBuff[512];
char datestring[64];
char myHttpUserAgentStr[kUserAgentLen];
time_t currentTime;
struct tm *linuxTime;
int bytesWritten;
Expand Down Expand Up @@ -3347,13 +3349,39 @@ int returnCode;
// DEBUG_TIMING("Time to open log file (ms)\t=");
}

//* ConformU generates a ridiculously long user agent string
//* ConformUniversal/2.2.0-rc.3+26636.58f2f3d79821bd5fa5e11173c24f1d7e1397a2f8
strcpy(myHttpUserAgentStr, reqData->httpUserAgent);
if (strlen(myHttpUserAgentStr) > 32)
{
char *slashPtr;

sprintf(lineBuff, "%-18s\t%-18s\t%s\t%s %s\r\n",
slashPtr = strchr(myHttpUserAgentStr, '/');
if (slashPtr != NULL)
{
*slashPtr = 0;
}
else
{
myHttpUserAgentStr[32] = 0;
}
}
sprintf(lineBuff, "%-18s\t%-18s\t%s\t%s %s",
datestring,
reqData->clientIPaddr,
reqData->httpUserAgent,
myHttpUserAgentStr,
getPutStr,
reqData->cmdBuffer);

//* Added 6/25/2024
//* Jun 25, 2024 <MLS> Added contentdata to requestlog file for PUT cmds
if (reqData->get_putIndicator == 'P')
{
strcat(lineBuff, "\t");
strcat(lineBuff, reqData->contentData);
}
strcat(lineBuff, "\r\n");

// CONSOLE_DEBUG(lineBuff);


Expand Down Expand Up @@ -3391,6 +3419,13 @@ int returnCode;
{
CONSOLE_DEBUG("Error: gIPlogFilePointer is NULL");
}

// //* CONFORMU debugging 6/25/2024
// if (reqData->get_putIndicator == 'P')
// {
// DumpRequestStructure(__FUNCTION__, reqData);
// CONSOLE_ABORT(__FUNCTION__);
// }
// CONSOLE_DEBUG_W_STR(__FUNCTION__, "Exit");
}

Expand Down Expand Up @@ -5495,6 +5530,7 @@ void DumpRequestStructure(const char *functionName, TYPE_GetPutRequestData *reqD
CONSOLE_DEBUG_W_NUM( "cHTTPclientType \t=", reqData->cHTTPclientType);
CONSOLE_DEBUG_W_BOOL( "clientIs_AlpacaPi \t=", reqData->clientIs_AlpacaPi);
CONSOLE_DEBUG_W_BOOL( "clientIs_ConformU \t=", reqData->clientIs_ConformU);
CONSOLE_DEBUG_W_BOOL( "clientIs_Conform \t=", reqData->clientIs_Conform);

CONSOLE_DEBUG_W_STR( "httpCmdString \t=", reqData->httpCmdString);
CONSOLE_DEBUG_W_NUM( "requestTypeEnum \t=", reqData->requestTypeEnum);
Expand Down
Loading

0 comments on commit 69129c3

Please sign in to comment.