Compare commits

..

No commits in common. "8bdd1c018fe90acf6ca90bd2ac152d738b8a4f91" and "0cdaefc992dd94f6647e782287b1da3f08d4409e" have entirely different histories.

11 changed files with 13 additions and 20 deletions

View File

@ -1,2 +1,2 @@
watch_file default.nix watch_file default.nix
use flake ..#controller --impure use flake ..#controller --override-input rootdir "file+file://"<(printf %s "$PWD"/../controller)

View File

@ -19,7 +19,12 @@
env = { }; env = { };
scripts = { }; scripts = {
# build.exec = ''
# cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -D PICO_STDIO_SEMIHOSTING=1
# cmake --build build --parallel
# '';
};
}; };
}; };
} }

View File

@ -1,2 +1,2 @@
watch_file default.nix watch_file default.nix
use flake ..#firmware --impure use flake ..#firmware --override-input rootdir "file+file://"<(printf %s "$PWD"/../firmware)

1
firmware/.gitignore vendored
View File

@ -3,4 +3,3 @@
sdkconfig sdkconfig
sdkconfig.old sdkconfig.old
*.swp *.swp
/main/font/*.c

Binary file not shown.

View File

@ -4,7 +4,6 @@
packages = with pkgs; [ packages = with pkgs; [
esp-idf-esp32s3 esp-idf-esp32s3
picocom picocom
lv_font_conv
]; ];
env = { env = {
@ -12,15 +11,13 @@
}; };
scripts = { scripts = {
# build.exec = ''
# cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -D PICO_STDIO_SEMIHOSTING=1
# cmake --build build --parallel
# '';
init.exec = '' init.exec = ''
idf.py set-target esp32s3 idf.py set-target esp32s3
''; '';
gen-fonts.exec = ''
for s in 120; do
DEBUG='*' lv_font_conv --font assets/Tungsten-Bold.ttf --bpp 4 --size $s -r 0x20-0x7F --no-compress \
--format lvgl --lv-include lvgl.h --lv-font-name lv_font_tungsten_"$s" -o main/font/tungsten_"$s".c
done
'';
}; };
}; };
}; };

View File

@ -1,3 +1,3 @@
idf_component_register( idf_component_register(
SRCS "valconomy.c" "ui.c" "lcd.c" "usb.c" "font/tungsten_120.c" SRCS "valconomy.c" "ui.c" "lcd.c" "usb.c"
INCLUDE_DIRS ".") INCLUDE_DIRS ".")

View File

@ -12,10 +12,6 @@ static void b_cfg_cb(lv_event_t *e) {
} }
static void ui_home() { static void ui_home() {
lv_obj_t *l_test = lv_label_create(lv_screen_active());
lv_obj_set_style_text_font(l_test, &lv_font_tungsten_120, 0);
lv_label_set_text(l_test, "VAL TIME");
lv_obj_t *b_cfg = lv_button_create(lv_screen_active()); lv_obj_t *b_cfg = lv_button_create(lv_screen_active());
lv_obj_align(b_cfg, LV_ALIGN_BOTTOM_RIGHT, -10, -10); lv_obj_align(b_cfg, LV_ALIGN_BOTTOM_RIGHT, -10, -10);
lv_obj_add_event_cb(b_cfg, b_cfg_cb, LV_EVENT_CLICKED, NULL); lv_obj_add_event_cb(b_cfg, b_cfg_cb, LV_EVENT_CLICKED, NULL);

View File

@ -2,6 +2,4 @@
#include "lvgl.h" #include "lvgl.h"
LV_FONT_DECLARE(lv_font_tungsten_120)
void val_lvgl_ui(lv_display_t *disp); void val_lvgl_ui(lv_display_t *disp);

View File

@ -20,8 +20,6 @@ CONFIG_FREERTOS_HZ=1000
CONFIG_TINYUSB_DEBUG_LEVEL=0 CONFIG_TINYUSB_DEBUG_LEVEL=0
CONFIG_TINYUSB_HID_COUNT=1 CONFIG_TINYUSB_HID_COUNT=1
CONFIG_LV_DEF_REFR_PERIOD=24 CONFIG_LV_DEF_REFR_PERIOD=24
CONFIG_LV_USE_LOG=y
CONFIG_LV_LOG_PRINTF=y
CONFIG_LV_USE_SYSMON=y CONFIG_LV_USE_SYSMON=y
CONFIG_LV_USE_PERF_MONITOR=y CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_IDF_EXPERIMENTAL_FEATURES=y CONFIG_IDF_EXPERIMENTAL_FEATURES=y