-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge "charles_dev" - Quality of Life #97
Merged
Merged
Conversation
This file contains 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
Removed the redundant reInit() method and shifted its functionality into init(). Updated the screen initialization process to set the default text color to black and the background color to white. Added a startup message to the display during initialization.
Updated the initialization message display to be centered on the screen. Calculated position based on screen dimensions and text width for better readability.
Replaced standard exceptions with custom exceptions for better error context. Introduced a new "libsystem" module with delay and panic functions to centralize system-level operations. Removed deprecated "delay.hpp" and updated graphics initialization to support both ESP and non-ESP platforms.
Previously, the LCD was only cleared without specifying a color, which could result in undefined behavior. Now, the background is explicitly set to black using `graphics::packRGB565(0, 0, 0)`, ensuring consistent error display.
Simplify and enhance the display logic for system panic messages by resetting configuration, showing the OS name and version, and providing user instructions in an organized manner. Include vibrator alert to inform users instantly and ensure the message remains visible before system restart.
This commit updates the application management to use `std::shared_ptr` for handling `App` instances. This change ensures better memory management and simplifies the handling of apps in the vector. Additionally, minor improvements in error handling and code clarity were made.
Introduce a new logging function in libsystem to standardize output. Improve app loading by adding explicit logging statements, clarifying invalid manifest errors, and refining path handling.
Revised function and variable declarations to use const where appropriate and improved the readability by reformatting and adding braces to single-line blocks. Additionally, addressed some potential memory issues and added TODO comments for future improvements.
Added build_type set to debug and monitor_filters to use the esp32 exception decoder in the platformio.ini file. This enhances debugging capabilities and makes it easier to trace and resolve exceptions on the esp32 platform.
Refactor the libsystem and AppManager modules to streamline error handling, boot error registration, and application initialization. Introduce shared pointers for LuaFile management and update restart functionality and main application loop.
Cleaned up redundant logging in `app.cpp` and `lua_file.cpp` to reduce clutter and improve code readability. This will make it easier to focus on essential log messages during app runtime.
Commented out the authentication request call in src/main.cpp to bypass auth for app execution. Also added a TODO comment for documenting the `setScreenPower` function in hardware.cpp.
Renamed `system.cpp` and `system.hpp` to `libsystem.cpp` and `libsystem.hpp` respectively. Updated all related include paths across the project. Added logging for boot errors and SD card initialization in `libsystem` functions.
Added error checks for graphics and touchscreen initialization to improve system resilience. Updated logs and I2C scanning functionality to provide more detailed feedback on initialization status.
Finalized first implementation of backtrace saver.
Refactor the panic function to optionally restart the device and save a backtrace. Introduced a Restart exception for controlled restarts. Updated related code and configuration to accommodate these changes.
Enhanced the panic function to include backtrace capture and QR code generation when running on the ESP platform. Added necessary includes, helper functions, and display logic for backtrace data and QR code.
Reorganize `esp_debug_helpers.h` inclusion to be platform-specific, enhancing cross-platform compatibility. Simplify `Restart` constructor with a default implementation and optimize `lcd->printf` in `graphics.cpp` by specifying the format string.
Introduced a clamping mechanism to ensure battery level stays within the valid range of 0 to 1. This prevents unrealistic battery percentage values and enhances robustness.
Added a function to detect battery charging status using a specified GPIO pin. The hardware is now initialized with the relevant pin mode for battery status input. This change is functional for platforms utilizing the ESP framework.
Refactored the launcher to improve app management and GUI updates. Introduced a new overlay module for modular GUI management and cleaner element handling. Added error handling for GUI element management and updated battery level calculation logic.
Introduced `DeviceMode` enumeration and functions to set and get device modes, including NORMAL and SLEEP states. Implemented input handling improvements, such as detecting button press events and updating input states. Modified graphics brightness management for power-saving functionalities and updated the main loop to support device sleep mode.
Introduce a popup box to notify the user when the device is charging, with a relevant icon. Also, enhance logging in the image handling code and replace error handling with exceptions for better debugging and clarity.
Implemented a battery level check during boot to halt system initialization and display error messages if the battery is below 5% and the device is not charging. This ensures the device prompts for charging before proceeding, enhancing overall system stability.
Vas-y je me motive je vais le faire |
# Conflicts: # lib/applications/src/launcher.cpp # lib/gui/src/ElementBase.cpp # lib/lua/src/lua_file.cpp # lib/lua/src/lua_file.hpp # platformio.ini # src/main.cpp
Corrected the method name from getIsEnabled() to isEnabled() to match the underlying widget API. This ensures proper functionality when checking the enabled state of a widget.
Remove unnecessary includes from threads.hpp to streamline dependencies. This improves compilation times and reduces potential for conflicts.
Included `standby.hpp` in multiple source files to ensure proper functionality. This provides access to standby mode features across different modules such as applications, GUI, Lua, and tasks. This change also includes removal of some redundant includes in `standby.cpp`.
Moved project headers from quotes to angle brackets to follow standard conventions. This ensures consistency and prevents potential issues with header file lookups. The relevant headers were also reordered for better readability.
Changed `#include <threads.hpp>` to `#include "threads.hpp"` to correct the inclusion path. This ensures the proper compilation of the gsm module by correctly referencing the project's header file.
Removed redundant and unnecessary header files to streamline compilation and reduce dependencies. Added essential includes in relevant files to ensure proper functionality without excess clutter.
Replaced `#pragma once` with traditional include guards in `backtrace.hpp` to enhance compatibility. Also, adjusted the placement of `#ifdef ESP_PLATFORM` macros in `backtrace.cpp` for clearer structure and consistency.
Changed header file inclusion from angled brackets to quotation marks for local file inclusion in gui.hpp. Additionally, reorganized the include statements in ElementBase.hpp for better coding practices and consistency.
Changed the include directive for Surface.hpp to use quotation marks instead of angle brackets. This ensures the correct file path is used, considering project-specific headers.
Deleted the platformio.yml workflow and removed unnecessary includes from multiple files to streamline code dependencies. Additionally, updated the verbosity flag for ESP32 build in the platformio-ci.yml workflow to aid in troubleshooting.
Deleted the platformio.yml workflow and removed unnecessary includes from multiple files to streamline code dependencies. Additionally, updated the verbosity flag for ESP32 build in the platformio-ci.yml workflow to aid in troubleshooting.
paxo-rch
approved these changes
Sep 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour moi c'est bon
C'est ok pour vous si on merge maintenant? |
b5i
approved these changes
Sep 2, 2024
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.
Quality of Life
Changes :
Tested on :