信道长度

This commit is contained in:
wu58430 2024-01-10 23:02:29 +08:00
parent 367a162ffa
commit 50d8cdbf3b

View file

@ -693,7 +693,7 @@ void SETTINGS_SaveChannelName(uint8_t channel, const char * name)
{ {
uint16_t offset = channel * 16; uint16_t offset = channel * 16;
uint8_t buf[16] = {0}; uint8_t buf[16] = {0};
memcpy(buf, name, MIN(strlen(name), 10u)); memcpy(buf, name, MIN(strlen(name), MAX_EDIT_INDEX));
EEPROM_WriteBuffer(0x0F50 + offset, buf,8); EEPROM_WriteBuffer(0x0F50 + offset, buf,8);
EEPROM_WriteBuffer(0x0F58 + offset, buf + 8,8); EEPROM_WriteBuffer(0x0F58 + offset, buf + 8,8);
} }