Skip to content
This repository was archived by the owner on Aug 2, 2020. It is now read-only.

Commit d4628fe

Browse files
authored
Merge pull request #7 from badgeteam/remove_sha_branding
Get ready for more generic firmware
2 parents 6143ecc + 89764f8 commit d4628fe

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

esp32/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ INC += -I../lib/timeutils
4848
INC += -I../../components/badge
4949
INC += -I../../components/ugfx-glue
5050
INC += -I../../components/graph
51-
INC += -I../../components/sha2017
51+
INC += -I../../components/graphics
52+
INC += -I../../components/badge-ota
5253
INC += -I../../components/bpp-recv
5354
INC += -I../../components/bpp-if
5455
INC += -I../../components/ed25519/include
@@ -687,7 +688,7 @@ BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH)/components/,\
687688
badge/badge_power.o \
688689
badge/badge_eink_dev.o \
689690
badge/badge_eink_lut.o \
690-
badge/badge_eink_fb.o \
691+
badge/badge_fb.o \
691692
badge/badge_nvs.o \
692693
badge/badge.o \
693694
graph/font.o \
@@ -697,9 +698,9 @@ BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH)/components/,\
697698
ugfx-glue/ginput_lld_toggle.o \
698699
ugfx-glue/gfx_mk.o \
699700
ugfx-glue/gfx_userfs.o \
700-
sha2017/letsencrypt.o \
701-
sha2017/sha2017_ota_graphics.o \
702-
sha2017/sha2017_ota.o \
701+
badge-ota/letsencrypt.o \
702+
graphics/graphics.o \
703+
badge-ota/badge_ota.o \
703704
badge-first-run/badge_first_run.o \
704705
png/adler32.o \
705706
png/crc32.o \

esp32/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "soc/cpu.h"
3838
#include "rom/rtc.h"
3939

40-
#include "sha2017_ota.h"
40+
#include "badge_ota.h"
4141
#include "esprtcmem.h"
4242

4343
#include "py/stackctrl.h"
@@ -204,7 +204,7 @@ void app_main(void) {
204204
switch (magic) {
205205
case 1:
206206
printf("Starting OTA\n");
207-
sha2017_ota_update();
207+
badge_ota_update();
208208
break;
209209

210210
#ifdef CONFIG_SHA_BPP_ENABLE

esp32/modbadge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
417417

418418
uint32_t dst_min_x = x < 0 ? -x : 0;
419419
uint32_t dst_min_y = y < 0 ? -y : 0;
420-
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);
420+
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);
421421
lib_png_destroy(pr);
422422
if (is_bytes) {
423423
lib_mem_destroy(reader_p);

esp32/modbadge.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
#include "badge.h"
77
#include "badge_pins.h"
8+
#include "badge_fb.h"
89
#include "badge_eink.h"
9-
#include "badge_eink_fb.h"
1010
#include "badge_eink_dev.h"
1111
#include "badge_power.h"
1212
#include "badge_leds.h"
@@ -29,4 +29,4 @@
2929
// #include "madison_gurkha.h"
3030
// #include "leaseweb.h"
3131

32-
#include "sha2017_ota.h"
32+
#include "badge_ota.h"

esp32/modfreedomgfx_eink.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828

2929
#include "modfreedomgfx_eink.h"
3030
#include <badge_eink.h>
31-
#include <badge_eink_fb.h>
31+
#include <badge_fb.h>
3232
#include <badge_input.h>
3333

3434
extern bool ugfx_screen_flipped;
3535

3636
uint8_t* freedomgfxInit(void)
3737
{
38-
badge_eink_fb_init();
39-
return badge_eink_fb;
38+
badge_fb_init();
39+
return badge_fb;
4040
}
4141

4242
void freedomgfxDeinit(void)
@@ -55,5 +55,5 @@ void freedomgfxDraw()
5555
badge_eink_flags_t flags = DISPLAY_FLAG_FULL_UPDATE | DISPLAY_FLAG_8BITPIXEL;
5656
if(ugfx_screen_flipped)
5757
flags |= DISPLAY_FLAG_ROTATE_180;
58-
badge_eink_display(badge_eink_fb, flags);
58+
badge_eink_display(badge_fb, flags);
5959
}

unix/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ INC += -I$(TOP)
2424
INC += -I$(BUILD)
2525
INC += -I../../components/ugfx-glue
2626
INC += -I../../components/badge
27-
INC += -I../../components/sha2017
27+
INC += -I../../components/badge-ota
2828
INC += -I../../esp-idf/components/esp32/include/
2929
INC += -I../../ugfx/src/gdisp/mcufont
3030
INC += -I../../ugfx
@@ -168,7 +168,7 @@ SRC_C = \
168168
modbadge.c \
169169
../../ugfx/drivers/multiple/SDL/gdisp_lld_SDL.c \
170170
ginput_lld_toggle.c \
171-
../../components/sha2017/letsencrypt.c \
171+
../../components/badge-ota/letsencrypt.c \
172172
gfx_mk.c \
173173
modos.c \
174174
moduos_vfs.c \

0 commit comments

Comments
 (0)