When CHDK gets a GPS fix from gps_get_data(), it doesn't check whether the latitude coordinates are North or South or if the longitude coordinates are East or West. The attached patch fixes this behaviour by making the latitude/longitude negative if it is South/West respectively, which is what the rest of the code expects.I've tested the patch on my SX230HS when I was somewhere with coordinates which were North and West and it worked correctly.
The gps patch from Konrad127123 is fine. I add this correct size definition for tGPS. The wrong century chars in DNGs dateStamp is the result of wrong tGPS.status size. tGPS size is always 0x110 and unknown2[] only 160 chars. For compare library gpsLib.lua for SX230, SX260 at here.Another thing, we should be use rounded pi-values in imath.
Index: core/ptp.c===================================================================--- core/ptp.c (revision 2515)+++ core/ptp.c (working copy)@@ -650,7 +650,7 @@ } // send response- data->send_resp( data->handle, &ptp );+ data->send_resp( data->handle, &ptp, 0 ); return 1; }Index: core/ptp_chdk.h===================================================================--- core/ptp_chdk.h (revision 2515)+++ core/ptp_chdk.h (working copy)@@ -30,7 +30,7 @@ int handle; int (*send_data)(int handle, const char *buf, int part_size, int total_size, int, int, int); // (0xFF9F525C), total_size should be 0 except for the first call int (*recv_data)(int handle, char *buf, int size, int, int); // (0xFF9F5500)- int (*send_resp)(int handle, PTPContainer *resp); // (0xFF9F5688)+ int (*send_resp)(int handle, PTPContainer *resp, int zero); // (0xFF9F5688), ixus30/40 needs a third argument, which is always 0 int (*get_data_size)(int handle); // (0xFF9F5830) int (*send_err_resp)(int handle, PTPContainer *resp); // (0xFF9F5784) int unknown1; // ???
Index: platform/generic/wrappers.c===================================================================--- platform/generic/wrappers.c (revision 2515)+++ platform/generic/wrappers.c (working copy)@@ -109,7 +109,7 @@ char unk6; } flashParam; -short get_parameter_size(long id)+short __attribute__((weak)) get_parameter_size(long id) { extern flashParam* FlashParamsTable[];
I'd like to ask for permission to do the following changes in core:
Both seem fine to me. I think we discussed the send_resp one before in the ptp thread.
Code: [Select]Index: platform/generic/wrappers.c===================================================================--- platform/generic/wrappers.c (revision 2515)+++ platform/generic/wrappers.c (working copy)@@ -109,7 +109,7 @@ char unk6; } flashParam; -short get_parameter_size(long id)+short __attribute__((weak)) get_parameter_size(long id) { extern flashParam* FlashParamsTable[]; I believe that both are harmless.I'd like to integrate my ixus30/sd200 port, the above changes are needed for correct operation. I plan to fix some issues on the ixus40/sd300 port too.
For the FlashParamsTable fix I think it would be better to add a #define for this table version to camera.h and set the correct structure definition in wrappers.c based on the #define. This probably affects other cameras.
I added the get_parameter_size function in my recent reorg to remove the hard wired logic elsewhere. Unless I got this all wrong the current release version will also not work properly. See the code in luascript.c that gets the size value from the table. If this the case then get_parameter_size should be added to the release version.
Started by andre117 General Discussion and Assistance
Started by Bernd R General Discussion and Assistance
Started by quid « 1 2 » General Discussion and Assistance
Started by zell « 1 2 » General Discussion and Assistance
Started by srsa_4c « 1 2 » General Discussion and Assistance