fix(ui): boot string tone to Bank1 program 25

Keep the last rhythm across soft power cycles, and bump firmware to 0.2.42.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yuquanjun 2026-10-08 10:59:59 +08:00
parent be84c22479
commit 3f1c1c74ba
5 changed files with 13 additions and 18 deletions

View File

@ -16,7 +16,7 @@ GUI_SWITCH mGuiData[] = {
{ 0, 0, 11, GUI_TRANSPOSE}, // 0
{ 78, 40, 260, GUI_SPEED}, // 1
{ 0, 0, 1, GUI_MODE_PARAM}, // 2 ?? <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>࿪<EFBFBD><E0BFAA> 0=<3D><> 1=<3D><>
{ 0, 0, 4, GUI_TIMBRE_SELECT}, // 3
{ TIMBRE_BOOT_SLOT, 0, 4, GUI_TIMBRE_SELECT}, // 3 Bank1 的 25 号
{ 0, 0, 3, GUI_PLAY_SECTION}, // 4
{ 0, 0, 3, GUI_TAB_INDEX}, // 5
{ 0, 0, 1, GUI_AUTOBAND_SW}, // 6 ?? <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>࿪<EFBFBD><E0BFAA> 0=<3D><> 1=<3D><>
@ -111,7 +111,7 @@ int16_t MIC_VOL_MAP[11]= {-9000,-7000,-5000,-3000,-1000,1000,3000,5000,7000,9000
uint8_t TOUCH_AREA_NUM = (sizeof(Touch_Areas)/sizeof(Touch_AreaTypeDef));
const uint8_t Version[3] = {0,2,41}; /* major.minor.patch — 0.2.41: AutoBand Stop 时间轴前推 */
const uint8_t Version[3] = {0,2,42}; /* major.minor.patch — 0.2.42: 开机弦音色固定 Bank1/25 */
uint8_t Led = 8;
bool PressFlag = 0;
@ -236,15 +236,9 @@ void System_PowerOn(void)
/* 软关机不复位 MCU:清掉上次会话演奏状态,默认当前调一级大和弦(C 调=do mi sol) */
StartFlag = 0;
InModeFlag = false; /* 停在模式选择,禁止拨片/侧面键起奏 */
/* 节奏类型、弦音色不记忆:再次开机进入模式时用第一首、第一个音色 */
mGuiData[GUI_TIMBRE_SELECT].Current = 0;
ParamGuiData[SONG_MODE_PARAM].Current = 0;
mGuiData[GUI_AUTOBAND_SW].Current = 0;
{
NvmParam_Type *nvm = drv_nvm_param_ptr();
nvm->param.Timbre = 0;
nvm->param.Param1 = 0;
}
/* 弦音色不记忆。节奏类型留在 RAM/NVM,软开关机后仍是上次选择 */
mGuiData[GUI_TIMBRE_SELECT].Current = TIMBRE_BOOT_SLOT;
drv_nvm_param_ptr()->param.Timbre = TIMBRE_BOOT_SLOT;
Accomp_ApplyDefaultIChord();
app_tm1629_reset_key_state();
s_pwr_rails_cut = 0u;

View File

@ -200,7 +200,7 @@ void drv_nvm_load_default_calibration_static_value(NvmParam_Type * pData, uint8
if(reset_open_status)
{
pData->param.BPM = 100;
pData->param.Timbre = 0;
pData->param.Timbre = TIMBRE_BOOT_SLOT;
pData->param.BandVol = 7;
pData->param.StringVol = 7;
pData->param.MIcVol = 7;
@ -216,6 +216,8 @@ void drv_nvm_load_default_calibration_static_value(NvmParam_Type * pData, uint8
pData->param.UsbMode = NVM_USB_MIDI;
}
mGuiData[GUI_SPEED].Current = pData->param.BPM;
/* 弦音色不跨开关机记忆,冷启动也用 Bank1 的 25 号 */
pData->param.Timbre = TIMBRE_BOOT_SLOT;
mGuiData[GUI_TIMBRE_SELECT].Current = pData->param.Timbre;
mGuiData[GUI_TRANSPOSE].Current = pData->param.Transpose;
faders[0].val = pData->param.BandVol;
@ -233,9 +235,6 @@ void drv_nvm_load_default_calibration_static_value(NvmParam_Type * pData, uint8
pData->param.Language = NVM_LANG_CN;
if (pData->param.UsbMode > 1)
pData->param.UsbMode = NVM_USB_MIDI;
/* 节奏类型、弦音色不跨开关机记忆,冷启动也回到第一项 */
pData->param.Timbre = 0;
pData->param.Param1 = 0;
mGuiData_SystemSETTING[GUI_USB_MODE].Current = pData->param.UsbMode;
/* 开机/出厂:同步自动关机运行时秒表(手册 15/30/45/60/不自动) */
AutoCloseFlag = true;

View File

@ -49,6 +49,8 @@ extern const STRING_MIDI OrganMIDI_7[];
extern const STRING_MIDI *Chord_Midi_Table[7];
extern const STRING_MIDI *OrganChord_Midi_Table[7];
extern const uint8_t Timbre_index[5];
/* 开机不记忆:Bank1 Program 25(钢弦)= Timbre_index[1] */
#define TIMBRE_BOOT_SLOT 1u
/* 当前使用的 MIDI 音符 */
extern STRING_MIDI USE_MIDI;

View File

@ -194,7 +194,7 @@ def main():
raise SystemExit(
"USB row overflow: label ends %d, left arrow at %d" % (label_end, tril_x)
)
ver_w = text_w("0.2.41", glyphs)
ver_w = text_w("0.2.42", glyphs)
gh = glyphs["0"][0].size[1]
pill_h = gh + 8
pill_w = ver_w + 18
@ -377,7 +377,7 @@ def preview(pics, glyphs, back, back_xy, chev, chev_xy, tri_l, tl, tri_r, tr,
paste(canvas, tri_l, tl[0], row_y + (tl[1] - (CARD_Y0 + CARD_PITCH)))
paste(canvas, tri_r, tr[0], row_y + (tr[1] - (CARD_Y0 + CARD_PITCH)))
fill_round(canvas, CARD_X + pill_dx, CARD_Y0 + pill_dy, pill_w, pill_h, 6, (0, 8, 19))
ver = "0.2.41"
ver = "0.2.42"
tw = text_w(ver, glyphs)
gh = glyphs["0"][0].size[1]
draw_text(canvas, CARD_X + pill_dx + (pill_w - tw) // 2,

View File

@ -38,7 +38,7 @@ TONE_HDR = PROJ / "project" / "inc" / "ExtFlash_Tone_Addr.h"
IAP_DIR = REPO / "升级" / "MCU主控升级"
OUT_ROOT = REPO / "tools" / "out"
FW_VER = "0.2.41"
FW_VER = "0.2.42"
UI0902_RES_BASE = 0x00100000
BOOT_FLASH_ADDR = 0x08000000
APP_FLASH_ADDR = 0x08008000