There is an issue with the script parameter values and @range.The script parameter input range for numbers is -9,999 to 99,999. But @range only allows a range of 2 ^ 16 between minimum and maximum. A greater range leads to unexpected results and crashes.msl
static int script_range_values[SCRIPT_NUM_PARAMS]; // Min/Max values for param validationstatic char script_range_types[SCRIPT_NUM_PARAMS]; // Specifies if range values is signed (-9999-32767) or unsigned (0-65535) // Note: -9999 limit on negative values is due to current gui_menu code
In the current implementation script range values are stored as two shorts packed into a single int.Range values are -9999 - 32767 (for signed range) and 0 - 65535 (for unsigned range).The limits are in the code comments:
The limits are in the code comments:
Quote from: philmoz on 28 / November / 2014, 19:05:31The limits are in the code comments:I had read the comments in gui_menu.c. I thought we could adjust this limits.
A SX20-owner had tried to write a test script for manual focus. He has defined a range from 0 to 66,000 and got fatal errors. The range was set to 465 as maximum (because of the unsigned range limit). That was the reason for my request.And the subject distance range is the next problem. I do not understand why we define a minimum and maximum for the distance. E.g. the SX20 has a funny max. distance value in platform_camera.h: 66,490.I think set_focus(0) returns the minimal subject distance und a too large value for set_focus() returns infinity (-1). There is no risk for wrong results without limits.There are a lot of cameras whose subject distance range is greater than 65,535 - most of the SX series. But not all of these cameras have a special definition for CAMERA_MAX_DIST.Also the setting of the hyperfocal distance is affected when the calculating a value greater than 65,535 gets.msl
I'm not sure it's worth fixing just to handle SD overrides.
Started by cybercom General Help and Assistance on using CHDK stable releases
Started by byte0468 AllBest's Builds
Started by koshy General Discussion and Assistance
Started by Schnappschuss General Discussion and Assistance