@@ -816,9 +816,91 @@ MP_PROPERTY_GETSET(esp32_camera_camera_lenc_obj,
816
816
(mp_obj_t )& esp32_camera_camera_get_lenc_obj ,
817
817
(mp_obj_t )& esp32_camera_camera_set_lenc_obj );
818
818
819
+ //| max_frame_size: FrameSize
820
+ //| """The maximum frame size that can be captured"""
821
+ //|
822
+ STATIC mp_obj_t esp32_camera_camera_get_max_frame_size (const mp_obj_t self_in ) {
823
+ esp32_camera_camera_obj_t * self = MP_OBJ_TO_PTR (self_in );
824
+ check_for_deinit (self );
825
+ return cp_enum_find (& esp32_camera_frame_size_type , common_hal_esp32_camera_camera_get_max_frame_size (self ));
826
+ }
827
+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (esp32_camera_camera_get_max_frame_size_obj , esp32_camera_camera_get_max_frame_size );
828
+
829
+ MP_PROPERTY_GETTER (esp32_camera_camera_max_frame_size_obj ,
830
+ (mp_obj_t )& esp32_camera_camera_get_max_frame_size_obj );
831
+
832
+
833
+ //| address: int
834
+ //| """The I2C (SCCB) address of the sensor"""
835
+ //|
836
+ STATIC mp_obj_t esp32_camera_camera_get_address (const mp_obj_t self_in ) {
837
+ esp32_camera_camera_obj_t * self = MP_OBJ_TO_PTR (self_in );
838
+ check_for_deinit (self );
839
+ return MP_OBJ_NEW_SMALL_INT (common_hal_esp32_camera_camera_get_address (self ));
840
+ }
841
+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (esp32_camera_camera_get_address_obj , esp32_camera_camera_get_address );
842
+
843
+ MP_PROPERTY_GETTER (esp32_camera_camera_address_obj ,
844
+ (mp_obj_t )& esp32_camera_camera_get_address_obj );
845
+
846
+
847
+ //| sensor_name: str
848
+ //| """The name of the sensor"""
849
+ //|
850
+ STATIC mp_obj_t esp32_camera_camera_get_sensor_name (const mp_obj_t self_in ) {
851
+ esp32_camera_camera_obj_t * self = MP_OBJ_TO_PTR (self_in );
852
+ check_for_deinit (self );
853
+ const char * sensor_name = common_hal_esp32_camera_camera_get_sensor_name (self );
854
+ return mp_obj_new_str (sensor_name , strlen (sensor_name ));
855
+ }
856
+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (esp32_camera_camera_get_sensor_name_obj , esp32_camera_camera_get_sensor_name );
857
+
858
+ MP_PROPERTY_GETTER (esp32_camera_camera_sensor_name_obj ,
859
+ (mp_obj_t )& esp32_camera_camera_get_sensor_name_obj );
860
+
861
+
862
+ //| supports_jpeg: bool
863
+ //| """True if the sensor can capture images in JPEG format"""
864
+ //|
865
+ STATIC mp_obj_t esp32_camera_camera_get_supports_jpeg (const mp_obj_t self_in ) {
866
+ esp32_camera_camera_obj_t * self = MP_OBJ_TO_PTR (self_in );
867
+ check_for_deinit (self );
868
+ return mp_obj_new_bool (common_hal_esp32_camera_camera_get_supports_jpeg (self ));
869
+ }
870
+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (esp32_camera_camera_get_supports_jpeg_obj , esp32_camera_camera_get_supports_jpeg );
871
+
872
+ MP_PROPERTY_GETTER (esp32_camera_camera_supports_jpeg_obj ,
873
+ (mp_obj_t )& esp32_camera_camera_get_supports_jpeg_obj );
874
+
875
+ //| height: int
876
+ //| """The height of the image being captured"""
877
+ //|
878
+ STATIC mp_obj_t esp32_camera_camera_get_height (const mp_obj_t self_in ) {
879
+ esp32_camera_camera_obj_t * self = MP_OBJ_TO_PTR (self_in );
880
+ check_for_deinit (self );
881
+ return MP_OBJ_NEW_SMALL_INT (common_hal_esp32_camera_camera_get_height (self ));
882
+ }
883
+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (esp32_camera_camera_get_height_obj , esp32_camera_camera_get_height );
884
+
885
+ MP_PROPERTY_GETTER (esp32_camera_camera_height_obj ,
886
+ (mp_obj_t )& esp32_camera_camera_get_height_obj );
887
+
888
+ //| width: int
889
+ //| """The width of the image being captured"""
890
+ //|
891
+ STATIC mp_obj_t esp32_camera_camera_get_width (const mp_obj_t self_in ) {
892
+ esp32_camera_camera_obj_t * self = MP_OBJ_TO_PTR (self_in );
893
+ check_for_deinit (self );
894
+ return MP_OBJ_NEW_SMALL_INT (common_hal_esp32_camera_camera_get_width (self ));
895
+ }
896
+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (esp32_camera_camera_get_width_obj , esp32_camera_camera_get_width );
897
+
898
+ MP_PROPERTY_GETTER (esp32_camera_camera_width_obj ,
899
+ (mp_obj_t )& esp32_camera_camera_get_width_obj );
819
900
820
901
821
902
STATIC const mp_rom_map_elem_t esp32_camera_camera_locals_table [] = {
903
+ { MP_ROM_QSTR (MP_QSTR_address ), MP_ROM_PTR (& esp32_camera_camera_address_obj ) },
822
904
{ MP_ROM_QSTR (MP_QSTR_aec2 ), MP_ROM_PTR (& esp32_camera_camera_aec2_obj ) },
823
905
{ MP_ROM_QSTR (MP_QSTR_aec_value ), MP_ROM_PTR (& esp32_camera_camera_aec_value_obj ) },
824
906
{ MP_ROM_QSTR (MP_QSTR_ae_level ), MP_ROM_PTR (& esp32_camera_camera_ae_level_obj ) },
@@ -838,17 +920,22 @@ STATIC const mp_rom_map_elem_t esp32_camera_camera_locals_table[] = {
838
920
{ MP_ROM_QSTR (MP_QSTR_frame_size ), MP_ROM_PTR (& esp32_camera_camera_frame_size_obj ) },
839
921
{ MP_ROM_QSTR (MP_QSTR_gain_ceiling ), MP_ROM_PTR (& esp32_camera_camera_gain_ceiling_obj ) },
840
922
{ MP_ROM_QSTR (MP_QSTR_gain_ctrl ), MP_ROM_PTR (& esp32_camera_camera_gain_ctrl_obj ) },
923
+ { MP_ROM_QSTR (MP_QSTR_height ), MP_ROM_PTR (& esp32_camera_camera_height_obj ) },
841
924
{ MP_ROM_QSTR (MP_QSTR_hmirror ), MP_ROM_PTR (& esp32_camera_camera_hmirror_obj ) },
842
925
{ MP_ROM_QSTR (MP_QSTR_lenc ), MP_ROM_PTR (& esp32_camera_camera_lenc_obj ) },
926
+ { MP_ROM_QSTR (MP_QSTR_max_frame_size ), MP_ROM_PTR (& esp32_camera_camera_max_frame_size_obj ) },
843
927
{ MP_ROM_QSTR (MP_QSTR_pixel_format ), MP_ROM_PTR (& esp32_camera_camera_pixel_format_obj ) },
844
928
{ MP_ROM_QSTR (MP_QSTR_quality ), MP_ROM_PTR (& esp32_camera_camera_quality_obj ) },
845
929
{ MP_ROM_QSTR (MP_QSTR_raw_gma ), MP_ROM_PTR (& esp32_camera_camera_raw_gma_obj ) },
846
930
{ MP_ROM_QSTR (MP_QSTR_saturation ), MP_ROM_PTR (& esp32_camera_camera_saturation_obj ) },
931
+ { MP_ROM_QSTR (MP_QSTR_sensor_name ), MP_ROM_PTR (& esp32_camera_camera_sensor_name_obj ) },
847
932
{ MP_ROM_QSTR (MP_QSTR_sharpness ), MP_ROM_PTR (& esp32_camera_camera_sharpness_obj ) },
848
933
{ MP_ROM_QSTR (MP_QSTR_special_effect ), MP_ROM_PTR (& esp32_camera_camera_special_effect_obj ) },
934
+ { MP_ROM_QSTR (MP_QSTR_supports_jpeg ), MP_ROM_PTR (& esp32_camera_camera_supports_jpeg_obj ) },
849
935
{ MP_ROM_QSTR (MP_QSTR_take ), MP_ROM_PTR (& esp32_camera_camera_take_obj ) },
850
936
{ MP_ROM_QSTR (MP_QSTR_vflip ), MP_ROM_PTR (& esp32_camera_camera_vflip_obj ) },
851
937
{ MP_ROM_QSTR (MP_QSTR_wb_mode ), MP_ROM_PTR (& esp32_camera_camera_wb_mode_obj ) },
938
+ { MP_ROM_QSTR (MP_QSTR_width ), MP_ROM_PTR (& esp32_camera_camera_width_obj ) },
852
939
{ MP_ROM_QSTR (MP_QSTR_whitebal ), MP_ROM_PTR (& esp32_camera_camera_whitebal_obj ) },
853
940
{ MP_ROM_QSTR (MP_QSTR_wpc ), MP_ROM_PTR (& esp32_camera_camera_wpc_obj ) },
854
941
};
0 commit comments