File tree Expand file tree Collapse file tree 3 files changed +73
-6
lines changed Expand file tree Collapse file tree 3 files changed +73
-6
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,33 @@ import path from 'path';
3
3
4
4
export interface NodeTeslaUsbConfig {
5
5
archive : {
6
- rcloneConfig : String ,
7
- destinationPath : String
6
+ rcloneConfig : string ,
7
+ destinationPath : string
8
8
} ,
9
9
paths : {
10
- sentryClips : String ,
11
- savedClips : String ,
10
+ sentryClips : string ,
11
+ savedClips : string ,
12
12
} ,
13
- delayBetweenCopyRetryInSeconds : Number ,
14
- mainLoopIntervalInSeconds : Number ,
13
+ delayBetweenCopyRetryInSeconds : number ,
14
+ mainLoopIntervalInSeconds : number ,
15
+ autoUpdate : { // add to default config
16
+ enabled : boolean ,
17
+ checkInterval : number
18
+ } ,
19
+ wireless : { // add to default config
20
+ hotspot : {
21
+ enabled : boolean ,
22
+ ssid : string ,
23
+ password : string ,
24
+ } ,
25
+ networks : {
26
+ ssid : string ,
27
+ password : string ,
28
+ priority : number ,
29
+ hidden : boolean //todo: add functionality to handle hidden networks
30
+ } [ ] ,
31
+ refreshInterval : number
32
+ }
15
33
}
16
34
17
35
export const readConfigFile = async ( filePath : string ) : Promise < NodeTeslaUsbConfig > => {
Original file line number Diff line number Diff line change
1
+ export const checkForUpdate = async ( interval : number ) : Promise < boolean > => {
2
+ return false
3
+ }
4
+
5
+ export const installUpdate = async ( ) : Promise < boolean > => {
6
+ return false
7
+ }
Original file line number Diff line number Diff line change
1
+ interface WirelessNetwork { // some default values, to be refined
2
+ ssid : string
3
+ bssid : string
4
+ channel : number
5
+ frequency : number
6
+ signalLevel : number
7
+ security : string
8
+ securityFlags : string
9
+ }
10
+
11
+ /*
12
+ // Behaviour:
13
+ 2) scan wifi networks every wireless.refreshInterval minutes
14
+ 3) if a network is found in wireless.networks networks, connect to it based upon priority
15
+ 4) if no networks are found, enable hotspot mode as per wireless.networks.hotspot
16
+ 5) every wireless.refreshInterval, if no clients are connected to the hotspot, go to step 2
17
+ */
18
+
19
+
20
+ export const scanWirelessNetworks = async ( ) : Promise < WirelessNetwork [ ] > => {
21
+ return [ ]
22
+ }
23
+
24
+ export const connectToWirelessNetwork = async ( ssid : string , password : string ) : Promise < boolean > => {
25
+ return false
26
+ }
27
+
28
+ export const disconnectFromWirelessNetwork = async ( ) : Promise < boolean > => {
29
+ return false
30
+ }
31
+
32
+ export const getWirelessHotspotStatus = async ( ) : Promise < boolean > => {
33
+ return false
34
+ }
35
+
36
+ export const enableWirelessHotspot = async ( ssid : string , password : string ) : Promise < boolean > => {
37
+ return false
38
+ }
39
+
40
+ export const disableWirelessHotspot = async ( ) : Promise < boolean > => {
41
+ return false
42
+ }
You can’t perform that action at this time.
0 commit comments