Skip to content

Commit 10138df

Browse files
committed
Presto module: Add the magic MP_ERROR_TEXT incantations.
1 parent d7b6461 commit 10138df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/c/presto/presto.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ mp_obj_t Presto_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw,
282282
presto_debug("core1 returned\n");
283283

284284
if(res != 0) {
285-
mp_raise_msg(&mp_type_RuntimeError, "Presto: failed to start ST7701 on Core1.");
285+
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("Presto: failed to start ST7701 on Core1."));
286286
}
287287

288288
return MP_OBJ_FROM_PTR(self);
@@ -351,7 +351,7 @@ mp_obj_t Presto_set_backlight(mp_obj_t self_in, mp_obj_t brightness) {
351351

352352
float b = mp_obj_get_float(brightness);
353353

354-
if(b < 0 || b > 1.0f) mp_raise_ValueError("brightness out of range. Expected 0.0 to 1.0");
354+
if(b < 0 || b > 1.0f) mp_raise_ValueError(MP_ERROR_TEXT("brightness out of range. Expected 0.0 to 1.0"));
355355

356356
self->presto->set_backlight((uint8_t)(b * 255.0f));
357357

0 commit comments

Comments
 (0)