feat: implement Haptika PPG and Watch V1

This commit is contained in:
Sacha
2026-07-31 16:19:42 +02:00
parent 6b7d4e0728
commit b9930b7378
249 changed files with 46475 additions and 122 deletions
@@ -0,0 +1,56 @@
///
/// FingerContactState.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///
/**
* Represents the JS union `FingerContactState`, backed by a C++ enum.
*/
public typealias FingerContactState = margelo.nitro.haptika.ppg.FingerContactState
public extension FingerContactState {
/**
* Get a FingerContactState for the given String value, or
* return `nil` if the given value was invalid/unknown.
*/
init?(fromString string: String) {
switch string {
case "absent":
self = .absent
case "adjusting":
self = .adjusting
case "valid":
self = .valid
case "tooMuchPressure":
self = .toomuchpressure
case "overexposed":
self = .overexposed
case "unstable":
self = .unstable
default:
return nil
}
}
/**
* Get the String value this FingerContactState represents.
*/
var stringValue: String {
switch self {
case .absent:
return "absent"
case .adjusting:
return "adjusting"
case .valid:
return "valid"
case .toomuchpressure:
return "tooMuchPressure"
case .overexposed:
return "overexposed"
case .unstable:
return "unstable"
}
}
}