diff --git a/include/device_config.h b/include/device_config.h index c0f37d4..7ffc3ca 100644 --- a/include/device_config.h +++ b/include/device_config.h @@ -27,13 +27,27 @@ // DEPRECATED: Enable Wii Balance Board measuring. UNSTABLE: Uses Bluedroid (a FUCKTON of RAM), periodic disconnects or reboots without leaving a stack trace. // #define HAS_BALANCE_BOARD_INTEGRATION +// WIP: Pixel Cave the game +// #define HAS_PIXEL_CAVE + +// Enable serial MIDI input +// #define HAS_SERIAL_MIDI + // Enable the yukkuri voice talking clock #ifdef LIBAQUESTALK_FOUND #define HAS_AQUESTALK #else -#warning "Lib AquesTalk not found, TTS disabled" +#warning "AquesTalk not found, TTS disabled. See `./lib/nonfree-aquestalk/README.md` on how to add the library correctly." #endif +// Enable the split-screen app host, only useful on long screens +#if HWCONF_DISPLAY_WIDTH_PX >= 192 + #define HAS_SPLIT_SCREEN_APPHOST +#endif + +// Enable the scroll string between cycles +// #define HAS_FREE_TEXT_SCROLL + // Disable the faux brightness reduction for some UI elements by drawing them only every other frame // #define COMPOSABLE_NO_EVENODD @@ -81,14 +95,4 @@ #endif #endif -#if HAS(AQUESTALK) - #if !defined(LIBAQUESTALK_FOUND) - #error libaquestalk was not found. See `./lib/nonfree-aquestalk/README.md` on how to add it correctly, or disable `HAS_AQUESTALK` feature flag. - #endif -#endif - -#if HWCONF_DISPLAY_WIDTH_PX >= 192 - #define HAS_SPLIT_SCREEN_APPHOST -#endif - #endif \ No newline at end of file diff --git a/include/devices/big_clock.h b/include/devices/big_clock.h index 329bceb..765bf69 100644 --- a/include/devices/big_clock.h +++ b/include/devices/big_clock.h @@ -11,6 +11,7 @@ #define HAS_TEMP_SENSOR #define HAS_MOTION_SENSOR #define HAS_KEYPAD +#define HAS_FREE_TEXT_SCROLL // Plasma Information System OS (not DOS, there's no disk in it!) #define PRODUCT_NAME "PIS-OS" diff --git a/include/devices/big_noritake.h b/include/devices/big_noritake.h index 3eb1846..d3b8745 100644 --- a/include/devices/big_noritake.h +++ b/include/devices/big_noritake.h @@ -12,6 +12,7 @@ #define HAS_TEMP_SENSOR #define HAS_IR_RECEIVER #define HAS_OTAFVU +#define HAS_FREE_TEXT_SCROLL // Plasma Information System OS (not DOS, there's no disk in it!) #define PRODUCT_NAME "LongPIS-OS" diff --git a/include/devices/led_clock.h b/include/devices/led_clock.h index c7fa608..4e305c9 100644 --- a/include/devices/led_clock.h +++ b/include/devices/led_clock.h @@ -10,6 +10,7 @@ #define HAS_VARYING_BRIGHTNESS #define HAS_LIGHT_SENSOR #define HAS_IR_RECEIVER +#define HAS_FREE_TEXT_SCROLL // Plasma Information System OS (not DOS, there's no disk in it!) #define PRODUCT_NAME "LePIS-OS" diff --git a/include/devices/mid_clock_noritake_wide.h b/include/devices/mid_clock_noritake_wide.h index 1432382..4774586 100644 --- a/include/devices/mid_clock_noritake_wide.h +++ b/include/devices/mid_clock_noritake_wide.h @@ -11,7 +11,10 @@ #define HAS_SERIAL_MIDI #define HAS_VARYING_BRIGHTNESS #define HAS_LIGHT_SENSOR + +// For Dev, not useful yet #define HAS_PIXEL_CAVE +#define HAS_FREE_TEXT_SCROLL // Plasma Information System OS (not DOS, there's no disk in it!) #define PRODUCT_NAME "PIS-dev" diff --git a/src/app/idle.cpp b/src/app/idle.cpp index 3c1bd8c..9c32e25 100644 --- a/src/app/idle.cpp +++ b/src/app/idle.cpp @@ -52,7 +52,9 @@ typedef enum MainViewId: uint16_t { VIEW_WORD_OF_THE_DAY, #endif VIEW_FB2K, +#if HAS(FREE_TEXT_SCROLL) VIEW_FREE_TEXT, +#endif VIEW_MAX } MainViewId_t; @@ -94,7 +96,6 @@ static WeatherPressureChart * pressureView; static WordOfTheDayView * wotdView; #endif static Fb2kView *fb2kView; -static FreeTextView *freeTextView; static ViewMultiplexor * slideShow; @@ -272,7 +273,9 @@ void app_idle_init(SensorPool* s, Beeper* b, NewSequencer* seq, Yukkuri* tts) { screen_times_ms[VIEW_SOFTAP] = 30000; screen_times_ms[VIEW_FVU_NOTICE] = 10000; +#if HAS(FREE_TEXT_SCROLL) screen_times_ms[VIEW_FREE_TEXT] = 1000; +#endif screen_times_ms[VIEW_CLOCK] = prefs_get_int(PREFS_KEY_SCRN_TIME_CLOCK_SECONDS) * 1000; screen_times_ms[VIEW_NEXT_ALARM] = prefs_get_int(PREFS_KEY_SCRN_TIME_NEXT_ALARM_SECONDS) * 1000; #if HAS(TEMP_SENSOR) @@ -315,7 +318,6 @@ void app_idle_init(SensorPool* s, Beeper* b, NewSequencer* seq, Yukkuri* tts) { fb2kView = new Fb2kView(); nextAlarmView = new NextAlarmView(); softApView = new SoftApInfoView(); - freeTextView = new FreeTextView(); touchArrows = new TouchArrowOverlay(); touchArrows->bottom = true; @@ -351,7 +353,9 @@ void app_idle_init(SensorPool* s, Beeper* b, NewSequencer* seq, Yukkuri* tts) { slideShow->add_view(wotdView, VIEW_WORD_OF_THE_DAY); #endif slideShow->add_view(fb2kView, VIEW_FB2K); - slideShow->add_view(freeTextView, VIEW_FREE_TEXT); +#if HAS(FREE_TEXT_SCROLL) + slideShow->add_view(new FreeTextView(), VIEW_FREE_TEXT); +#endif lastScreenSwitch = xTaskGetTickCount(); diff --git a/src/network/admin_panel.cpp b/src/network/admin_panel.cpp index 704a46d..ba3de14 100644 --- a/src/network/admin_panel.cpp +++ b/src/network/admin_panel.cpp @@ -453,6 +453,7 @@ static void build() { GP.SPOILER_END(); GP.BREAK(); +#if HAS(FREE_TEXT_SCROLL) GP.SPOILER_BEGIN("Free Text", GP_BLUE); GP.SPAN("Enter multiple lines of text to show between cycles, separating them with the Enter key."); GP.AREA(PREFS_KEY_FREE_TEXT_STRING, 4, prefs_get_string(PREFS_KEY_FREE_TEXT_STRING)); @@ -461,6 +462,7 @@ static void build() { GP.SELECT(PREFS_KEY_FREE_TEXT_RANDOM, "Sequential,Randomize", prefs_get_int(PREFS_KEY_FREE_TEXT_RANDOM)); GP.SPOILER_END(); GP.BREAK(); +#endif GP.SPOILER_BEGIN("Power Management", GP_BLUE); #if HAS(VARYING_BRIGHTNESS) && HAS(LIGHT_SENSOR)