Conversation
Introduce C++ sigslot events for cp0_lvgl and initialize the audio handler during cp0_lvgl startup. Implement a miniaudio-backed AudioSystem that uses PulseAudio, resolves bundled audio assets through hal_path_audio_dir, preloads switch and enter sounds, and supports playing named wav files through cp0_signal_audio. Update component and HelloWorld build requirements to compile C++ sources and link Sigslot and Miniaudio.
Replace cp0_lvgl signal declarations with eventpp CallbackList definitions generated from a shared registration plan. Add an event queue runner for cp0 tasks so callbacks can be processed asynchronously. Introduce cp0_lvgl battery support that reads the CP0 battery capacity sysfs node and publishes LVGL battery events through cp0_signal_battery_pub during cp0_lvgl initialization. Enable eventpp in HelloWorld default configs and add eventpp to cp0_lvgl and HelloWorld build requirements.
Break the SDL LVGL backend out of the monolithic sdl_lvgl.c implementation so display setup, keyboard handling, and file path hooks live in their own translation units. - Move SDL window creation and environment-based sizing/title setup into sdl_lvgl_display.c - Move SDL keyboard input, LVGL custom event registration, key metadata mapping, UTF-8 buffering, and Linux keycode translation into sdl_lvgl_keyboard.c - Add sdl_lvgl.h for shared SDL backend init entry points used by cp0_lvgl_init - Add an SDL cp0_file_path implementation hook and teach the CP0 file resolver to route png, wav, and ttf assets into image, audio, and font share directories
Introduce a new Compass page for APPLaunch with a 320x170 LVGL layout, including a compass disc panel, IMU level indicator, yaw/ACC/GYR labels, bottom soft-key labels, and keyboard handling for return/calibration actions. Add the SVG icon font and compass disc image assets required by the new UI. Enable the sigslot, cp0_lvgl, and eventpp components across APPLaunch default configuration variants so the staged UI can build consistently on supported targets.
Replace the simple UI sound playback helper with a command-driven AudioSystem that supports file playback, playback pause/resume/stop, recording capture, capture pause/resume/stop, and saving captured WAV output from a temporary recording file. Add audio status callbacks and optional recording waveform generation so LVGL pages can receive play-complete notifications, command results, and live capture waveform samples through cp0_signal_audio_setup and cp0_signal_audio_api. Wire the expanded audio interface into the HAL signal plan and SDL startup path, add an SDL audio source shim, and update cp0_file_path handling for image, audio, and font assets across cp0 and SDL builds. Also remove the unused Sigslot dependency from the cp0_lvgl SConstruct requirements.
Add CP0 camera integration backed by libcamera and JPEG output, including build requirements, signal registration, initialization hooks, and photo capture/status API handling. Refactor APPLaunch recorder UI into multi-page home/save/file/playback flows with button/key bindings, waveform updates, file scanning, save confirmation, and playback state management. Update app launch wiring for Compass and camera visibility, move miniaudio implementation ownership to the CP0 audio component, adjust build defines, ignore generated/local artifacts, and refresh APPLaunch deploy settings.
Replace the page-local libcamera implementation with a camera API client that consumes CP0 frame callbacks, renders RGB565 previews in LVGL, and separates hardware access from the APPLaunch camera UI. Extend the CP0 camera service with frame streaming callbacks, RGB565 frame payloads, ScalerCrop-based zoom and pan commands, and per-request crop application while preserving JPEG capture support. Add SDL camera init stubs so the component link path remains consistent across hardware and SDL builds, and wire init_camera into the SDL LVGL startup path. Redesign the camera page around preview, gallery, detail, and dialog flows with keyboard/button actions for capture, zoom, pan, save feedback, file browsing, and delete confirmation.
Centralize APPLaunch hardware/platform interfaces under the cp0_lvgl component so the project no longer depends on projects/APPLaunch/main/hal. Changes:\n- Move public hal/*.h headers and keyboard_input.h into ext_components/cp0_lvgl/include.\n- Move Linux/CP0 HAL implementations into ext_components/cp0_lvgl/src/cp0 as cp0_hal_* files.\n- Move CP0 keyboard input into cp0_lvgl and keep app battery timer dispatch under main/src.\n- Move SDL HAL implementations into ext_components/cp0_lvgl/src/sdl and add web/win32 stubs under cp0_lvgl.\n- Remove APPLaunch main/hal from project sources and make all APPLaunch configs depend on cp0_lvgl.\n- Align CP0/SDL keyboard event dispatch with the shared lv_c_event[CP0_C_EVENT_KEYBOARD] registration. Validation:\n- CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk scons -j8 --implicit-deps-changed\n- gcc/g++ -fsyntax-only over migrated SDL/Web/Win32 HAL files\n- Verified no residual main/hal, hal/sdl, hal/web, hal/win32, or ../hal_*.h references.
Integrate ext-APPLaunch feature work on top of the NewLaunch HAL relocation. Conflict resolution:\n- Kept NewLaunch's ownership model where APPLaunch no longer builds projects/APPLaunch/main/hal and uses cp0_lvgl for HAL/platform interfaces.\n- Preserved ext-APPLaunch's eventpp/sigslot configuration, cp0_lvgl signal registration, audio/battery/camera/file components, compass UI assets, and APPLaunch UI updates.\n- Resolved SDL cp0_lvgl by using the ext-APPLaunch split init entry point while keeping shared lv_c_event[CP0_C_EVENT_KEYBOARD] dispatch from NewLaunch.\n- Resolved camera UI in favor of the ext-APPLaunch gallery/camera refactor.\n- Regenerated build config after enabling EVENTPP/SIGSLOT and fixed commount.cpp global lambda captures. Validation:\n- CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk scons -j8 --implicit-deps-changed\n- git diff --check --cached
Add cp0_lvgl_app as an APPLaunch-facing facade for hardware services that were previously consumed through hal_* headers. The facade exposes cp0_* types and functions for settings, paths, filesystem watching, process control, PTY, networking, screenshots, audio, battery, backlight, volume, WiFi, Bluetooth, and time. Switch APPLaunch main/UI code from hal_* includes and symbols to cp0_lvgl_app.h. This removes direct dependency on the legacy hal_* application interface while preserving behavior through cp0_lvgl-backed wrappers. Validated with: CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk scons -j8 --implicit-deps-changed from projects/APPLaunch.
Route APPLaunch resource, keyboard, lock, and application-directory path lookups through the cp0_file_path facade instead of calling cp0_path_* directly. Add a C-compatible cp0_file_path_c entry point plus a C++ cp0_lvgl_file.hpp declaration, and expand CP0/SDL file path resolution for images, audio, fonts, and launcher-specific special paths. Continue internalizing cp0_lvgl implementations by renaming Linux cp0_hal_* implementation files to cp0_app_* and leaving cp0_lvgl_app.cpp as the async audio integration point. Validated with CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk scons -j8 --implicit-deps-changed; APPLaunch main has no cp0_path_* callsites remaining.
Delete unused cp0_app_paths and remove the cp0_path_* declarations after APPLaunch moved path resolution to cp0_file_path. Delete unused cp0_app_audio and remove the cp0_audio_init/play/play_sync/stop/deinit facade declarations. Route APPLaunch audio playback through cp0_signal_audio_api using PlayFile, with a small C wrapper for C callsites. Validated with CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk scons -j8 --implicit-deps-changed and residual cp0_audio_*/cp0_path_* searches.
Fold the APPLaunch keyboard_input compatibility surface into the real cp0_lvgl keyboard backends so the application can keep using LV_EVENT_KEYBOARD, struct key_item, keyboard_read_thread(), kbd_state_name(), LVGL_HOME_KEY_FLAG, and LVGL_RUN_FLAGE without the standalone cp0_keyboard_input.c file. The cp0 backend now owns the Linux libinput/xkb/TCA8418/repeat implementation plus pause/resume handling. The SDL backend now emits the same struct key_item payload through LV_EVENT_KEYBOARD while retaining SDL text/control key handling, so APPLaunch key consumers do not need to change type or event channel yet. Validation: CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk scons -j8 --implicit-deps-changed passed. Also attempted CONFIG_DEFAULT_FILE=linux_x86_sdl2_config_defaults.mk scons -j8 --implicit-deps-changed; SDL sources compiled, but final link is blocked by missing host/target SDL2 library (-lSDL2).
Route APPLaunch startup through cp0_lvgl_init() so cp0_lvgl owns framebuffer, input, audio, battery, and camera initialization. The launcher now only prepares app-specific environment values before calling the cp0_lvgl entry point. Move the Linux keypad LVGL read callback and evdev key conversion into cp0_lvgl_keyboard.c. init_input() now registers the keyboard event, starts keyboard_read_thread(), and creates the LVGL keypad/pointer input devices while preserving the existing LV_EVENT_KEYBOARD and struct key_item channel used by APPLaunch UI code. Move framebuffer device discovery and force-refresh setup into cp0_lvgl_freambuffer.c, removing the duplicate get_st7789v_fbdev and display setup code from main.cpp. Replace discrete APPLaunch battery/DELL event globals with lv_c_event slots. LV_EVENT_BATTERY and LV_EVENT_DELL_CPP_DATA now map to CP0_C_EVENT_BATTERY and CP0_C_EVENT_DELL_CPP_DATA, and battery payloads are unified as cp0_battery_info_t pointers. Validation: reviewed README_ZH.md build instructions, then ran export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed successfully.
Let cp0_lvgl own periodic battery event publication instead of keeping an APPLaunch-local battery facade. init_battery() now creates a guarded BatterySystem singleton, registers the existing cp0_signal_battery_pub hook, and installs a 3 second LVGL timer that publishes lv_c_event[CP0_C_EVENT_BATTERY]. Remove projects/APPLaunch/main/src/app_battery.c and projects/APPLaunch/main/include/battery.h. main.cpp no longer includes battery.h or creates battery_timer_cb directly, so APPLaunch startup relies on cp0_lvgl_init() for battery polling just like the other hardware-facing initialization paths. Keep the event payload shape aligned with the lv_c_event migration: battery events carry cp0_battery_info_t pointers. Also update the global hint comment to point at the cp0_lvgl keyboard dispatch path after moving keypad dispatch out of main.cpp. Validation: reviewed README_ZH.md build guidance, then ran export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed successfully.
APPLaunch no longer schedules work through C-Thread-Pool after battery polling and audio playback were moved away from the old thpool paths. Remove the remaining g_launch_thread_pool global, thpool_init() startup call, and thpool.h includes. Drop the C-Thread-Pool fetch/source/include block from the APPLaunch SConstruct so the project no longer downloads or builds thpool.c unnecessarily. Also clean the stale comment in ui_events.c that referenced the old thpool_add_work audio path. Validation: reviewed README_ZH.md build guidance, then ran export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed successfully.
Centralize APPLaunch runtime environment setup in cp0_lvgl by moving XDG/PipeWire/Pulse and Linux keyboard environment initialization out of main.cpp and into init_lvgl_env(). cp0_lvgl_init() now prepares these runtime values before events, framebuffer, input, audio, battery, and camera initialization. Route cp0_volume_read() and cp0_volume_write() through cp0_signal_audio_api so APPLaunch continues to use the same public cp0 app API while the implementation is owned by AudioSystem. AudioSystem now handles VolumeRead and VolumeWrite commands and cp0_app_settings no longer directly shells out for volume control. Validation: read README_ZH.md cross-compile instructions, then ran cd projects/APPLaunch && export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed.
TinyGPS++ was still compiled through main/src/*.c* but APPLaunch no longer uses the parser. The only remaining project reference was an unused include in the HikePod page, so remove that include and delete the TinyGPS++ source and compatibility headers. This reduces APPLaunch build inputs and avoids keeping an unused GPS parsing dependency in the launcher while preserving the current HikePod UI behavior. Validation: read README_ZH.md cross-compile instructions, then ran cd projects/APPLaunch && export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed.
Replace APPLaunch direct printf diagnostics with the SDK sample_log.h SLOGI logging macros and add the SDK utilities include path to the APPLaunch build. This keeps startup, launcher, audio, console, file, SSH, LoRa, music, and recorder logs on the common SDK logging path instead of raw stdout formatting. Also move the remaining startup restore of saved brightness and volume out of main.cpp into cp0_lvgl init via init_lvgl_saved_settings(). cp0_lvgl_init() now restores these persisted hardware settings after audio initialization so volume writes continue to route through AudioSystem/cp0_signal_audio_api. Validation: read README_ZH.md cross-compile instructions, then ran cd projects/APPLaunch && export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed.
Add cp0_signal_system_play as a dedicated cp0_lvgl signal for launcher system sound effects. Implement switch.wav and enter.wav playback inside AudioSystem using a cached miniaudio context, engine, and decoded ma_sound instances so repeated navigation sounds reuse the loaded assets instead of reopening files. Expose cp0_signal_system_play_asset() for C callers and switch APPLaunch navigation/confirm effects to that API. Keep startup.mp3 on the generic cp0_signal_audio_api asset path because it is not one of the cached system effects. Remove the remaining APPLaunch-local miniaudio audio system from ui_events.c, including ES8388 lookup, audio init/load helpers, and direct playback state. Validation: cd projects/APPLaunch && export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed
Drop AppStoregroup, APPNotegroup, and AppPythongroup from ui_input_group because no APPLaunch callers reference them or switch input devices to those groups. Keep Screen1group and input_group_init() because the launcher still uses Screen1group when loading home and restoring focus after app/page transitions. Also remove unused stdio/string includes from ui_input_group.c. Validation: cd projects/APPLaunch && export CONFIG_DEFAULT_FILE=linux_x86_cross_cp0_config_defaults.mk && scons -j8 --implicit-deps-changed
Move the old Screen1group and input_group_init implementation into UILaunchPage. Expose init_input_group, bind_home_input_group, and home_input_group for home-screen input group management. Remove the obsolete ui_input_group C facade. Validation: CONFIG_DEFAULT_FILE=linux_x86_sdl2_config_defaults.mk scons -j22 passed.
Enable CONFIG_V9_5_LV_USE_EXT_DATA across APPLaunch default build configurations.
Move launcher carousel objects into a typed UILaunchPage array and remove unused SquareLine object declarations. Use C++ rotation helpers and a structured carousel slot table for card/title animation state. Align app page top bars with the launcher header styling while keeping flex layout spacing.
Move launcher image resources to semantic file names and resolve them directly through cp0_file_path_c at LVGL call sites. Replace loose global font pointers with a LauncherFonts manager owned by zero_lvgl_os and keyed by TTF name, size, and style. Clean up launcher page base naming, input accessors, SDL Ctrl-key handling, and move launcher initialization responsibilities under zero_lvgl_os. Verified with: CONFIG_DEFAULT_FILE=linux_x86_sdl2_config_defaults.mk scons -j22
Move cp0_lvgl service implementations into explicit CP0 and SDL backends and retire the older cp0_app/hal shim files. Add filesystem/config/network/process/pty/screenshot/settings/imu/lora/bq27220 service modules for CP0 and SDL, update registration headers, and adjust the cp0_lvgl build graph. Introduce APPLaunch app registry plumbing and update launcher UI/page integration to use the platform service APIs. Add architecture and platform-decoupling documentation for the launcher refactor.
Initialize the CP0 system sound cache when the audio service starts instead of lazily loading on first playback. Cache all entries from system_sound_names_, play SystemSoundPlay by index, and reload cached sounds immediately when SetSystemSoundNames updates the names. Switch CP0 volume control to pactl default-sink percentages and keep VolumeRead/VolumeWrite on a direct 0-100 contract. Mirror the SystemSoundPlay, SetSystemSoundNames, and SystemSoundEnable commands in the SDL audio backend for API parity.
Remove the temporary APPLaunch_api wrapper now that pages can call the cp0 service API directly. Route launcher startup, switch, and enter sounds through SystemSoundPlay indices so they use the preloaded system sound cache. Update setup volume handling to pass 0-100 percentages directly to VolumeRead and VolumeWrite. Drop queued carousel switch handling in favor of ignoring input while animations are active, and refresh battery status when app pages initialize.
Use an atomic run flag for the detached LVGL event thread and wait on the event queue before processing. This avoids spinning the queue loop when there are no pending events and makes CP0_C_EVENT_END stop signalling thread-safe.
Point setup.ini at the current remote host and enable the post-deploy service restart command.
Align the CP0 default system sound table with the launcher indices: startup, switch, and enter. Allow individual sound files to fail without discarding successfully loaded slots, and retry cache initialization on playback if boot-time preload failed before PulseAudio was ready.
Make CP0 SystemSoundPlay report whether ma_sound_start actually succeeded instead of always returning success after a request. Add a launcher-side startup sound retry timer so first boot can recover when PulseAudio or the preloaded sound cache is not ready at the moment the home screen first loads. Clean up the startup retry timer in the launcher page destructor to avoid callbacks after the page is destroyed. Keep the home battery percentage label on the same default font path used by sub-app top bars, avoiding the previous 100-percent-only font switch.
Port the effective master screenshot hint fix to the current APPLaunch framework without merging master directly. Use _mkdir() behind _WIN32 while keeping the existing cp0_signal_screenshot_api screenshot backend and the Linux ownership fixup path.
Rename APPLaunch UI source files and animation paths to snake_case names that match their responsibilities. Translate remaining project source comments to English and remove stale commented-out debug/demo code from APPLaunch, cp0_lvgl, and UserDemo.
Move the packaged service into the user systemd unit directory and manage it through systemctl --user for the UID 1000 account. Enable linger, start user@1000.service, and wire postinst/prerm to enable, restart, stop, and disable the user service with PipeWire Pulse ordering.
Delete outdated APPLaunch architecture and cp0_lvgl platform decoupling notes that no longer match the current launcher structure.
Expose a cp0_compass_calibrate API and implement asynchronous 8-figure magnetometer bias calibration in the cp0 IMU backend. Bind Compass F6/6 to start calibration and show a centered 8-figure calibration prompt while calibration is running.
# Conflicts: # projects/APPLaunch/main/ui/ui_global_hint.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merge brings
NewLaunchup to date with the currentmasterbranch so the branch can be merged cleanly on GitHub.The main conflict was in
projects/APPLaunch/main/ui/ui_global_hint.cpp.masterstill used the older C-styleui_global_hint_on_key()entry point and direct HAL screenshot call, whileNewLaunchhad already moved to the newer APPLaunch/cp0 architecture withui_global_hint::on_key(),launcher_fonts(), andcp0_signal_screenshot_api().The conflict was resolved by keeping the
NewLaunchimplementation as the primary path, while preserving compatibility through the existing C wrapper:namespace ui_global_hint { void on_key(...) }extern "C" ui_global_hint_on_key(...)wrappercp0_signal_screenshot_api()launcher_fonts()This merge also incorporates the
masterupdate to theprojects/AppStoresubmodule:projects/AppStorefrom612d6e9to065d95bfeat: add registry regions and install fixesValidation performed:
cd projects/APPLaunch scons -j4After this merge,
NewLaunchcontains all commits frommasterand should be eligible for GitHub merge checks again.