mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-07 20:33:28 +00:00
将繁体字转换为简体字写入手台
This commit is contained in:
parent
b15a0bec85
commit
d53caaf6ae
1 changed files with 2 additions and 1 deletions
|
@ -88,6 +88,7 @@
|
|||
import { eeprom_read, uint8ArrayToHexReverseString, uint8ArrayToString, hexReverseStringToUint8Array, stringToUint8Array, eeprom_write, eeprom_reboot, eeprom_init } from '@/utils/serial.js';
|
||||
import { useAppStore } from '@/store';
|
||||
import { MoveIcon } from 'tdesign-icons-vue-next';
|
||||
import { toTraditional } from 'chinese-simple2traditional';
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
|
@ -605,7 +606,7 @@
|
|||
rawEEPROM2.set([(scanlist << 4) + 0], i / 0x10)
|
||||
|
||||
const mergedArray = new Uint8Array(0x10);
|
||||
mergedArray.set(stringToUint8Array(_channel.name ?? "", appStore.configuration?.charset).subarray(0, 0x10), 0);
|
||||
mergedArray.set(stringToUint8Array(_channel.name ? toTraditional(_channel.name) : "", appStore.configuration?.charset).subarray(0, 0x10), 0);
|
||||
rawEEPROM3.set(mergedArray, i)
|
||||
}else{
|
||||
rawEEPROM.set(hexReverseStringToUint8Array("ffffffffffffffffffffffffffffffff"), i)
|
||||
|
|
Loading…
Reference in a new issue