Skip to content

Commit c05ad5d

Browse files
committed
schar and string int conversion
1 parent 81b50c5 commit c05ad5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

esp32/modugfx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ STATIC mp_obj_t ugfx_string(mp_uint_t n_args, const mp_obj_t *args) {
157157
// extract arguments
158158
// ugfx_obj_t *self = args[0];
159159
mp_uint_t len;
160-
const uint16_t data = mp_obj_get_int(args[2]);
160+
const uint16_t data = mp_obj_str_get_data(args[2]);
161161
int x0 = mp_obj_get_int(args[0]);
162162
int y0 = mp_obj_get_int(args[1]);
163163
int col = mp_obj_get_int(args[4]);
@@ -631,7 +631,7 @@ STATIC const mp_rom_map_elem_t ugfx_module_globals_table[] = {
631631
(mp_obj_t)&ugfx_get_string_width_obj},
632632
{MP_OBJ_NEW_QSTR(MP_QSTR_get_char_width),
633633
(mp_obj_t)&ugfx_get_char_width_obj},
634-
{MP_OBJ_NEW_QSTR(MP_QSTR_schar), (mp_obj_t)&ugfx_char_obj},
634+
{MP_OBJ_NEW_QSTR(MP_QSTR_char), (mp_obj_t)&ugfx_char_obj},
635635
{MP_OBJ_NEW_QSTR(MP_QSTR_string), (mp_obj_t)&ugfx_string_obj},
636636
{MP_OBJ_NEW_QSTR(MP_QSTR_string_box), (mp_obj_t)&ugfx_string_box_obj},
637637

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy