Welcome back @mykhalych90
Depends on the code that you used as a base, but usually I have a function called save_settings()
that writes this structure into the flash.
Welcome back @mykhalych90
Depends on the code that you used as a base, but usually I have a function called save_settings()
that writes this structure into the flash.
Yes, but how to how to pass my variable value to g_lorawan_settings?
For example, I have var relay_1 (it will it will change by downling command), and I need firstly add it to the g_lorawan_settings struct? and then apply by save_settings()? right? or Iām wrong?))
you can use
// Set the value
g_lorawan_settings.relay_1 = 0;
save_settings();
// Read the value
if (g_lorawan_settings.relay_1 == 1)
{
// Do something
}
to set the value and then save it to the flash or the read the value.