feature: Get sensor data reading working
This commit is contained in:
parent
ad3045fc29
commit
243d595a35
11 changed files with 413 additions and 147 deletions
|
@ -1 +1,23 @@
|
|||
package ardriver
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.terah.dev/UnrealXR/unrealxr/ardriver/commons"
|
||||
"git.terah.dev/UnrealXR/unrealxr/ardriver/xreal"
|
||||
)
|
||||
|
||||
func GetDevice() (commons.ARDevice, error) {
|
||||
if xreal.IsXrealEnabled {
|
||||
device, err := xreal.New()
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("failed to initialize xreal device: %w\n", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return device, nil
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("failed to initialize any device")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue