Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)

set(PROJECT_VER "0.1.92")
set(PROJECT_VER "0.1.93")

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(weclawbot)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ when all local user state should be removed.

| Target | Display | Environment | Navigation |
| --- | --- | --- | --- |
| Waveshare ESP32-S3-RLCD-4.2 | 400 x 300 monochrome reflective LCD | onboard SHTC3 | KEY/left: previous and clear text; BOOT/right: next and full clear |
| Waveshare ESP32-S3-RLCD-4.2 | 400 x 300 monochrome reflective LCD | onboard SHTC3 and battery status | KEY/left: previous and clear text; BOOT/right: next and full clear |
| Zectrix Note 4 | 400 x 300 monochrome e-paper, SSD2683 | cloud weather, onboard battery status | up: previous and clear text; down: next/hardware power; voice: calendar and full clear |

Both targets use ESP32-S3 and 16 MB flash. The visible set stays intentionally
Expand Down Expand Up @@ -185,7 +185,7 @@ BUILD_DIR="$PWD/build-note4" OUT_DIR="$PWD/web/firmware-note4" ./scripts/prepare
```

Both hardware targets and both build channels render the same versioned
upper-left title, for example `微笺 v0.1.92`. The title is derived from
upper-left title, for example `微笺 v0.1.93`. The title is derived from
`WEC_FIRMWARE_VERSION`; there is no separate development-build label.

## Repository Map
Expand Down
18 changes: 17 additions & 1 deletion docs/current-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ WeClawBot / 微笺屏是基于 Waveshare ESP32-S3-RLCD-4.2 的开源固件项目

已知版本问题:

- 公开 `main` 的当前固件源码版本为 `0.1.92`,正式 Release/安装资产仍为
- 公开 `main` 的当前固件源码版本为 `0.1.93`,正式 Release/安装资产仍为
`v0.1.78`;Web 安装页连接真机后显示设备上报版本。
- `scripts/prepare_web_firmware.sh` 已重新生成 `web/firmware/`。
- 下一次正式发布前仍必须核对 release 产物和安装页 manifest。
Expand Down Expand Up @@ -1331,3 +1331,19 @@ weclawbotctl clear
external_power_connected=true / ok=true`,Note 4 为
`present=true / percent=69~70 / usb_host_connected=true /
external_power_connected=true / ok=true`。最终图标的物理像素外观仍需现场目视确认。

## 2026-07-27 RLCD 默认启用电池检测

- 用户确认微雪 RLCD 真机已安装电池,因此 `0.1.92` 继续按无电池监测配置对待 RLCD
是板级能力默认值错误,而不是硬件限制。`0.1.93` 将源码默认改为已安装电池:
`CONFIG_WEC_BATTERY_INSTALLED` 的 Kconfig 默认值、无 Kconfig 编译 fallback 和公开
release defaults 均为启用;未来确有无电池治具时需要显式关闭该配置。
- 固件回归、diff 检查与 ESP-IDF 5.5.2 双目标隔离公开构建通过:微雪 `0x623e70`
(应用分区余 23%),Note 4 `0x633b10`(余 22%);生成的两份 `sdkconfig.public`
均确认 `CONFIG_WEC_BATTERY_INSTALLED=y`。两台 USB 真机已保留 NVS 自动刷入
`0.1.93`,镜像哈希校验通过,清除下载态后由 watchdog reset 回应用态。串口
`WEC:GET` 确认两台运行版本均为 `0.1.93`;供电事件确认微雪 RLCD 为
`present=true / percent=62 / voltage=3.81 / usb_host_connected=true /
external_power_connected=true / ok=true`,Note 4 为
`present=true / percent=69 / voltage=3.85 / usb_host_connected=true /
external_power_connected=true / ok=true`。最终图标的物理像素外观仍需现场目视确认。
4 changes: 2 additions & 2 deletions docs/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ This startup retry rule is shared firmware behavior, while boards without an
SHTC3 continue to use their board-specific environment source.

Both hardware targets render the firmware version in the upper-left header,
for example `微笺 v0.1.92`. Development and public builds use the same title;
for example `微笺 v0.1.93`. Development and public builds use the same title;
the visible version comes from `WEC_FIRMWARE_VERSION`.

Battery sensing:

