fix: Complete conditional compilation guards for RADIO_DRIVER in UITa… #34
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/fix-companion-radio-compilation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
…sk.cpp
Wraps the HomePage::RADIO rendering section with #if RADIO_DRIVER_AVAILABLE guards to prevent compilation errors when radio_driver is not available.
This completes PR #33 fix by adding the actual conditional guards around the code that uses radio_driver symbols (specifically getNoiseFloor()), addressing the code review comment that the initial fix was incomplete.
Description
Type of Change
Related Issues
Testing Performed
Hardware Tested
Code Quality Checklist
Breaking Changes
Screenshots/Logs
Additional Notes
Summary of Changes
Hello @okapteinis, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request finalizes a previous fix by implementing comprehensive conditional compilation guards for the
RADIO_DRIVERfunctionality withinUITask.cpp. The primary objective is to eliminate compilation errors that arise whenradio_driversymbols are referenced in the UI code but theRADIO_DRIVERis not available, thereby improving the build robustness across different configurations and addressing a prior code review comment.Highlights
RADIO_DRIVERinUITask.cppto prevent compilation errors when the radio driver is not available.#if RADIO_DRIVER_AVAILABLEand#endifdirectives around theHomePage::RADIOrendering section inUITask.cpp.radio_driversymbols, such asgetNoiseFloor(), is only compiled whenRADIO_DRIVER_AVAILABLEis defined, resolving potential build failures.Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either
/gemini <command>or@gemini-code-assist <command>. Below is a summary of the supported commands on the current page./gemini review/gemini summary/gemini helpCustomization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a
.gemini/folder in the base of the repository. Detailed instructions can be found here.Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩︎
Code Review
This pull request correctly adds conditional compilation guards around radio-driver-specific UI code to prevent build errors when the radio driver is not available. The logic is sound. I've provided a couple of suggestions to align the formatting of the preprocessor directives with the prevailing style in the codebase for better consistency and readability.
@ -248,6 +248,7 @@ public:display.print(tmp);}} else if (_page == HomePage::RADIO) {#if RADIO_DRIVER_AVAILABLEFor better readability and consistency with the project's coding style (e.g., in
main.cppandUITask.h), preprocessor directives should not be indented. This also aligns with common C++ style guides, such as the Google C++ Style Guide, which recommends placing directives at the beginning of the line. Please remove the indentation for this#ifdirective.To maintain a consistent coding style, please remove the indentation for this
#endifdirective, placing it at the beginning of the line. This aligns with the project's existing style and common C++ conventions.