Contents

Introduction

This page collects resources and techniques for testing a CHDK build or port. See also Debugging

this is a work in progress, please expand!

General guidelines

The CHDK User Manual gives an good overview of many features. Working through this list and verifying that your port matches the documented behavior.

Note that many CHDK features are poorly documented or poorly defined. When in doubt, consult the source.

Testing overrides

When testing overrides from script or the override menu, it is important to know Canon firmware displays and EXIF information may not reflect the actual value used. The functionality of the override should be determined from the image.

If ND filter is present, one shot each with ND forced in and out, using shoot

If no failures were identified, prints "ok", otherwise failed.

Output is logged to CHDK/LOGS/LOG_0001.TXT. The log will indicate whether the shots above were + or -, with the corresponding exposure number. Compare the jpegs to ensure the images show the expected variation in exposure.

MD_tune.bas

Tests the reaction speed of motion detection. This can be used find the optimal implementation of vid_get_viewport_live_fb()

Prerequisites

CAM_AF_LED is defined as camera_set_led identifier for AF in platform_camera.h

camera_set_led is implemented and supports trigger AF

Test procedure

Put the camera in record mode, aimed at a nearby subject in an environment dark enough for the AF led to show up well

Run the script

Check that MD is triggering reliably when the AF blinks and note the min/max/and average values.

If alternative implementations of vid_get_viewport_live_fb are available (i.e. using active_viewport_buffer as the current, next or previous frame), try each one and use the one that gives the best results.