Download mobile/modules/engine/src/stores/core.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 894 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/stores/core.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/modules/engine/src/stores/core.ts
-
curl -L -o core.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/stores/core.ts
894 Bytes
| import {create} from "zustand" | |
| import {subscribeWithSelector} from "zustand/middleware" | |
| import type {PublicBluetoothStatus} from "@mentra/bluetooth-sdk" | |
| export interface CoreState extends PublicBluetoothStatus { | |
| setCoreInfo: (info: Partial<PublicBluetoothStatus>) => void | |
| reset: () => void | |
| } | |
| const initialState: PublicBluetoothStatus = { | |
| // state: | |
| searching: false, | |
| searchingController: false, | |
| micRanking: ["glasses", "phone", "bluetooth", "bluetoothClassic"], | |
| systemMicUnavailable: false, | |
| currentMic: null, | |
| searchResults: [], | |
| wifiScanResults: [], | |
| lastLog: [], | |
| otherBtConnected: false, | |
| galleryModeEnabled: true, | |
| } | |
| export const useCoreStore = create<CoreState>()( | |
| subscribeWithSelector((set) => ({ | |
| ...initialState, | |
| setCoreInfo: (info) => set((state) => ({...state, ...info})), | |
| reset: () => set(initialState), | |
| })), | |
| ) | |