apptest 改为温度量程扫测 0.1-999.0 (摄氏+华氏) (APP V1.00.40)

- apptest: 0.1~9.9(0.1) -> 10~99(1) -> 100~990(10) -> 999.0, 先C后F各扫一遍
- 保留 display_set_raw 供后续状态显示(Err/Lo/Hi)用
- 显示不做F/C换算, 华氏/摄氏只影响DIG4字母与DIG6-A
- 仅 APP 改动, Boot 不动 (仍 V1.00.07)
- docs/开发日志.md: 新增 §68
This commit is contained in:
evan.liu 2026-09-13 10:02:19 +08:00
parent ed2cf2a29d
commit 03fda56396
14 changed files with 6402 additions and 6378 deletions

View File

@ -1639,3 +1639,20 @@ APP2 链接的镜像发向 APP1 区。设备端 END 校验(向量表 Reset PC
500ms;结束后恢复 auto 状态并回 0.0;命令表注册 `apptest`。 500ms;结束后恢复 auto 状态并回 0.0;命令表注册 `apptest`。
- 版本:APP `V1.00.38` → `V1.00.39`(`APP_FW_VERSION_NUM` 0x00010026 → - 版本:APP `V1.00.38` → `V1.00.39`(`APP_FW_VERSION_NUM` 0x00010026 →
0x00010027)。Boot 不动(仍 V1.00.07)。 0x00010027)。Boot 不动(仍 V1.00.07)。
## 68. `apptest` 改为温度量程扫测(0.1~999.0,摄氏+华氏)(2026-09-06,APP V1.00.40,仅 APP)
- 用户澄清:`apptest` 不是"全字符",而是要**把 0.1~999.0 整个温度量程在
摄氏、华氏各扫一遍**,覆盖所有数字位(百/十/个/小数)与 F/C 单位字母、
DIG6-A 指示。
- 修改(`cli_core.c` `CmdAppTest`):
- 删掉上一版的 0-9/A-F 裸码循环(`display_set_raw` 保留,供后续状态
显示如 Err/Lo/Hi 用,不再被 apptest 调用);
- 改为两轮扫测(先摄氏后华氏):`0.1~9.9`(步 0.1)→ `10~99`(步 1)→
`100~990`(步 10)→ `999.0`,每值 100ms、末值 300ms;全程强制自动扫描,
结束恢复 auto 状态并回 0.0;
- 命令 help 更新为 `apptest: sweep display 0.1-999.0 in C and F`。
- 注:显示驱动**不做 F/C 数值换算**,华氏/摄氏只影响 DIG4 字母与 DIG6-A,
数值原样显示。
- 版本:APP `V1.00.39` → `V1.00.40`(`APP_FW_VERSION_NUM` 0x00010027 →
0x00010028)。Boot 不动(仍 V1.00.07)。

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,12 +9,12 @@
#define __APP_VERSION_H__ #define __APP_VERSION_H__
#ifndef APP_FW_VERSION #ifndef APP_FW_VERSION
#define APP_FW_VERSION "V1.00.39" #define APP_FW_VERSION "V1.00.40"
#endif #endif
/* Numeric form used by the BLE info query / OTA records: 0x00MMmmpp */ /* Numeric form used by the BLE info query / OTA records: 0x00MMmmpp */
#ifndef APP_FW_VERSION_NUM #ifndef APP_FW_VERSION_NUM
#define APP_FW_VERSION_NUM 0x00010027u #define APP_FW_VERSION_NUM 0x00010028u
#endif #endif
#endif /* __APP_VERSION_H__ */ #endif /* __APP_VERSION_H__ */

View File

@ -848,41 +848,46 @@ static void CmdDispTest(int argc, char* argv[])
} }
/** /**
* @brief "apptest": render every displayable character (0-9, A-F) in all * @brief "apptest": sweep the temperature display over 0.1..999.0 in both
* four numeric positions so the full segment set can be verified * Celsius and Fahrenheit so every digit position (hundreds/tens/ones/
* visually. DIG4 stays "C". Restores auto-scan + 0.0 when done. * tenths), the F/C unit letter and the DIG6-A indicator are exercised.
* Restores auto-scan + 0.0 when done.
*/ */
static void CmdAppTest(int argc, char* argv[]) static void CmdAppTest(int argc, char* argv[])
{ {
uint8_t prev_auto = display_auto_get(); uint8_t prev_auto = display_auto_get();
uint8_t digits[5]; /* DIG1..DIG5 raw codes */ uint16_t i;
uint8_t c; uint8_t unit;
(void)argc; (void)argc;
(void)argv; (void)argv;
display_auto_set(1u); display_auto_set(1u);
cli_write("apptest: 0-9, A-F (each repeated in every numeric position)\r\n"); for (unit = 0u; unit < 2u; unit++)
{
uint8_t type = (unit == 0u) ? DISP_TYPE_CELSIUS : DISP_TYPE_FAHRENHEIT;
for (c = 0u; c < 16u; c++) cli_printf("apptest sweep %s: 0.1..9.9 -> 10..99 -> 100..999\r\n",
{ (unit == 0u) ? "C" : "F");
digits[0] = c; /* DIG1 = hundreds */
digits[1] = c; /* DIG2 = tens */
digits[2] = c; /* DIG3 = ones */
digits[3] = 0x0Cu; /* DIG4 = "C" (unit letter, keep fixed) */
digits[4] = c; /* DIG5 = tenths */
display_set_raw(digits, DISP_TYPE_CELSIUS);
if (c < 10u) for (i = 1u; i <= 99u; i++) /* 0.1 .. 9.9 step 0.1 */
{ {
cli_printf(" %u\r\n", (unsigned)c); display_set((float)i * 0.1f, type, DISP_BASE_DECIMAL);
vTaskDelay(pdMS_TO_TICKS(100));
} }
else for (i = 10u; i <= 99u; i++) /* 10 .. 99 step 1 */
{ {
cli_printf(" %c\r\n", (char)('A' + (c - 10u))); display_set((float)i, type, DISP_BASE_DECIMAL);
vTaskDelay(pdMS_TO_TICKS(100));
} }
vTaskDelay(pdMS_TO_TICKS(500)); for (i = 100u; i <= 990u; i += 10u) /* 100 .. 990 step 10 */
{
display_set((float)i, type, DISP_BASE_DECIMAL);
vTaskDelay(pdMS_TO_TICKS(100));
}
display_set(999.0f, type, DISP_BASE_DECIMAL); /* 999.0 */
vTaskDelay(pdMS_TO_TICKS(300));
} }
display_set(0.0f, DISP_TYPE_CELSIUS, DISP_BASE_DECIMAL); display_set(0.0f, DISP_TYPE_CELSIUS, DISP_BASE_DECIMAL);
@ -910,7 +915,7 @@ static const CliCmd_t s_cmds[] = {
{"dispauto", "dispauto [on|off]: enable/disable auto display scan", CmdDispAuto}, {"dispauto", "dispauto [on|off]: enable/disable auto display scan", CmdDispAuto},
{"dispset", "dispset <pin1-7|all> [0|1|z]: drive display pin(s)", CmdDispSet}, {"dispset", "dispset <pin1-7|all> [0|1|z]: drive display pin(s)", CmdDispSet},
{"disptest", "disptest: run display self-test (digits/multi/max/degF)", CmdDispTest}, {"disptest", "disptest: run display self-test (digits/multi/max/degF)", CmdDispTest},
{"apptest", "apptest: show every displayable char (0-9, A-F)", CmdAppTest}, {"apptest", "apptest: sweep display 0.1-999.0 in C and F", CmdAppTest},
{"factory", "factory: restore params to defaults and reboot", CmdFactory}, {"factory", "factory: restore params to defaults and reboot", CmdFactory},
{"uartrst", "uartrst: re-init USART1 (460800 8N1), flush rx queue", CmdUartRst}, {"uartrst", "uartrst: re-init USART1 (460800 8N1), flush rx queue", CmdUartRst},
{"uartinfo", "uartinfo: show USART1 pins/baud/format", CmdUartInfo}, {"uartinfo", "uartinfo: show USART1 pins/baud/format", CmdUartInfo},

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,7 +1,7 @@
{ {
"file": "mothercup_ble_prod_ota.bin", "file": "mothercup_ble_prod_ota.bin",
"target_bank": 1, "target_bank": 1,
"size": 60032, "size": 60052,
"crc32": "0x5393B90B", "crc32": "0xCB612B01",
"version": 65575 "version": 65576
} }

View File

@ -1,7 +1,7 @@
{ {
"file": "mothercup_ble_prod_ota_app2.bin", "file": "mothercup_ble_prod_ota_app2.bin",
"target_bank": 2, "target_bank": 2,
"size": 60332, "size": 60352,
"crc32": "0x4CDEA62B", "crc32": "0x01AB370F",
"version": 65575 "version": 65576
} }