indented to standard from script
This commit is contained in:
@@ -60,22 +60,17 @@ bool bacnet_name_save(
|
||||
char *str,
|
||||
uint8_t length)
|
||||
{
|
||||
uint8_t buffer[NV_EEPROM_NAME_SIZE] = {0};
|
||||
uint8_t buffer[NV_EEPROM_NAME_SIZE] = { 0 };
|
||||
uint8_t i = 0;
|
||||
|
||||
if (bacnet_name_isvalid(encoding, length, str)) {
|
||||
eeprom_bytes_write(
|
||||
NV_EEPROM_NAME_LENGTH(offset),
|
||||
&length, 1);
|
||||
eeprom_bytes_write(
|
||||
NV_EEPROM_NAME_ENCODING(offset),
|
||||
(uint8_t *)&encoding, 1);
|
||||
eeprom_bytes_write(NV_EEPROM_NAME_LENGTH(offset), &length, 1);
|
||||
eeprom_bytes_write(NV_EEPROM_NAME_ENCODING(offset),
|
||||
(uint8_t *) & encoding, 1);
|
||||
for (i = 0; i < length; i++) {
|
||||
buffer[i] = str[i];
|
||||
}
|
||||
eeprom_bytes_write(
|
||||
NV_EEPROM_NAME_STRING(offset),
|
||||
&buffer[0],
|
||||
eeprom_bytes_write(NV_EEPROM_NAME_STRING(offset), &buffer[0],
|
||||
NV_EEPROM_NAME_SIZE);
|
||||
return true;
|
||||
}
|
||||
@@ -118,8 +113,8 @@ bool bacnet_name_write_unique(
|
||||
} else if (length <= NV_EEPROM_NAME_SIZE) {
|
||||
encoding = characterstring_encoding(char_string);
|
||||
if (encoding < MAX_CHARACTER_STRING_ENCODING) {
|
||||
if (Device_Valid_Object_Name(char_string,
|
||||
&duplicate_type, &duplicate_instance)) {
|
||||
if (Device_Valid_Object_Name(char_string, &duplicate_type,
|
||||
&duplicate_instance)) {
|
||||
if ((duplicate_type == object_type) &&
|
||||
(duplicate_instance == object_instance)) {
|
||||
/* writing same name to same object */
|
||||
@@ -185,8 +180,8 @@ void bacnet_name_init(
|
||||
uint16_t offset,
|
||||
char *default_string)
|
||||
{
|
||||
(void)bacnet_name_save(offset, CHARACTER_UTF8,
|
||||
default_string, strlen(default_string));
|
||||
(void) bacnet_name_save(offset, CHARACTER_UTF8, default_string,
|
||||
strlen(default_string));
|
||||
}
|
||||
|
||||
void bacnet_name(
|
||||
|
||||
Reference in New Issue
Block a user