mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Move py_image_unavailable_obj to py_helper.
This commit is contained in:
parent
3233592c07
commit
c9e4be4df3
@ -7,6 +7,13 @@
|
||||
|
||||
extern void *py_image_cobj(mp_obj_t img_obj);
|
||||
|
||||
mp_obj_t py_image_unavailable(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
|
||||
{
|
||||
PY_ASSERT_TRUE_MSG(false, "This function is unavailable on your OpenMV Cam.");
|
||||
return args[0];
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(py_image_unavailable_obj, 1, py_image_unavailable);
|
||||
|
||||
image_t *py_helper_arg_to_image_mutable(const mp_obj_t arg)
|
||||
{
|
||||
image_t *arg_img = py_image_cobj(arg);
|
||||
|
||||
@ -5,8 +5,9 @@
|
||||
|
||||
#ifndef __PY_HELPER_H__
|
||||
#define __PY_HELPER_H__
|
||||
#include "py_assert.h"
|
||||
#include "imlib.h"
|
||||
#include "py_assert.h"
|
||||
extern const mp_obj_fun_builtin_var_t py_image_unavailable_obj;
|
||||
image_t *py_helper_arg_to_image_mutable(const mp_obj_t arg);
|
||||
image_t *py_helper_arg_to_image_mutable_bayer(const mp_obj_t arg);
|
||||
image_t *py_helper_arg_to_image_grayscale(const mp_obj_t arg);
|
||||
|
||||
@ -5198,13 +5198,6 @@ static mp_obj_t py_image_find_hog(uint n_args, const mp_obj_t *args, mp_map_t *k
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_hog_obj, 1, py_image_find_hog);
|
||||
#endif // IMLIB_ENABLE_HOG
|
||||
|
||||
mp_obj_t py_image_unavailable(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
|
||||
{
|
||||
PY_ASSERT_TRUE_MSG(false, "This method is unavailable on your OpenMV Cam version.");
|
||||
return args[0];
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(py_image_unavailable_obj, 1, py_image_unavailable);
|
||||
|
||||
static const mp_rom_map_elem_t locals_dict_table[] = {
|
||||
/* Basic Methods */
|
||||
{MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&py_image_width_obj)},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user