Download examples/bluetooth/react-native/src/otaFlowAdmission.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 681 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/examples/bluetooth/react-native/src/otaFlowAdmission.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/examples/bluetooth/react-native/src/otaFlowAdmission.ts
-
curl -L -o otaFlowAdmission.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/examples/bluetooth/react-native/src/otaFlowAdmission.ts
681 Bytes
| export type OtaFlowAdmission = 'done' | 'idle' | 'open' | 'wait_for_wifi'; | |
| export function otaFlowAdmission({ | |
| completedConnectionGeneration, | |
| connectionGeneration, | |
| waitingForWifi, | |
| }: { | |
| completedConnectionGeneration: number | null; | |
| connectionGeneration: number | null; | |
| waitingForWifi: boolean; | |
| }): OtaFlowAdmission { | |
| // Setup is a user-controlled detour: an existing connection (or a reconnect) | |
| // must not dismiss it before the user has finished changing networks. | |
| if (waitingForWifi) return 'wait_for_wifi'; | |
| if (connectionGeneration === null) return 'idle'; | |
| return completedConnectionGeneration === connectionGeneration ? 'done' : 'open'; | |
| } | |