Skip to content

Improved simulator - #721

Merged
KenVanHoeylandt merged 2 commits into
mainfrom
simulator-improved
Oct 27, 2026
Merged

KenVanHoeylandt merged 2 commits into
mainfrom
simulator-improved

Conversation

@KenVanHoeylandt

@KenVanHoeylandt KenVanHoeylandt commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Simulator profiles now support touch input and DPI-aware display sizing.
    • The M5Stack Tab5 simulator profile now uses a 1280×720 resolution.
    • The simulator includes a mock battery with a fixed charge level and toggleable charging state.
  • Bug Fixes

    • Improved display buffer alignment for more reliable rendering.
    • Simulator logging and assertion messages now work more reliably across threads.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b0a49a6a-d7e6-4235-84c4-36decfc146e4
Commits

Reviewing files that changed from the base of the PR and between 978f029 and e0b9541.

Files selected for processing: 1
  • Devices/simulator/Source/SimulatorProfile.h
Files skipped from review as they are similar to previous changes: 1
  • Devices/simulator/Source/SimulatorProfile.h

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Walkthrough

The simulator adds DPI-aware display profiles, uses SDL touch devices, and registers a mock power supply. Non-ESP logging gains a per-thread direct-write option, and POSIX assertions write to standard error. LVGL rounds owned non-I1 display-buffer allocation sizes up to the required alignment.

Priority: Not assessed

Merge Risk: Moderate · up to e0b95

An assertion on an app task can hang instead of terminating when its error stream is full. Route assertion output around app I/O before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the main change as improvements to the simulator. It is broad but still clear and related to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 18 functions across 14 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔇 Additional comments: 1
TactilityKernel/source/log_queue.cpp-183-183: 1

183-183: Minor · Stability & Availability · Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Bypass app I/O for direct log writes.

An app task can enable this API, but write_real() calls the interposed write(). That routes logs to the app’s fd 2 instead of the console. It also delivers pending signals and locks the app ledger. A log from an app_manager_for_each_manifest() visitor can therefore deadlock because that visitor already holds the ledger lock. Use a non-interposed console write for this path. (raw.githubusercontent.com)


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92c22a7c-d62f-468b-a2b0-24839af21ec1
Commits

Reviewing files that changed from the base of the PR and between 0d68d6b and 978f029.

Files selected for processing: 16
  • Devices/simulator/Source/Simulator.h
  • Devices/simulator/Source/SimulatorProfile.cpp
  • Devices/simulator/Source/SimulatorProfile.h
  • Devices/simulator/Source/SimulatorProfileApp.cpp
  • Devices/simulator/Source/drivers/sdl_touch.cpp
  • Devices/simulator/Source/module.cpp
  • Devices/simulator/simulator.dts
  • Drivers/mock-drivers-module/bindings/mock,power-supply.yaml
  • Drivers/mock-drivers-module/include/bindings/mock_power_supply.h
  • Drivers/mock-drivers-module/include/mock/mock_power_supply.h
  • Drivers/mock-drivers-module/source/mock_power_supply.cpp
  • Drivers/mock-drivers-module/source/module.cpp
  • Modules/lvgl-module/source/devices/display.cpp
  • Platforms/platform-posix/source/freertos.c
  • TactilityKernel/include/tactility/log.h
  • TactilityKernel/source/log_queue.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread Devices/simulator/Source/SimulatorProfile.h Outdated
Comment thread Platforms/platform-posix/source/freertos.c
@KenVanHoeylandt
KenVanHoeylandt merged commit a26581f into main Oct 27, 2026
3 of 21 checks passed
@KenVanHoeylandt
KenVanHoeylandt deleted the simulator-improved branch October 27, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant