mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Check return value from set_framesize.
This commit is contained in:
parent
4b6ef2edd3
commit
b0442633ef
@ -198,7 +198,7 @@ static mp_obj_t py_sensor_set_framerate(mp_obj_t framerate) {
|
||||
|
||||
static mp_obj_t py_sensor_set_framesize(mp_obj_t framesize) {
|
||||
if (sensor_set_framesize(mp_obj_get_int(framesize)) != 0) {
|
||||
return mp_const_false;
|
||||
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "Failed to set framesize!"));
|
||||
}
|
||||
return mp_const_true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user