diff options
| author | Kamil Tomaszewski <kamil.tomaszewski@sony.com> | 2020-09-14 12:55:53 +0200 |
|---|---|---|
| committer | Kamil Tomaszewski <kamil.tomaszewski@sony.com> | 2020-09-14 13:12:20 +0200 |
| commit | ce7ee58e92eca840f75c2fcf885fe862f1ebec13 (patch) | |
| tree | 725ba356ef1647b54151d48db95eeee98f6374c7 /shared-bindings/camera | |
| parent | a25e3c2858e565e465849669c96da560b4af228f (diff) | |
camera: Update camera module
Diffstat (limited to 'shared-bindings/camera')
| -rw-r--r-- | shared-bindings/camera/Camera.c | 4 | ||||
| -rw-r--r-- | shared-bindings/camera/__init__.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/camera/Camera.c b/shared-bindings/camera/Camera.c index 3b839d802..5fe54e429 100644 --- a/shared-bindings/camera/Camera.c +++ b/shared-bindings/camera/Camera.c @@ -52,7 +52,7 @@ //| //| buffer = bytearray(512 * 1024) //| file = open("/sd/image.jpg","wb") -//| size = cam.take_picture() +//| size = cam.take_picture(buffer, camera.ImageFormat.JPG) //| file.write(buffer, size) //| file.close()""" //| @@ -99,7 +99,7 @@ STATIC void check_for_deinit(camera_obj_t *self) { //| def take_picture(self, buf: WriteableBuffer, format: ImageFormat) -> int: //| """Take picture and save to ``buf`` in the given ``format`` //| -//| :return: the size of the picture taken +//| :return: the number of bytes written into buf //| :rtype: int""" //| ... //| diff --git a/shared-bindings/camera/__init__.c b/shared-bindings/camera/__init__.c index 28cf7df57..080516d51 100644 --- a/shared-bindings/camera/__init__.c +++ b/shared-bindings/camera/__init__.c @@ -39,7 +39,7 @@ STATIC const mp_rom_map_elem_t camera_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_Camera), MP_ROM_PTR(&camera_type) }, // Enum-like Classes. - { MP_ROM_QSTR(MP_QSTR_ImageSize), MP_ROM_PTR(&camera_imageformat_type) }, + { MP_ROM_QSTR(MP_QSTR_ImageFormat), MP_ROM_PTR(&camera_imageformat_type) }, }; STATIC MP_DEFINE_CONST_DICT(camera_module_globals, camera_module_globals_table); |
