From b655a548857f62e71e4b7f61c9d7bd1f0bdf1f58 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 18 Aug 2016 00:19:48 +0200 Subject: [PATCH] Remove frame size assertion in snapshot() * Frame gets automatically cropped if it's bigger than the max raw frame. --- src/omv/py/py_sensor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/omv/py/py_sensor.c b/src/omv/py/py_sensor.c index 3d42115ac..2c328050f 100644 --- a/src/omv/py/py_sensor.c +++ b/src/omv/py/py_sensor.c @@ -56,9 +56,7 @@ static mp_obj_t py_sensor_snapshot(uint n_args, const mp_obj_t *args, mp_map_t * line_filter_t line_filter_func = NULL; // Sanity checks - PY_ASSERT_FALSE_MSG((sensor.pixformat != PIXFORMAT_JPEG && - sensor.framesize > OMV_MAX_RAW_FRAME), - "Raw image is only supported for "OMV_MAX_RAW_FRAME_STR" and smaller frames"); + PY_ASSERT_TRUE_MSG((sensor.pixformat != PIXFORMAT_JPEG), "Operation not supported on JPEG"); // Lookup filter function mp_map_elem_t *kw_arg = mp_map_lookup(kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_line_filter), MP_MAP_LOOKUP);