Skip to content
This repository has been archived by the owner on Jan 1, 2019. It is now read-only.

Remove C unix mock for Badge python module #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions esp32/modules/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def list_categories():
try:
categories
except:
ugfx.init()
ugfx.input_init()
draw_msg('Getting categories')
try:
Expand Down
1 change: 1 addition & 0 deletions esp32/modules/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def init_power_management():

# Main application
def start():
ugfx.init()
ugfx.input_init()
ugfx.set_lut(ugfx.LUT_FASTER)
ugfx.clear(ugfx.WHITE)
Expand Down
2 changes: 1 addition & 1 deletion unix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ SRC_C = \
modfreedomgfx.c \
modfreedomgfx_sdl.c \
modnetwork.c \
modbadge.c \
mock_badge.c \
../../ugfx/drivers/multiple/SDL/gdisp_lld_SDL.c \
ginput_lld_toggle.c \
../../components/sha2017/wildcard_sha2017_org.c \
Expand Down
4 changes: 4 additions & 0 deletions unix/mock_badge.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Needed to simulate the glue between the badge and uGFX:
#include <stdbool.h>

bool ugfx_screen_flipped = false;
239 changes: 0 additions & 239 deletions unix/modbadge.c

This file was deleted.

2 changes: 0 additions & 2 deletions unix/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ extern const struct _mp_obj_module_t mp_module_socket;
extern const struct _mp_obj_module_t mp_module_ffi;
extern const struct _mp_obj_module_t mp_module_jni;
extern const struct _mp_obj_module_t mock_esp_network_module;
extern const struct _mp_obj_module_t mock_badge_module;
extern const struct _mp_obj_module_t ugfx_module;
extern const struct _mp_obj_module_t freedomgfx_module;

Expand Down Expand Up @@ -230,7 +229,6 @@ extern const struct _mp_obj_module_t freedomgfx_module;
{ MP_OBJ_NEW_QSTR(MP_QSTR_ugfx), (mp_obj_t)&ugfx_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_freedomgfx), (mp_obj_t)&freedomgfx_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_network), (mp_obj_t)&mock_esp_network_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_badge), (mp_obj_t)&mock_badge_module }, \

#define MICROPY_MODULE_WEAK_LINKS (1)
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
Expand Down