It starts off:
Code: Select all
static mp_obj_t py_sensor_skip_frames(uint n_args, const mp_obj_t *args) {
int frames = (n_args == 1) ? mp_obj_get_int(args[0]) : 10; // OV Recommended.
Isn't n_args always at least equal to '1' , and args[0] contains the name of the routine? If so, then mp_obj_get_int(args[0]) always fails.
Should this code instead be:
Code: Select all
int frames = (n_args > 1) ? mp_obj_get_int(args[1]) : 10; // OV Recommended.
Bill