Module event

Event Handlers.

Scripts can respond to events by setting the functions in the 'event' table. Event handler functions can take one integer parameter, and must return a boolean that specifies whether or not the backend should continue executing event handlers for this particular event.

Event handlers will not run if there's already a script or another event handler actively executing at the same time.

Usage:

     event.keypress = function(key)
    
     print("You pressed a key: "..key)
    
     return false
    
     end
    

Functions

shoot_task(arg) Called periodicaly from shoot_task.
seconds_clock(arg) Called once per second.
keypress(key) Called when a key is pressed.
custom_picture_taking(arg) Special types of picture taking (e.g. silent pics) so intervalometer and other photo taking routines should use that instead of regular pics.
intervalometer(interval_count) Called after a picture is taken with the intervalometer.
config_save(arg) Called when configs are being saved; save any config data for your script here.


Functions

shoot_task(arg)
Called periodicaly from shoot_task.

Parameters:

  • arg unused

Returns:

    bool whether or not to continue executing CBRs for this event.

    Recommended: true (no real reason to block other CBRs here).

seconds_clock(arg)
Called once per second. Should return quickly, because other tasks may rely on timing accuracy.

Parameters:

  • arg unused

Returns:

    bool whether or not to continue executing CBRs for this event.

    Recommended: true (no real reason to block other CBRs here).

keypress(key)
Called when a key is pressed.

Parameters:

Returns:

    bool whether or not to continue executing CBRs for this event.

    Returning false will prevent other modules and/or Canon firmware from processing this event.

    For all unhandled events, return true.

custom_picture_taking(arg)
Special types of picture taking (e.g. silent pics) so intervalometer and other photo taking routines should use that instead of regular pics.

Parameters:

  • arg unused

Returns:

    bool whether or not to continue executing CBRs for this event.

    Recommended: false if your code took a custom picture, true otherwise.

intervalometer(interval_count)
Called after a picture is taken with the intervalometer.

Parameters:

  • interval_count int the current interval count

Returns:

    bool whether or not to continue executing CBRs for this event.

    Recommended: true (no real reason to block other CBRs here).

config_save(arg)
Called when configs are being saved; save any config data for your script here.

Parameters:

  • arg unused

Returns:

    bool whether or not to continue executing CBRs for this event.

    Recommended: true (no real reason to block other CBRs here).

generated by LDoc 1.4.3 Last updated 2017-09-02 23:31:52