fix ls_sleeps communication to device clients

1.2-legacy
Kevin Hester 2021-03-07 09:51:17 +08:00
rodzic 12a7934ca1
commit d014ae0bff
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -24,6 +24,12 @@ void AdminPlugin::handleGetRadio(const MeshPacket &req)
// We create the reply here
AdminMessage r = AdminMessage_init_default;
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;
reply = allocDataProtobuf(r);
}