Skip to content

Commit 75f15c6

Browse files
committed
BME690: Add MP_ERROR_TEXT() around errors.
1 parent a5d9639 commit 75f15c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

micropython/modules/breakout_bme69x/breakout_bme69x.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ mp_obj_t BreakoutBME69X_make_new(const mp_obj_type_t *type, size_t n_args, size_
3939
self->breakout = m_new_class(BME69X, (pimoroni::I2C *)(self->i2c->i2c), args[ARG_address].u_int, args[ARG_int].u_int);
4040

4141
if(!self->breakout->init()) {
42-
mp_raise_msg(&mp_type_RuntimeError, "BreakoutBME69X: breakout not found when initialising");
42+
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("BreakoutBME69X: breakout not found when initialising"));
4343
}
4444

4545
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 *
7171
return mp_obj_new_tuple(7, tuple);
7272
}
7373
else {
74-
mp_raise_msg(&mp_type_RuntimeError, "BreakoutBME69X: failed read_forced");
74+
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("BreakoutBME69X: failed read_forced"));
7575
return mp_const_none;
7676
}
7777
}

0 commit comments

Comments
 (0)