Send want_config_id on connect to trigger initial sync (#6)
CI / build + unit (push) Successful in 39s
CI / build + unit (push) Successful in 39s
Send want_config_id on connect to trigger initial sync (#6) Firmware only streams myInfo/channels/configComplete after receiving a ToRadio with want_config_id — the service previously wrote nothing on connect, so /api/channels stayed [] and myNodeNum null. v0.1.4.
This commit was merged in pull request #6.
This commit is contained in:
@@ -88,3 +88,13 @@ export async function buildTextToRadio(
|
||||
});
|
||||
return { bytes: frame(toBinary(P.Mesh.ToRadioSchema, toRadio)), id };
|
||||
}
|
||||
|
||||
export async function buildWantConfigToRadio(
|
||||
wantConfigId: number,
|
||||
): Promise<Uint8Array> {
|
||||
const P = await loadProto();
|
||||
const toRadio = create(P.Mesh.ToRadioSchema, {
|
||||
payloadVariant: { case: 'wantConfigId', value: wantConfigId },
|
||||
});
|
||||
return toBinary(P.Mesh.ToRadioSchema, toRadio);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user