disable v71 and br71

This commit is contained in:
Steven Dan
2026-05-20 08:47:31 +08:00
parent c0c966c6de
commit f5b61fba65
7 changed files with 97 additions and 37 deletions

View File

@@ -1 +1 @@
xflash bin/factory/phaten_module_factory.xe --loader loader.o --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 3 bin/br_uac2/phaten_module_br_uac2.xe --upgrade 4 ../app_usb_aud_fosi_c1_v71/bin/v71_uac2/phaten_module_v71_uac2.xe --upgrade 5 ../app_usb_aud_fosi_c1_v71/bin/v71_uac1/phaten_module_v71_uac1.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1 xflash bin/factory/phaten_module_factory.xe --loader loader.o --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1

View File

@@ -1 +1 @@
xflash --factory-version 15.3 --target-file src/core/xu316_qf60.xn --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 3 bin/br_uac2/phaten_module_br_uac2.xe --upgrade 4 ../app_usb_aud_fosi_c1_v71/bin/v71_uac2/phaten_module_v71_uac2.xe --upgrade 5 ../app_usb_aud_fosi_c1_v71/bin/v71_uac1/phaten_module_v71_uac1.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1 xflash --factory-version 15.3 --target-file src/core/xu316_qf60.xn --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1

View File

@@ -149,14 +149,34 @@ static unsigned c1_saved_dac_vol_is_valid(unsigned char v)
return 0; return 0;
} }
// 改动原因:灯索引与 c1_mode 同值;仅钳位非法 Flash 读数,合法值原样下发 tile1避免误映射 // 改动原因:产品停用 mode 2(BR)/3(V71);越界或 Flash 残留 2/3 归一到可用档2/3→4供上电与灯色共用
static inline unsigned c1_mode_to_tile_mode_led_code(unsigned mode_value) static inline unsigned c1_mode_sanitize(unsigned mode_value)
{ {
if (mode_value > C1_MODE_VALUE_MAX || mode_value < C1_MODE_VALUE_MIN) if (mode_value > C1_MODE_VALUE_MAX || mode_value < C1_MODE_VALUE_MIN)
return C1_MODE_VALUE_DEFAULT; return C1_MODE_VALUE_DEFAULT;
if (mode_value == 2 || mode_value == 3)
return 4;
return mode_value; return mode_value;
} }
// 改动原因mode 短按循环跳过 2、3仅 1→4→5→1与 switch_mode_by_c1_mode 可用档一致)。
static inline unsigned c1_mode_advance(unsigned mode_value)
{
switch (c1_mode_sanitize(mode_value))
{
case 1: return 4;
case 4: return 5;
case 5: return 1;
default: return C1_MODE_VALUE_DEFAULT;
}
}
// 改动原因:灯索引与 c1_mode 同值;经 sanitize 后再下发 tile1避免停用档或非法值亮错灯。
static inline unsigned c1_mode_to_tile_mode_led_code(unsigned mode_value)
{
return c1_mode_sanitize(mode_value);
}
void switch_mode_by_c1_mode(unsigned c1_mode, unsigned force_reboot) void switch_mode_by_c1_mode(unsigned c1_mode, unsigned force_reboot)
{ {
unsigned reboot_need = 0; unsigned reboot_need = 0;
@@ -537,10 +557,14 @@ void AudioHwRemote2(streaming chanend c, client interface i2c_master_if i2c, cli
firmware_upgrade_init(); firmware_upgrade_init();
#endif #endif
if (c1_mode > C1_MODE_VALUE_MAX || c1_mode < C1_MODE_VALUE_MIN) // 改动原因:上电归一 c1_mode含停用档 2/3→4与按键循环 1/4/5 一致并写回 Flash。
{ {
c1_mode = C1_MODE_VALUE_DEFAULT; unsigned c1_mode_corrected = c1_mode_sanitize(c1_mode);
save_value(C1_MODE_INFO_PATH, c1_mode); if (c1_mode_corrected != c1_mode)
{
c1_mode = c1_mode_corrected;
save_value(C1_MODE_INFO_PATH, c1_mode);
}
} }
@@ -921,14 +945,10 @@ void AudioHwRemote2(streaming chanend c, client interface i2c_master_if i2c, cli
{ {
if (pressed_count == 0) if (pressed_count == 0)
{ {
// 改动原因mode 短按在 c1_mode 1~5 间循环,灯索引与 mode 同值;持久化后切角色并 set_mode_led_color(c1_mode) 下发 tile1无重启路径必须调用否则灯不更新 // 改动原因mode 短按在 c1_mode 1/4/5 间循环(跳过停用档 2/3;持久化后切角色并 set_mode_led_color 下发 tile1
if ((mode_press_ticks >= C1_KEY_SHORT_TICKS) && (mode_press_ticks < C1_KEY_LONG_TICKS)) if ((mode_press_ticks >= C1_KEY_SHORT_TICKS) && (mode_press_ticks < C1_KEY_LONG_TICKS))
{ {
c1_mode ++; c1_mode = c1_mode_advance(c1_mode);
if (c1_mode > C1_MODE_VALUE_MAX)
{
c1_mode = C1_MODE_VALUE_MIN;
}
save_value(C1_MODE_INFO_PATH, c1_mode); save_value(C1_MODE_INFO_PATH, c1_mode);
switch_mode_by_c1_mode(c1_mode, 0); switch_mode_by_c1_mode(c1_mode, 0);

View File

@@ -1 +1 @@
xflash bin/factory/phaten_module_factory.xe --loader loader.o --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 3 bin/br_uac2/phaten_module_br_uac2.xe --upgrade 4 ../app_usb_aud_fosi_c1_v71/bin/v71_uac2/phaten_module_v71_uac2.xe --upgrade 5 ../app_usb_aud_fosi_c1_v71/bin/v71_uac1/phaten_module_v71_uac1.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1 xflash bin/factory/phaten_module_factory.xe --loader loader.o --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1

View File

@@ -1 +1 @@
xflash --factory-version 15.3 --target-file src/core/xu316_qf60.xn --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 3 bin/br_uac2/phaten_module_br_uac2.xe --upgrade 4 ../app_usb_aud_fosi_c1_v71/bin/v71_uac2/phaten_module_v71_uac2.xe --upgrade 5 ../app_usb_aud_fosi_c1_v71/bin/v71_uac1/phaten_module_v71_uac1.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1 xflash --factory-version 15.3 --target-file src/core/xu316_qf60.xn --upgrade 2 bin/fps_uac1/phaten_module_fps_uac1.xe --upgrade 1 bin/fps_uac2/phaten_module_fps_uac2.xe --upgrade 6 ../app_usb_aud_fosi_c1_lp/bin/bypass_uac2/phaten_module_bypass_uac2.xe -o %1

View File

@@ -149,14 +149,34 @@ static unsigned c1_saved_dac_vol_is_valid(unsigned char v)
return 0; return 0;
} }
// 改动原因:灯索引与 c1_mode 同值;仅钳位非法 Flash 读数,合法值原样下发 tile1避免误映射 // 改动原因:产品停用 mode 2(BR)/3(V71);越界或 Flash 残留 2/3 归一到可用档2/3→4供上电与灯色共用
static inline unsigned c1_mode_to_tile_mode_led_code(unsigned mode_value) static inline unsigned c1_mode_sanitize(unsigned mode_value)
{ {
if (mode_value > C1_MODE_VALUE_MAX || mode_value < C1_MODE_VALUE_MIN) if (mode_value > C1_MODE_VALUE_MAX || mode_value < C1_MODE_VALUE_MIN)
return C1_MODE_VALUE_DEFAULT; return C1_MODE_VALUE_DEFAULT;
if (mode_value == 2 || mode_value == 3)
return 4;
return mode_value; return mode_value;
} }
// 改动原因mode 短按循环跳过 2、3仅 1→4→5→1与 switch_mode_by_c1_mode 可用档一致)。
static inline unsigned c1_mode_advance(unsigned mode_value)
{
switch (c1_mode_sanitize(mode_value))
{
case 1: return 4;
case 4: return 5;
case 5: return 1;
default: return C1_MODE_VALUE_DEFAULT;
}
}
// 改动原因:灯索引与 c1_mode 同值;经 sanitize 后再下发 tile1避免停用档或非法值亮错灯。
static inline unsigned c1_mode_to_tile_mode_led_code(unsigned mode_value)
{
return c1_mode_sanitize(mode_value);
}
void switch_mode_by_c1_mode(unsigned c1_mode, unsigned force_reboot) void switch_mode_by_c1_mode(unsigned c1_mode, unsigned force_reboot)
{ {
unsigned reboot_need = 0; unsigned reboot_need = 0;
@@ -537,10 +557,14 @@ void AudioHwRemote2(streaming chanend c, client interface i2c_master_if i2c, cli
firmware_upgrade_init(); firmware_upgrade_init();
#endif #endif
if (c1_mode > C1_MODE_VALUE_MAX || c1_mode < C1_MODE_VALUE_MIN) // 改动原因:上电归一 c1_mode含停用档 2/3→4与按键循环 1/4/5 一致并写回 Flash。
{ {
c1_mode = C1_MODE_VALUE_DEFAULT; unsigned c1_mode_corrected = c1_mode_sanitize(c1_mode);
save_value(C1_MODE_INFO_PATH, c1_mode); if (c1_mode_corrected != c1_mode)
{
c1_mode = c1_mode_corrected;
save_value(C1_MODE_INFO_PATH, c1_mode);
}
} }
@@ -921,14 +945,10 @@ void AudioHwRemote2(streaming chanend c, client interface i2c_master_if i2c, cli
{ {
if (pressed_count == 0) if (pressed_count == 0)
{ {
// 改动原因mode 短按在 c1_mode 1~5 间循环,灯索引与 mode 同值;持久化后切角色并 set_mode_led_color(c1_mode) 下发 tile1无重启路径必须调用否则灯不更新 // 改动原因mode 短按在 c1_mode 1/4/5 间循环(跳过停用档 2/3;持久化后切角色并 set_mode_led_color 下发 tile1
if ((mode_press_ticks >= C1_KEY_SHORT_TICKS) && (mode_press_ticks < C1_KEY_LONG_TICKS)) if ((mode_press_ticks >= C1_KEY_SHORT_TICKS) && (mode_press_ticks < C1_KEY_LONG_TICKS))
{ {
c1_mode ++; c1_mode = c1_mode_advance(c1_mode);
if (c1_mode > C1_MODE_VALUE_MAX)
{
c1_mode = C1_MODE_VALUE_MIN;
}
save_value(C1_MODE_INFO_PATH, c1_mode); save_value(C1_MODE_INFO_PATH, c1_mode);
switch_mode_by_c1_mode(c1_mode, 0); switch_mode_by_c1_mode(c1_mode, 0);

View File

@@ -165,14 +165,34 @@ static unsigned c1_saved_dac_vol_is_valid(unsigned char v)
return 0; return 0;
} }
// 改动原因:灯索引与 c1_mode 同值;仅钳位非法 Flash 读数,合法值原样下发 tile1避免误映射 // 改动原因:产品停用 mode 2(BR)/3(V71);越界或 Flash 残留 2/3 归一到可用档2/3→4供上电与灯色共用
static inline unsigned c1_mode_to_tile_mode_led_code(unsigned mode_value) static inline unsigned c1_mode_sanitize(unsigned mode_value)
{ {
if (mode_value > C1_MODE_VALUE_MAX || mode_value < C1_MODE_VALUE_MIN) if (mode_value > C1_MODE_VALUE_MAX || mode_value < C1_MODE_VALUE_MIN)
return C1_MODE_VALUE_DEFAULT; return C1_MODE_VALUE_DEFAULT;
if (mode_value == 2 || mode_value == 3)
return 4;
return mode_value; return mode_value;
} }
// 改动原因mode 短按循环跳过 2、3仅 1→4→5→1与 switch_mode_by_c1_mode 可用档一致)。
static inline unsigned c1_mode_advance(unsigned mode_value)
{
switch (c1_mode_sanitize(mode_value))
{
case 1: return 4;
case 4: return 5;
case 5: return 1;
default: return C1_MODE_VALUE_DEFAULT;
}
}
// 改动原因:灯索引与 c1_mode 同值;经 sanitize 后再下发 tile1避免停用档或非法值亮错灯。
static inline unsigned c1_mode_to_tile_mode_led_code(unsigned mode_value)
{
return c1_mode_sanitize(mode_value);
}
void switch_mode_by_c1_mode(unsigned c1_mode, unsigned force_reboot) void switch_mode_by_c1_mode(unsigned c1_mode, unsigned force_reboot)
{ {
unsigned reboot_need = 0; unsigned reboot_need = 0;
@@ -556,10 +576,14 @@ void AudioHwRemote2(streaming chanend c, client interface i2c_master_if i2c, cli
firmware_upgrade_init(); firmware_upgrade_init();
#endif #endif
if (c1_mode > C1_MODE_VALUE_MAX || c1_mode < C1_MODE_VALUE_MIN) // 改动原因:上电归一 c1_mode含停用档 2/3→4与按键循环 1/4/5 一致并写回 Flash。
{ {
c1_mode = C1_MODE_VALUE_DEFAULT; unsigned c1_mode_corrected = c1_mode_sanitize(c1_mode);
save_value(C1_MODE_INFO_PATH, c1_mode); if (c1_mode_corrected != c1_mode)
{
c1_mode = c1_mode_corrected;
save_value(C1_MODE_INFO_PATH, c1_mode);
}
} }
@@ -940,14 +964,10 @@ void AudioHwRemote2(streaming chanend c, client interface i2c_master_if i2c, cli
{ {
if (pressed_count == 0) if (pressed_count == 0)
{ {
// 改动原因mode 短按在 c1_mode 1~5 间循环,灯索引与 mode 同值;持久化后切角色并 set_mode_led_color(c1_mode) 下发 tile1无重启路径必须调用否则灯不更新 // 改动原因mode 短按在 c1_mode 1/4/5 间循环(跳过停用档 2/3;持久化后切角色并 set_mode_led_color 下发 tile1
if ((mode_press_ticks >= C1_KEY_SHORT_TICKS) && (mode_press_ticks < C1_KEY_LONG_TICKS)) if ((mode_press_ticks >= C1_KEY_SHORT_TICKS) && (mode_press_ticks < C1_KEY_LONG_TICKS))
{ {
c1_mode ++; c1_mode = c1_mode_advance(c1_mode);
if (c1_mode > C1_MODE_VALUE_MAX)
{
c1_mode = C1_MODE_VALUE_MIN;
}
save_value(C1_MODE_INFO_PATH, c1_mode); save_value(C1_MODE_INFO_PATH, c1_mode);
switch_mode_by_c1_mode(c1_mode, 0); switch_mode_by_c1_mode(c1_mode, 0);