| Signal | GPIO / ADC | Notes | WeClawBot use |
| --- | --- | --- | --- |
| Battery voltage | GPIO4 / ADC1_CH3 | Board example documents battery voltage through a 3x divider. USB power can still make this rail look like a lithium cell, so `CONFIG_WEC_BATTERY_INSTALLED` gates whether the UI treats it as a real battery. | Top status battery/no-battery icon |
| Battery voltage | GPIO4 / ADC1_CH3 | Production WeClawBot targets are treated as battery-equipped by default. Board examples document this input through a divider; USB power can still make this rail look like a lithium cell on no-battery fixtures, so `CONFIG_WEC_BATTERY_INSTALLED` exists only as an explicit fixture override. | Top status battery icon and level |

The top status bar uses one power model on both hardware targets. The battery
glyph means that an installed battery is available and its fill means battery
Expand Down
9 changes: 5 additions & 4 deletions main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ config WEC_REPLY_ON_TEXT

config WEC_BATTERY_INSTALLED
bool "Device has an installed 18650 battery"
default n
default y
help
BAT_ADC reads the board power path through a divider. On USB power it
can still report a lithium-like voltage even when no 18650 cell is
installed, so keep this disabled for boards running without a battery.
Production WeClawBot targets are treated as battery-equipped by
default. BAT_ADC reads the board power path through a divider; on USB
power it can still report a lithium-like voltage even when no 18650
cell is installed, so disable this only for known no-battery fixtures.

config WEC_TEMPERATURE_OFFSET_DECIC
int "SHTC3 temperature offset in 0.1 Celsius"
Expand Down
4 changes: 2 additions & 2 deletions main/app_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <driver/gpio.h>
#include <driver/spi_common.h>

#define WEC_FIRMWARE_VERSION "0.1.92"
#define WEC_FIRMWARE_VERSION "0.1.93"
#define WEC_PRODUCT_URL "https://weclawbot.link"
#define WEC_PRODUCT_HOST "weclawbot.link"

Expand All @@ -12,7 +12,7 @@
#endif

#ifndef CONFIG_WEC_BATTERY_INSTALLED
#define CONFIG_WEC_BATTERY_INSTALLED 0
#define CONFIG_WEC_BATTERY_INSTALLED 1
#endif

#define WEC_SCREEN_TITLE "微笺 v" WEC_FIRMWARE_VERSION
Expand Down
14 changes: 13 additions & 1 deletion scripts/check_firmware_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,12 @@ def check_shared_power_contract() -> None:
ui_header = read("main/ui.h")
app = read("main/app_main.cc")
defaults = read("sdkconfig.zectrix.defaults")
release_defaults = read("sdkconfig.release.defaults")
kconfig = read("main/Kconfig.projbuild")
for required in [
"#define WEC_BOARD_HAS_INSTALLED_BATTERY 1",
"CONFIG_WEC_BATTERY_INSTALLED=y",
"#define CONFIG_WEC_BATTERY_INSTALLED 1",
"constexpr float kDividerRatio = 2.0f;",
"!battery_status_known_ && WEC_BOARD_HAS_INSTALLED_BATTERY",
"UpdatePowerIndicatorsLocked();",
Expand All @@ -717,8 +720,17 @@ def check_shared_power_contract() -> None:
'\\"external_power_connected\\":%s',
'\\"battery_monitor_enabled\\":%s',
]:
if required not in "\n".join([config, battery, ui, ui_header, app, defaults]):
if required not in "\n".join(
[config, battery, ui, ui_header, app, defaults, release_defaults, kconfig]
):
fail(f"shared power contract is missing {required}")
battery_config = kconfig.split("config WEC_BATTERY_INSTALLED", 1)[1].split(
"\nconfig ", 1
)[0]
if "default y" not in battery_config:
fail("RLCD source default must treat the product as battery-equipped")
if "CONFIG_WEC_BATTERY_INSTALLED=y" not in release_defaults:
fail("public RLCD release defaults must enable battery sensing")
if "plug_parts_[5]" in ui_header or "usb_power_parts_[4]" in ui_header:
fail("hardware targets must not use separate external-power glyphs")
if app.index("ui.SetUsbHostPowerStatus(UsbHostPowerConnected());") > app.index(
Expand Down
1 change: 1 addition & 0 deletions sdkconfig.release.defaults
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Public release overrides belong in this file. The screen title always uses
# the firmware version and does not vary by build channel.
CONFIG_WEC_BATTERY_INSTALLED=y
Loading