mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-22 13:08:06 +00:00
fix ls_sleeps communication to device clients
This commit is contained in:
parent
12a7934ca1
commit
d014ae0bff
@ -24,6 +24,12 @@ void AdminPlugin::handleGetRadio(const MeshPacket &req)
|
|||||||
// We create the reply here
|
// We create the reply here
|
||||||
AdminMessage r = AdminMessage_init_default;
|
AdminMessage r = AdminMessage_init_default;
|
||||||
r.get_radio_response = devicestate.radio;
|
r.get_radio_response = devicestate.radio;
|
||||||
|
|
||||||
|
// NOTE: The phone app needs to know the ls_secs value so it can properly expect sleep behavior.
|
||||||
|
// So even if we internally use 0 to represent 'use default' we still need to send the value we are
|
||||||
|
// using to the app (so that even old phone apps work with new device loads).
|
||||||
|
r.get_radio_response.preferences.ls_secs = getPref_ls_secs();
|
||||||
|
|
||||||
r.which_variant = AdminMessage_get_radio_response_tag;
|
r.which_variant = AdminMessage_get_radio_response_tag;
|
||||||
reply = allocDataProtobuf(r);
|
reply = allocDataProtobuf(r);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user