Cleanup in casioplot, Python ram only with PE_DEBUG

This commit is contained in:
mibi88 2022-12-11 18:04:14 +01:00
parent d7d1df46bb
commit cb887885b9
2 changed files with 6 additions and 4 deletions

View File

@ -152,10 +152,12 @@ int main(int argc, char **argv)
if(!gc_area)
pe_debug_panic("No heap!");
gc_init(gc_area, gc_area + 32768);
#ifdef PE_DEBUG
/* Add some Python ram */
void *py_ram_start = (void*)0x88053800;
void *py_ram_end = (void*)0x8807f000;
gc_add(py_ram_start, py_ram_end);
#endif
#else
/* Get everything from the OS stack (~ 350 ko) */
size_t gc_area_size;

View File

@ -119,25 +119,25 @@ static mp_obj_t draw_string(size_t n, mp_obj_t const *args)
dfont(NULL);
#endif
if(n == 5) {
if(MP_QSTR_small == mp_obj_str_get_qstr(args[4])){
if(MP_QSTR_small == mp_obj_str_get_qstr(args[4])) {
#ifdef FX9860G
dfont(&font_4x4);
#else
dfont(NULL);
#endif
}else if(MP_QSTR_medium == mp_obj_str_get_qstr(args[4])){
} else if(MP_QSTR_medium == mp_obj_str_get_qstr(args[4])) {
#ifdef FX9860G
dfont(&font_4x4);
#else
dfont(NULL);
#endif
}else if(MP_QSTR_large == mp_obj_str_get_qstr(args[4])){
} else if(MP_QSTR_large == mp_obj_str_get_qstr(args[4])) {
#ifdef FX9860G
dfont(&font_5x7);
#else
dfont(NULL);
#endif
}else{
}else {
mp_raise_ValueError("Unknown font size");
}
}