incyclist-devices 1.1.0 → 1.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/lib/CyclingMode.d.ts +72 -0
- package/lib/CyclingMode.js +66 -0
- package/lib/Device.d.ts +48 -10
- package/lib/Device.js +9 -8
- package/lib/DeviceProtocol.d.ts +40 -12
- package/lib/DeviceProtocol.js +16 -16
- package/lib/DeviceRegistry.d.ts +4 -4
- package/lib/DeviceRegistry.js +10 -10
- package/lib/DeviceSupport.d.ts +4 -3
- package/lib/DeviceSupport.js +32 -8
- package/lib/ant/AntAdapter.d.ts +11 -2
- package/lib/ant/AntAdapter.js +30 -1
- package/lib/ant/AntScanner.d.ts +17 -6
- package/lib/ant/AntScanner.js +406 -135
- package/lib/ant/antfe/AntFEAdapter.d.ts +12 -8
- package/lib/ant/antfe/AntFEAdapter.js +404 -182
- package/lib/ant/anthrm/AntHrmAdapter.d.ts +4 -2
- package/lib/ant/anthrm/AntHrmAdapter.js +72 -25
- package/lib/ant/utils.js +2 -1
- package/lib/calculations.d.ts +12 -13
- package/lib/calculations.js +88 -125
- package/lib/daum/DaumAdapter.d.ts +29 -6
- package/lib/daum/DaumAdapter.js +219 -96
- package/lib/daum/ERGCyclingMode.d.ts +28 -0
- package/lib/daum/ERGCyclingMode.js +207 -0
- package/lib/daum/PowerMeterCyclingMode.d.ts +18 -0
- package/lib/daum/PowerMeterCyclingMode.js +79 -0
- package/lib/daum/SmartTrainerCyclingMode.d.ts +41 -0
- package/lib/daum/SmartTrainerCyclingMode.js +344 -0
- package/lib/daum/classic/DaumClassicAdapter.d.ts +3 -1
- package/lib/daum/classic/DaumClassicAdapter.js +46 -32
- package/lib/daum/classic/DaumClassicCyclingMode.d.ts +13 -0
- package/lib/daum/classic/DaumClassicCyclingMode.js +98 -0
- package/lib/daum/classic/DaumClassicProtocol.d.ts +5 -3
- package/lib/daum/classic/DaumClassicProtocol.js +39 -6
- package/lib/daum/classic/ERGCyclingMode.d.ts +23 -0
- package/lib/daum/classic/ERGCyclingMode.js +171 -0
- package/lib/daum/classic/bike.d.ts +41 -37
- package/lib/daum/classic/bike.js +86 -53
- package/lib/daum/classic/utils.d.ts +3 -3
- package/lib/daum/classic/utils.js +16 -10
- package/lib/daum/indoorbike.d.ts +2 -1
- package/lib/daum/indoorbike.js +23 -21
- package/lib/daum/premium/DaumPremiumAdapter.d.ts +2 -2
- package/lib/daum/premium/DaumPremiumAdapter.js +30 -20
- package/lib/daum/premium/DaumPremiumProtocol.d.ts +11 -2
- package/lib/daum/premium/DaumPremiumProtocol.js +49 -8
- package/lib/daum/premium/bike.d.ts +63 -52
- package/lib/daum/premium/bike.js +258 -207
- package/lib/daum/premium/tcpserial.d.ts +18 -14
- package/lib/daum/premium/tcpserial.js +50 -20
- package/lib/daum/premium/utils.d.ts +2 -2
- package/lib/simulator/Simulator.d.ts +13 -7
- package/lib/simulator/Simulator.js +62 -21
- package/lib/utils.d.ts +3 -1
- package/lib/utils.js +39 -18
- package/package.json +12 -11
- package/lib/ant/AntScanner.unit.tests.d.ts +0 -1
- package/lib/ant/AntScanner.unit.tests.js +0 -25
- package/lib/ant/antfe/AntFEProcessor.d.ts +0 -40
- package/lib/ant/antfe/AntFEProcessor.js +0 -238
- package/lib/ant/antfe/AntHrmProtocol.d.ts +0 -9
- package/lib/ant/antfe/AntHrmProtocol.js +0 -30
- package/lib/ant/antfe/bike.d.ts +0 -47
- package/lib/ant/antfe/bike.js +0 -602
- package/lib/ant/anthrm/anthrm.d.ts +0 -33
- package/lib/ant/anthrm/anthrm.js +0 -523
- package/lib/simulator/Simulator.unit.tests.d.ts +0 -1
- package/lib/simulator/Simulator.unit.tests.js +0 -79
package/lib/ant/AntScanner.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventLogger } from "gd-eventlog";
|
|
2
|
-
import DeviceProtocol from "../DeviceProtocol";
|
|
2
|
+
import DeviceProtocolBase, { DeviceProtocol, DeviceSettings } from "../DeviceProtocol";
|
|
3
3
|
import AntAdapter from "./AntAdapter";
|
|
4
4
|
declare type ScanState = {
|
|
5
5
|
isScanning: boolean;
|
|
@@ -11,21 +11,28 @@ declare type AntAdapterInfo = {
|
|
|
11
11
|
name: string;
|
|
12
12
|
Adapter: any;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
interface AntDeviceSettings extends DeviceSettings {
|
|
15
|
+
deviceID: string;
|
|
16
|
+
profile: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class AntProtocol extends DeviceProtocolBase implements DeviceProtocol {
|
|
15
19
|
logger: EventLogger;
|
|
16
20
|
ant: any;
|
|
17
21
|
activeScans: Record<string, ScanState>;
|
|
18
22
|
profiles: Array<AntAdapterInfo>;
|
|
19
23
|
sensors: any;
|
|
20
24
|
sticks: Array<any>;
|
|
25
|
+
scanning: boolean;
|
|
21
26
|
constructor(antClass: any);
|
|
27
|
+
add(settings: AntDeviceSettings): any;
|
|
28
|
+
getAnt(): any;
|
|
22
29
|
getName(): string;
|
|
23
|
-
getInterfaces(): string
|
|
30
|
+
getInterfaces(): Array<string>;
|
|
24
31
|
isBike(): boolean;
|
|
25
32
|
isHrm(): boolean;
|
|
26
33
|
isPower(): boolean;
|
|
27
34
|
isScanning(): boolean;
|
|
28
|
-
getSupportedProfiles(): string
|
|
35
|
+
getSupportedProfiles(): Array<string>;
|
|
29
36
|
getUSBDeviceInfo(d: any): {
|
|
30
37
|
port: string;
|
|
31
38
|
vendor: any;
|
|
@@ -35,14 +42,18 @@ export declare class AntProtocol extends DeviceProtocol {
|
|
|
35
42
|
getStickInfo(sticks: any): any;
|
|
36
43
|
findStickByPort(port: any): any;
|
|
37
44
|
logStickInfo(): void;
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
getDetailedStickInfo(stick: any): void;
|
|
46
|
+
getStick(onStart: (stick: any) => void, onError: (reason: string) => void): Promise<any>;
|
|
47
|
+
getFirstStick(): Promise<any>;
|
|
40
48
|
closeStick(stick: any): Promise<unknown>;
|
|
41
49
|
stopScanOnStick(stickInfo: any): Promise<boolean>;
|
|
50
|
+
stillScanning(): boolean;
|
|
42
51
|
scanOnStick(stickInfo: any, props?: any): Promise<unknown>;
|
|
43
52
|
scan(props: any): Promise<void>;
|
|
44
53
|
stopScan(): Promise<boolean>;
|
|
54
|
+
waitForStickOpenedForSensor(): Promise<unknown>;
|
|
45
55
|
attachSensors(d: AntAdapter | Array<AntAdapter>, SensorClass: any, message: any): Promise<unknown>;
|
|
56
|
+
detachSensor(adapter: AntAdapter): Promise<unknown>;
|
|
46
57
|
closeSensor(device: any): Promise<void>;
|
|
47
58
|
}
|
|
48
59
|
export declare function AntScanner(antClass: any): any;
|