samples: mgmt: hawkbit: don't overwrite settings

Don't overwrite the server address and port
with the Kconfig default, when the hawkBit
shell is activated. The shell can also be used
to set it and we don't want to overwrite that
value on reboot.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2025-05-05 13:56:35 +02:00 committed by Benjamin Cabé
commit bb61d6ac78

View file

@ -107,7 +107,7 @@ int main(void)
LOG_ERR("Failed to init hawkBit");
}
#ifdef CONFIG_HAWKBIT_SET_SETTINGS_RUNTIME
#if defined(CONFIG_HAWKBIT_SET_SETTINGS_RUNTIME) && !defined(CONFIG_HAWKBIT_SHELL)
hawkbit_set_server_addr(CONFIG_HAWKBIT_SERVER);
hawkbit_set_server_port(CONFIG_HAWKBIT_PORT);
#endif