kopia lustrzana https://github.com/pimoroni/pimoroni-pico
BME690: Add MP_ERROR_TEXT() around errors.
rodzic
a5d96397fc
commit
75f15c6a66
|
@ -39,7 +39,7 @@ mp_obj_t BreakoutBME69X_make_new(const mp_obj_type_t *type, size_t n_args, size_
|
|||
self->breakout = m_new_class(BME69X, (pimoroni::I2C *)(self->i2c->i2c), args[ARG_address].u_int, args[ARG_int].u_int);
|
||||
|
||||
if(!self->breakout->init()) {
|
||||
mp_raise_msg(&mp_type_RuntimeError, "BreakoutBME69X: breakout not found when initialising");
|
||||
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("BreakoutBME69X: breakout not found when initialising"));
|
||||
}
|
||||
|
||||
return MP_OBJ_FROM_PTR(self);
|
||||
|
@ -71,7 +71,7 @@ mp_obj_t BreakoutBME69X_read(size_t n_args, const mp_obj_t *pos_args, mp_map_t *
|
|||
return mp_obj_new_tuple(7, tuple);
|
||||
}
|
||||
else {
|
||||
mp_raise_msg(&mp_type_RuntimeError, "BreakoutBME69X: failed read_forced");
|
||||
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("BreakoutBME69X: failed read_forced"));
|
||||
return mp_const_none;
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue