30 Commits

Author SHA1 Message Date
zhangyisong
27ae21bbea Add UID management, LED strip debug, and MCUboot signing updates
- Add UID encoding/decoding with flash storage and CRC16 validation
- Add write UID (0x07) and LED strip color (0x08) protocol commands
- Add debug LED strip configuration option
- Switch MCUboot signing from RSA-2048 to ECDSA-P256
- Add SMP serial client for firmware upload over UART
- Add firmware version output on boot
- Update upgrade documentation with ECDSA key generation steps
2026-08-20 21:16:30 +08:00
zhangyisong
48644610b8 Merge branch 'main' into feat/add_mcuboot 2026-08-18 23:01:13 +08:00
zhangyisong
0b62356bd7 Add temperature sample rate display and log clear button 2026-08-18 22:56:37 +08:00
zhangyisong
de68631faf Add DFU support with MCUboot serial recovery
Implement device firmware upgrade using MCUboot Serial Recovery over
usart1 (reusing the existing protocol UART). The application layer
handles upgrade commands (0xFF) to trigger bootloader entry, while
MCUboot manages the actual firmware swap with RSA signature
verification.

Key additions:
- sysbuild.conf to enable MCUboot bootloader with signing key
- mcuboot.conf with serial recovery and watchdog feed settings
- Kconfig option APP_DFU (default y) with conditional compilation
- dfu.cpp module for DFU initialization
- Upgrade command callback in com.hpp (bootmode_set + sys_reboot)
- Documentation for upgrade procedures and change notes
2026-08-18 21:39:59 +08:00
zhangyisong
3b0c0c321f Configure IR enable pin at initialization 2026-08-12 15:08:54 +08:00
zhangyisong
68bc52572a Add software architecture documentation for photomagnetic head 2026-08-06 22:11:23 +08:00
zhangyisong
214af410e4 Add UART sensor support with MS overlay and diagnostics
Group UART sensors into channel slots and add an MS board overlay
with per-port speed and sensor mode configuration. Also add optional
per-second channel diagnostic output controlled by APP_DEBUG_PRINT.
2026-08-06 20:10:08 +08:00
zhangyisong
0e5d15c814 Refactor app to use static classes and event-driven callbacks
Restructure Led as a template on the DT spec, add a generic
signal/slot mechanism for host status, and cache Infrared sensor
samples via trigger callbacks. Add new init modules for LED, temp,
and watchdog, and build them into the main app.
2026-08-03 22:12:31 +08:00
zhangyisong
a9e8885ec8 Refactor thermistor components and update board dependencies
- Remove heating and NTC functionality from communication module
- Convert Infrared from template to runtime array-based implementation
- Refactor Led to support multiple LEDs with compile-time name
  validation
- Simplify main to remove direct hardware initialization
- Update west manifest for dr2501a board and add ch9438 module
2026-08-02 21:59:50 +08:00
zhangyisong
e0908bc8f0 feat: Parameterize heating start with configurable duty cycle 2026-07-16 21:52:15 +08:00
zhangyisong
f425f0acab Add StartFullEnergy method to HeatingPad API 2026-07-15 11:18:21 +08:00
zhangyisong
1e6d6b9b30 Add support for heating state and NTC commands
Extend the UART protocol to support writing and reading the heating
state, and reading individual pole NTC sensors and the heating pad NTC.
Cache NTC readings for query on demand.  Move PID updates to a workqueue
to avoid blocking the timer IRQ context.
2026-07-13 21:57:54 +08:00
zhangyisong
2c42b67eca Add PWM heating pad binding 2026-07-09 12:42:14 +08:00
zhangyisong
2692282ba3 Remove unused pwm-servo binding, disable heading_pad module, and reduce
sensor polling rate
2026-07-09 12:42:04 +08:00
zhangyisong
aed11ecee8 Add debug logging and fix minor issues
Add printk debug statements to NTC temperature sensor reading and
IR temperature sensor reading. Change NTC loop to use index-based
iteration. Fix missing newline in boot message. Remove unused
watchdog and commented-out code.
2026-07-09 12:29:50 +08:00
zhangyisong
eaa5d0c28b Add NTC sample configuration and PID temperature control
- Add CONFIG_SAMPLE_NTC to CMakeLists.txt and Kconfig
- Implement PI temperature controller with PWM output in heating.hpp
- Convert NtcGroup from template to non-template class
- Add LED helper class with flash support
- Implement COM protocol handlers for device ID and running state
- Add SPI, sensor, and PWM configuration to prj.conf
- Remove indicator overlay and update main.cpp with temperature
  monitoring
- Add test script for serial protocol communication
2026-07-09 11:06:11 +08:00
zhangyisong
1afea0b932 feat: Add required Zephyr headers and return value from main 2026-07-07 19:48:39 +08:00
zhangyisong
5c122122f0 Refactor main.cpp by extracting logic into modular components
Remove CONFIG_STDOUT_CONSOLE from configuration
2026-07-07 19:47:48 +08:00
zhangyisong
e74fa5c804 feat: Add Kconfig and conditional build for hello world sample 2026-07-07 19:47:30 +08:00
1f2a92ad04 🐞 fix(app_photomagnetic):1.更改灯光颜色(红绿蓝)2.恢复enum StatusId : uint8_t { kStandby, kRunning, kPause, kError};(协议中有暂停状态,所以不能删除) v1.0.0 2026-03-26 20:37:31 +08:00
7c49416c68 change led color and add flashing of led v0.3.2 2026-03-26 17:06:33 +08:00
zys
0c6cfe4571 add dts overlay 2026-03-26 15:14:57 +08:00
013c68fda4 🎈 perf: 将枚举StatusId的成员按照规定的数据帧调整,如数据帧7E E7 02 01 00 D1 90的数据部分是00,即该数据帧对应数据协议的待机状态,则枚举的第一个成员改为kStandy。 v0.3.0 v0.3.1 2026-03-13 17:28:06 +08:00
beb9a3e4a2 🐞 fix: 增加关于运行状态的回复数据帧。 2026-03-09 16:52:31 +08:00
zys
7b17066575 feat: add watchdog 2026-03-04 15:01:15 +08:00
zys
2c22d68494 fix: commented all unused module 2026-03-04 13:50:33 +08:00
zys
c277f1d9ac config(cmake): deleted unneedded files 2026-03-04 13:48:16 +08:00
zys
d906bd7987 refactor:use uart com protocal 2026-03-03 22:22:34 +08:00
0539014bfd feat: complete v0.0.1 temperature and id reporting 2026-01-30 20:02:48 +08:00
62205e1377 feat: Complete the optical magnetic small board to obtain temperature and id and receive and send data 2026-01-27 22:02:25 +08:00