Skip to content
This repository was archived by the owner on Aug 2, 2020. It is now read-only.
Merged
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
11 changes: 6 additions & 5 deletions esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ INC += -I../lib/timeutils
INC += -I../../components/badge
INC += -I../../components/ugfx-glue
INC += -I../../components/graph
INC += -I../../components/sha2017
INC += -I../../components/graphics
INC += -I../../components/badge-ota
INC += -I../../components/bpp-recv
INC += -I../../components/bpp-if
INC += -I../../components/ed25519/include
Expand Down Expand Up @@ -687,7 +688,7 @@ BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH)/components/,\
badge/badge_power.o \
badge/badge_eink_dev.o \
badge/badge_eink_lut.o \
badge/badge_eink_fb.o \
badge/badge_fb.o \
badge/badge_nvs.o \
badge/badge.o \
graph/font.o \
Expand All @@ -697,9 +698,9 @@ BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH)/components/,\
ugfx-glue/ginput_lld_toggle.o \
ugfx-glue/gfx_mk.o \
ugfx-glue/gfx_userfs.o \
sha2017/letsencrypt.o \
sha2017/sha2017_ota_graphics.o \
sha2017/sha2017_ota.o \
badge-ota/letsencrypt.o \
graphics/graphics.o \
badge-ota/badge_ota.o \
badge-first-run/badge_first_run.o \
png/adler32.o \
png/crc32.o \
Expand Down
4 changes: 2 additions & 2 deletions esp32/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "soc/cpu.h"
#include "rom/rtc.h"

#include "sha2017_ota.h"
#include "badge_ota.h"
#include "esprtcmem.h"

#include "py/stackctrl.h"
Expand Down Expand Up @@ -204,7 +204,7 @@ void app_main(void) {
switch (magic) {
case 1:
printf("Starting OTA\n");
sha2017_ota_update();
badge_ota_update();
break;

#ifdef CONFIG_SHA_BPP_ENABLE
Expand Down
2 changes: 1 addition & 1 deletion esp32/modbadge.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ STATIC mp_obj_t badge_eink_png(mp_obj_t obj_x, mp_obj_t obj_y, mp_obj_t obj_file

uint32_t dst_min_x = x < 0 ? -x : 0;
uint32_t dst_min_y = y < 0 ? -y : 0;
int res = lib_png_load_image(pr, &badge_eink_fb[y * BADGE_EINK_WIDTH + x], dst_min_x, dst_min_y, BADGE_EINK_WIDTH - x, BADGE_EINK_HEIGHT - y, BADGE_EINK_WIDTH);
int res = lib_png_load_image(pr, &badge_fb[y * BADGE_EINK_WIDTH + x], dst_min_x, dst_min_y, BADGE_EINK_WIDTH - x, BADGE_EINK_HEIGHT - y, BADGE_EINK_WIDTH);
lib_png_destroy(pr);
if (is_bytes) {
lib_mem_destroy(reader_p);
Expand Down
4 changes: 2 additions & 2 deletions esp32/modbadge.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "badge.h"
#include "badge_pins.h"
#include "badge_fb.h"
#include "badge_eink.h"
#include "badge_eink_fb.h"
#include "badge_eink_dev.h"
#include "badge_power.h"
#include "badge_leds.h"
Expand All @@ -29,4 +29,4 @@
// #include "madison_gurkha.h"
// #include "leaseweb.h"

#include "sha2017_ota.h"
#include "badge_ota.h"
8 changes: 4 additions & 4 deletions esp32/modfreedomgfx_eink.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

#include "modfreedomgfx_eink.h"
#include <badge_eink.h>
#include <badge_eink_fb.h>
#include <badge_fb.h>
#include <badge_input.h>

extern bool ugfx_screen_flipped;

uint8_t* freedomgfxInit(void)
{
badge_eink_fb_init();
return badge_eink_fb;
badge_fb_init();
return badge_fb;
}

void freedomgfxDeinit(void)
Expand All @@ -55,5 +55,5 @@ void freedomgfxDraw()
badge_eink_flags_t flags = DISPLAY_FLAG_FULL_UPDATE | DISPLAY_FLAG_8BITPIXEL;
if(ugfx_screen_flipped)
flags |= DISPLAY_FLAG_ROTATE_180;
badge_eink_display(badge_eink_fb, flags);
badge_eink_display(badge_fb, flags);
}
4 changes: 2 additions & 2 deletions unix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ INC += -I$(TOP)
INC += -I$(BUILD)
INC += -I../../components/ugfx-glue
INC += -I../../components/badge
INC += -I../../components/sha2017
INC += -I../../components/badge-ota
INC += -I../../esp-idf/components/esp32/include/
INC += -I../../ugfx/src/gdisp/mcufont
INC += -I../../ugfx
Expand Down Expand Up @@ -168,7 +168,7 @@ SRC_C = \
modbadge.c \
../../ugfx/drivers/multiple/SDL/gdisp_lld_SDL.c \
ginput_lld_toggle.c \
../../components/sha2017/letsencrypt.c \
../../components/badge-ota/letsencrypt.c \
gfx_mk.c \
modos.c \
moduos_vfs.c \
Expand Down