Skip to content

Conversation

@zjwhitehead
Copy link
Member

@zjwhitehead zjwhitehead commented Aug 18, 2025

Uses this community-maintained, up-to-date fork of the platform due to official PIO support from Espresiff being dropped.

https://github.com/pioarduino/platform-espressif32

More detailed changes can be found in the parent repos like https://github.com/espressif/arduino-esp32/releases/tag/3.3.0

Copilot Summary:

Hardware API Modernization:

  • Refactored vibration motor and buzzer control in src/sp140/vibration_pwm.cpp and src/sp140/buzzer.cpp to use the Arduino-ESP32 3.x ledcAttach API, replacing legacy channel-based calls with pin-based control via board_config. This improves compatibility and simplifies hardware initialization and usage.

Platform and Build Configuration Updates:

  • Updated PlatformIO configuration in platformio.ini to use the latest Arduino-ESP32 platform from the pioarduino GitHub repository and added a flag for USB serial compatibility.
  • Set Python version to 3.11.9 in .tool-versions and updated GitHub Actions workflow to use Python 3.11 for all jobs, ensuring consistency in CI environments.

Safety and Reliability Enhancements:

  • Improved ESC initialization and throttle logic in src/sp140/esc.cpp by deferring throttle commands until after CAN adapter is ready, adding readiness checks, and preventing null pointer access.
  • Refactored watchdog setup in src/sp140/sp140.ino for safer initialization using the new ESP-IDF API, handling error conditions more robustly.

Development Environment Improvements:

  • Added the pioarduino.pioarduino-ide extension to VSCode recommendations for a smoother developer experience.

Base automatically changed from v7-2 to master September 16, 2025 01:27
@zjwhitehead
Copy link
Member Author

@copilot this is stale but needs revived. Fix the merge conflicts, pull in the latest platform in the spirit of this original PR, then after going through and fixing make sure it builds properly with the platformIO CLI

Copy link

Copilot AI commented Jan 21, 2026

@zjwhitehead I've opened a new pull request, #88, to work on those changes. Once the pull request is ready, I'll request review from you.

zjwhitehead and others added 7 commits January 21, 2026 15:17
Refactor buzzer and vibration motor initialization to use the new ledcAttach API from Arduino-ESP32 3.x. Update BLE characteristic callbacks to use String instead of std::string for compatibility. Improve ESC initialization by deferring throttle setup until after the first CAN process and add a readiness check. Update watchdog initialization to use the new esp_task_wdt_init config structure. Minor fix to pin initialization order in setup.
# Conflicts:
#	src/sp140/vibration_pwm.cpp
Co-authored-by: zjwhitehead <4623792+zjwhitehead@users.noreply.github.com>
Introduces a .tool-versions file specifying Python 3.11.9 for environment consistency. Also adds an extern declaration for HardwareConfig board_config in vibration_pwm.cpp to resolve linkage or visibility issues.
@zjwhitehead zjwhitehead added this to the v7.5 milestone Jan 27, 2026
@zjwhitehead zjwhitehead mentioned this pull request Jan 27, 2026
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.

2 participants