├── analysis_options.yaml
├── examples
├── raw_viewer
│ ├── ios
│ │ ├── Flutter
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── AppFrameworkInfo.plist
│ │ ├── Runner
│ │ │ ├── Runner-Bridging-Header.h
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── LaunchImage.imageset
│ │ │ │ │ ├── LaunchImage.png
│ │ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ │ ├── README.md
│ │ │ │ │ └── Contents.json
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ ├── Main.storyboard
│ │ │ │ └── LaunchScreen.storyboard
│ │ │ └── Info.plist
│ │ ├── Runner.xcodeproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ │ └── Runner.xcscheme
│ │ │ └── project.pbxproj
│ │ ├── Runner.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── RunnerTests
│ │ │ └── RunnerTests.swift
│ │ └── .gitignore
│ ├── docs
│ │ └── raw_viewer.jpg
│ ├── android
│ │ ├── gradle.properties
│ │ ├── app
│ │ │ ├── src
│ │ │ │ ├── main
│ │ │ │ │ ├── res
│ │ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── drawable
│ │ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ │ ├── drawable-v21
│ │ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ │ ├── values
│ │ │ │ │ │ │ └── styles.xml
│ │ │ │ │ │ └── values-night
│ │ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── kotlin
│ │ │ │ │ │ └── com
│ │ │ │ │ │ │ └── example
│ │ │ │ │ │ │ └── colmi_r0x_controller
│ │ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── debug
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ └── profile
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ └── build.gradle
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ └── settings.gradle
│ ├── pubspec.yaml
│ ├── .gitignore
│ ├── README.md
│ ├── pubspec.lock
│ └── lib
│ │ └── main.dart
└── sample_ui
│ ├── ios
│ ├── Flutter
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── AppFrameworkInfo.plist
│ ├── Runner
│ │ ├── Runner-Bridging-Header.h
│ │ ├── Assets.xcassets
│ │ │ ├── LaunchImage.imageset
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ ├── README.md
│ │ │ │ └── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ │ └── Info.plist
│ ├── Runner.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── xcshareddata
│ │ │ └── xcschemes
│ │ │ │ └── Runner.xcscheme
│ │ └── project.pbxproj
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── RunnerTests
│ │ └── RunnerTests.swift
│ └── .gitignore
│ ├── docs
│ └── sample_ui.jpg
│ ├── android
│ ├── gradle.properties
│ ├── app
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── drawable-v21
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── values
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── values-night
│ │ │ │ │ │ └── styles.xml
│ │ │ │ ├── kotlin
│ │ │ │ │ └── com
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── colmi_r0x_controller
│ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── .gitignore
│ ├── build.gradle
│ └── settings.gradle
│ ├── pubspec.yaml
│ ├── .gitignore
│ ├── README.md
│ ├── lib
│ └── main.dart
│ └── pubspec.lock
├── pubspec.yaml
├── .gitignore
├── .metadata
├── LICENSE.md
├── README.md
├── lib
├── colmi_ring.dart
└── colmi_r0x_controller.dart
└── pubspec.lock
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/examples/sample_ui/docs/sample_ui.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/docs/sample_ui.jpg
--------------------------------------------------------------------------------
/examples/raw_viewer/docs/raw_viewer.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/docs/raw_viewer.jpg
--------------------------------------------------------------------------------
/examples/raw_viewer/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/kotlin/com/example/colmi_r0x_controller/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.colmi_r0x_controller
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/kotlin/com/example/colmi_r0x_controller/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.colmi_r0x_controller
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CitizenOneX/colmi_r0x_controller/HEAD/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/examples/raw_viewer/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: colmi_r0x_controller
2 | description: "COLMi R0x Controller Demo"
3 | publish_to: 'none'
4 | version: 0.1.0
5 |
6 | environment:
7 | sdk: '>=3.4.3 <4.0.0'
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | flutter_blue_plus: ^1.32.8
13 |
14 | dev_dependencies:
15 | flutter_test:
16 | sdk: flutter
17 | flutter_lints: ^3.0.0
18 |
19 | flutter:
20 | uses-material-design: true
21 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/examples/sample_ui/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: colmi_r0x_controller_sample_ui
2 | description: "COLMi R0x Controller Sample UI Demo"
3 | publish_to: 'none'
4 | version: 0.1.0
5 |
6 | environment:
7 | sdk: '>=3.4.3 <4.0.0'
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | colmi_r0x_controller:
13 | path: ../../
14 | flutter_blue_plus: ^1.32.8
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 | flutter_lints: ^3.0.0
20 |
21 | flutter:
22 | uses-material-design: true
23 |
--------------------------------------------------------------------------------
/examples/raw_viewer/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: colmi_r0x_controller_raw_viewer
2 | description: "COLMi R0x Controller Raw Viewer Demo"
3 | publish_to: 'none'
4 | version: 0.1.0
5 |
6 | environment:
7 | sdk: '>=3.4.3 <4.0.0'
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | colmi_r0x_controller:
13 | path: ../../
14 | flutter_blue_plus: ^1.32.8
15 | oscilloscope: ^0.2.0+1
16 |
17 | dev_dependencies:
18 | flutter_test:
19 | sdk: flutter
20 | flutter_lints: ^3.0.0
21 |
22 | flutter:
23 | uses-material-design: true
24 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "7.3.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "7.3.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/examples/raw_viewer/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/examples/sample_ui/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/raw_viewer/README.md:
--------------------------------------------------------------------------------
1 | # colmi_r0x_controller_raw_viewer
2 |
3 | ### COLMi R0x Controller Raw Viewer Demo
4 |
5 | (Built for Android and iOS but only Android has been tested.)
6 |
7 | ### Screenshot
8 | 
9 |
10 | ### Controller Interaction Model:
11 | - Wave gesture to wake
12 | - Perform a full rotation Scroll Up to confirm Wakeup (or flip the ring around if it's scrolling down)
13 | - Once confirmed, ring is in the User Input state and should recognise Scroll Up, Scroll Down and (tap to) Select
14 | - (Taps can be missed when accelerometer is only sampled every 250ms, so tap hard and tap often. 30ms sampling should be happening on Android.)
15 | - Perform a full rotation Scroll Up to confirm the Select command
16 | - If confirmation rotation for Wakeup or Select is too slow, it times out back to Idle or User Input states respectively
17 | - Down scrolling while in the Verify Wakeup or Verify Selction state cancels the verification back to Idle and User Input states respectively.
18 |
19 | ### Raw Viewer:
20 | - Automatically attempts to find and connect to Colmi R0x (R02-R06) ring
21 | - Shows live accelerometer readings from the ring on oscilloscope displays (during verification, user input)
22 |
--------------------------------------------------------------------------------
/examples/sample_ui/README.md:
--------------------------------------------------------------------------------
1 | # colmi_r0x_controller_sample_ui
2 |
3 | ### COLMi R0x Controller Sample UI Demo
4 |
5 | (Built for Android and iOS but only Android has been tested.)
6 |
7 | ### Screenshot
8 | 
9 |
10 | ### Controller Interaction Model:
11 | - Wave gesture to wake
12 | - Perform a full rotation Scroll Up to confirm Wakeup (or flip the ring around if it's scrolling down)
13 | - Once confirmed, ring is in the User Input state and should recognise Scroll Up, Scroll Down and (tap to) Select
14 | - (Taps can be missed when accelerometer is only sampled every 250ms, so tap hard and tap often. 30ms sampling should be happening on Android.)
15 | - Perform a full rotation Scroll Up to confirm the Select command
16 | - If confirmation rotation for Wakeup or Select is too slow, it times out back to Idle or User Input states respectively
17 | - Down scrolling while in the Verify Wakeup or Verify Selction state cancels the verification back to Idle and User Input states respectively.
18 |
19 | ### Sample UI:
20 | - Automatically attempts to find and connect to Colmi R0x (R02-R06) ring
21 | - Navigates through sample menu items based on Wake, Scroll, Select/Deselect (with verification on Wake and Select)
22 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
17 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
18 | - platform: android
19 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
20 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
21 | - platform: ios
22 | create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
23 | base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2024, CitizenOneX
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice, this
9 | list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright notice,
12 | this list of conditions and the following disclaimer in the documentation
13 | and/or other materials provided with the distribution.
14 |
15 | 3. Neither the name of the copyright holder nor the names of its
16 | contributors may be used to endorse or promote products derived from
17 | this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # colmi_r0x_controller
2 |
3 | COLMi R02-R06 (BlueX RF03 SoC) Ring-as-Controller
4 |
5 | _(Please note that some R02 rings may contain other SoCs and firmware and will not be compatible.)_
6 | - Scroll and Tap to select
7 | - Uses Flutter Blue Plus for Bluetooth LE connectivity
8 | - Built for Android and iOS but only tested on Android
9 | - Scroll position is surprisingly reliable, false positive and false negative taps are trickier and require more experimentation
10 |
11 | ### Example apps
12 | 
13 | 
14 |
15 | ### Demo videos
16 | [](https://www.youtube.com/watch?v=UPLIEYr89r4)
17 | [](https://www.youtube.com/watch?v=szf1kqJI-5I)
18 |
19 | ### Controller Interaction Model:
20 | - Wave gesture to wake
21 | - Perform a full rotation Scroll Up to confirm Wakeup (or flip the ring around if it's scrolling down)
22 | - Once confirmed, ring is in the User Input state and should recognise Scroll Up, Scroll Down and (tap to) Select
23 | - (Taps can be missed when accelerometer is only sampled every 250ms, so tap hard and tap often. 30ms sampling should be happening on Android.)
24 | - Perform a full rotation Scroll Up to confirm the Select command
25 | - If confirmation rotation for Wakeup or Select is too slow, it times out back to Idle or User Input states respectively
26 | - Down scrolling while in the Verify Wakeup or Verify Selction state cancels the verification back to Idle and User Input states respectively.
27 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Colmi R0x Controller
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | colmi_r0x_controller
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 | NSBluetoothAlwaysUsageDescription
49 | This app needs Bluetooth to function
50 |
51 |
52 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Colmi R0x Controller
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | colmi_r0x_controller
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 | NSBluetoothAlwaysUsageDescription
49 | This app needs Bluetooth to function
50 |
51 |
52 |
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | def localProperties = new Properties()
9 | def localPropertiesFile = rootProject.file("local.properties")
10 | if (localPropertiesFile.exists()) {
11 | localPropertiesFile.withReader("UTF-8") { reader ->
12 | localProperties.load(reader)
13 | }
14 | }
15 |
16 | def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
17 | if (flutterVersionCode == null) {
18 | flutterVersionCode = "1"
19 | }
20 |
21 | def flutterVersionName = localProperties.getProperty("flutter.versionName")
22 | if (flutterVersionName == null) {
23 | flutterVersionName = "1.0"
24 | }
25 |
26 | android {
27 | namespace = "com.example.colmi_r0x_controller"
28 | compileSdk = flutter.compileSdkVersion
29 | ndkVersion = flutter.ndkVersion
30 |
31 | compileOptions {
32 | sourceCompatibility = JavaVersion.VERSION_1_8
33 | targetCompatibility = JavaVersion.VERSION_1_8
34 | }
35 |
36 | defaultConfig {
37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38 | applicationId = "com.example.colmi_r0x_controller"
39 | // You can update the following values to match your application needs.
40 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
41 | minSdk = 21 // flutter_blue_plus
42 | targetSdk = flutter.targetSdkVersion
43 | versionCode = flutterVersionCode.toInteger()
44 | versionName = flutterVersionName
45 | }
46 |
47 | buildTypes {
48 | release {
49 | // TODO: Add your own signing config for the release build.
50 | // Signing with the debug keys for now, so `flutter run --release` works.
51 | signingConfig = signingConfigs.debug
52 | }
53 | }
54 | }
55 |
56 | flutter {
57 | source = "../.."
58 | }
59 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | def localProperties = new Properties()
9 | def localPropertiesFile = rootProject.file("local.properties")
10 | if (localPropertiesFile.exists()) {
11 | localPropertiesFile.withReader("UTF-8") { reader ->
12 | localProperties.load(reader)
13 | }
14 | }
15 |
16 | def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
17 | if (flutterVersionCode == null) {
18 | flutterVersionCode = "1"
19 | }
20 |
21 | def flutterVersionName = localProperties.getProperty("flutter.versionName")
22 | if (flutterVersionName == null) {
23 | flutterVersionName = "1.0"
24 | }
25 |
26 | android {
27 | namespace = "com.example.colmi_r0x_controller"
28 | compileSdk = flutter.compileSdkVersion
29 | ndkVersion = flutter.ndkVersion
30 |
31 | compileOptions {
32 | sourceCompatibility = JavaVersion.VERSION_1_8
33 | targetCompatibility = JavaVersion.VERSION_1_8
34 | }
35 |
36 | defaultConfig {
37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38 | applicationId = "com.example.colmi_r0x_controller"
39 | // You can update the following values to match your application needs.
40 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
41 | minSdk = 21 // flutter_blue_plus
42 | targetSdk = flutter.targetSdkVersion
43 | versionCode = flutterVersionCode.toInteger()
44 | versionName = flutterVersionName
45 | }
46 |
47 | buildTypes {
48 | release {
49 | // TODO: Add your own signing config for the release build.
50 | // Signing with the debug keys for now, so `flutter run --release` works.
51 | signingConfig = signingConfigs.debug
52 | }
53 | }
54 | }
55 |
56 | flutter {
57 | source = "../.."
58 | }
59 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/lib/colmi_ring.dart:
--------------------------------------------------------------------------------
1 | // COLMi R02-R06:
2 | // - RF03 Bluetooth 5.0 LE SoC
3 | // - STK8321 3-axis linear accelerometer
4 | // - 12 bits per axis, sampling rate configurable between 14Hz->2kHz
5 | // - motion triggered interrupt signal generation (New data, Any-motion (slope) detection, Significant motion)
6 | // - Vcare VC30F Heart Rate Sensor
7 | // - "Electric Type" Activity Detection (?)
8 |
9 | /// BLE Advertised Name matches 'R0n_xxxx'
10 | const advertisedNamePattern = r'^R0\d_[0-9A-Z]{4}$';
11 |
12 | /// UUIDs of key custom services and characteristics on the COLMi rings
13 | enum Uuid {
14 | cmdService ('6e40fff0-b5a3-f393-e0a9-e50e24dcca9e'),
15 | cmdWriteChar ('6e400002-b5a3-f393-e0a9-e50e24dcca9e'),
16 | cmdNotifyChar ('6e400003-b5a3-f393-e0a9-e50e24dcca9e');
17 |
18 | const Uuid(this.str128);
19 |
20 | final String str128;
21 | }
22 |
23 | /// Commands we can send to the ring
24 | enum Command {
25 | enableWaveGesture (hex: '0204'),
26 | waitingForWaveGesture (hex: '0205'), // confirms back with 0x0200 response
27 | disableWaveGesture (hex: '0206'),
28 | getAllRawData (hex: 'a103');
29 |
30 | const Command({required this.hex});
31 |
32 | final String hex;
33 | List get bytes => hexStringToCmdBytes(hex);
34 | }
35 |
36 | /// 16-byte data notifications we receive back from the ring that are all parsed with custom parsers.
37 | enum Notification {
38 | waveGesture (0x02), // 0x0200 confirmation, 0x0202 wave detected
39 | rawSensor (0xa1);
40 |
41 | const Notification(this.code);
42 |
43 | final int code;
44 | }
45 |
46 | /// Subtype (second byte) of 16-byte notifications we receive from the ring
47 | /// after making a RawSensor (0xa1) subscription
48 | enum RawSensorSubtype {
49 | accelerometer (0x03);
50 |
51 | const RawSensorSubtype(this.code);
52 |
53 | final int code;
54 | }
55 |
56 | /// Takes a short hex command e.g. 'A102' and packs it (with a checksum) into a well-formed 16-byte command message
57 | List hexStringToCmdBytes(final String hexString) {
58 | if (hexString.length > 30 || hexString.length % 2 == 1) throw ArgumentError('hex string must be an even number of hex digits [0-f] less than or equal to 30 chars');
59 | final bytes = List.filled(16, 0);
60 | for (int i=0; i previous + current) & 0xff;
65 | return bytes;
66 | }
67 |
68 | /// Returns IMU/accelerometer data
69 | /// ±4g sensor 12-bit signed, so g value = (rawvalue/2048)*4 in g i.e. raw/512
70 | /// Z is the axis that passes through the centre of the ring
71 | /// Y is tangent to the ring
72 | /// X is vertical when worn on the finger
73 | /// e.g. [161, 3, 0, 12, 31, 6, 251, 3, 0, 0, 0, 0, 0, 0, 0, 211]
74 | (int, int, int) parseRawAccelerometerSensorData(List data) {
75 | assert(data.length == 16);
76 | assert(data[0] == 0xa1);
77 | assert(data[1] == 0x03);
78 |
79 | // raw values are a 12-bit signed value (±2048) reflecting the range ±4g
80 | // so 1g (gravity) shows up as ±512 in rawZ when the ring is laying flat
81 | // (positive or negative depending on which side is face up)
82 | int rawY = ((data[2] << 4) | (data[3] & 0xf)).toSigned(12);
83 | int rawZ = ((data[4] << 4) | (data[5] & 0xf)).toSigned(12);
84 | int rawX = ((data[6] << 4) | (data[7] & 0xf)).toSigned(12);
85 |
86 | return (rawX, rawY, rawZ);
87 | }
--------------------------------------------------------------------------------
/examples/raw_viewer/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
22 |
31 |
35 |
39 |
40 |
41 |
42 |
43 |
44 |
46 |
49 |
50 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/examples/sample_ui/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
22 |
31 |
35 |
39 |
40 |
41 |
42 |
43 |
44 |
46 |
49 |
50 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | fake_async:
45 | dependency: transitive
46 | description:
47 | name: fake_async
48 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.3.1"
52 | flutter:
53 | dependency: "direct main"
54 | description: flutter
55 | source: sdk
56 | version: "0.0.0"
57 | flutter_blue_plus:
58 | dependency: "direct main"
59 | description:
60 | name: flutter_blue_plus
61 | sha256: ce8241302bf955bfa885457aa571cc215c10444e0c75c3e55d90b5fc05cc7e93
62 | url: "https://pub.dev"
63 | source: hosted
64 | version: "1.32.8"
65 | flutter_lints:
66 | dependency: "direct dev"
67 | description:
68 | name: flutter_lints
69 | sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
70 | url: "https://pub.dev"
71 | source: hosted
72 | version: "3.0.2"
73 | flutter_test:
74 | dependency: "direct dev"
75 | description: flutter
76 | source: sdk
77 | version: "0.0.0"
78 | leak_tracker:
79 | dependency: transitive
80 | description:
81 | name: leak_tracker
82 | sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
83 | url: "https://pub.dev"
84 | source: hosted
85 | version: "10.0.4"
86 | leak_tracker_flutter_testing:
87 | dependency: transitive
88 | description:
89 | name: leak_tracker_flutter_testing
90 | sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
91 | url: "https://pub.dev"
92 | source: hosted
93 | version: "3.0.3"
94 | leak_tracker_testing:
95 | dependency: transitive
96 | description:
97 | name: leak_tracker_testing
98 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
99 | url: "https://pub.dev"
100 | source: hosted
101 | version: "3.0.1"
102 | lints:
103 | dependency: transitive
104 | description:
105 | name: lints
106 | sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
107 | url: "https://pub.dev"
108 | source: hosted
109 | version: "3.0.0"
110 | matcher:
111 | dependency: transitive
112 | description:
113 | name: matcher
114 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
115 | url: "https://pub.dev"
116 | source: hosted
117 | version: "0.12.16+1"
118 | material_color_utilities:
119 | dependency: transitive
120 | description:
121 | name: material_color_utilities
122 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
123 | url: "https://pub.dev"
124 | source: hosted
125 | version: "0.8.0"
126 | meta:
127 | dependency: transitive
128 | description:
129 | name: meta
130 | sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
131 | url: "https://pub.dev"
132 | source: hosted
133 | version: "1.12.0"
134 | path:
135 | dependency: transitive
136 | description:
137 | name: path
138 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
139 | url: "https://pub.dev"
140 | source: hosted
141 | version: "1.9.0"
142 | sky_engine:
143 | dependency: transitive
144 | description: flutter
145 | source: sdk
146 | version: "0.0.99"
147 | source_span:
148 | dependency: transitive
149 | description:
150 | name: source_span
151 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
152 | url: "https://pub.dev"
153 | source: hosted
154 | version: "1.10.0"
155 | stack_trace:
156 | dependency: transitive
157 | description:
158 | name: stack_trace
159 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
160 | url: "https://pub.dev"
161 | source: hosted
162 | version: "1.11.1"
163 | stream_channel:
164 | dependency: transitive
165 | description:
166 | name: stream_channel
167 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "2.1.2"
171 | string_scanner:
172 | dependency: transitive
173 | description:
174 | name: string_scanner
175 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
176 | url: "https://pub.dev"
177 | source: hosted
178 | version: "1.2.0"
179 | term_glyph:
180 | dependency: transitive
181 | description:
182 | name: term_glyph
183 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
184 | url: "https://pub.dev"
185 | source: hosted
186 | version: "1.2.1"
187 | test_api:
188 | dependency: transitive
189 | description:
190 | name: test_api
191 | sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
192 | url: "https://pub.dev"
193 | source: hosted
194 | version: "0.7.0"
195 | vector_math:
196 | dependency: transitive
197 | description:
198 | name: vector_math
199 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
200 | url: "https://pub.dev"
201 | source: hosted
202 | version: "2.1.4"
203 | vm_service:
204 | dependency: transitive
205 | description:
206 | name: vm_service
207 | sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
208 | url: "https://pub.dev"
209 | source: hosted
210 | version: "14.2.1"
211 | sdks:
212 | dart: ">=3.4.3 <4.0.0"
213 | flutter: ">=3.18.0-18.0.pre.54"
214 |
--------------------------------------------------------------------------------
/examples/sample_ui/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:colmi_r0x_controller/colmi_r0x_controller.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_blue_plus/flutter_blue_plus.dart';
6 |
7 | void main() {
8 | FlutterBluePlus.setLogLevel(LogLevel.info);
9 | runApp(const MainApp());
10 | }
11 |
12 | class MainApp extends StatelessWidget {
13 | const MainApp({super.key});
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return MaterialApp(
18 | title: 'COLMi R0x Controller Sample UI Demo',
19 | theme: ThemeData(
20 | primarySwatch: Colors.blue,
21 | ),
22 | home: const HomePage(),
23 | );
24 | }
25 | }
26 |
27 | class HomePage extends StatefulWidget {
28 | const HomePage({super.key});
29 |
30 | @override
31 | State createState() => _HomePageState();
32 | }
33 |
34 | /// Dummy (focusable) items for example ListView
35 | class ListItem {
36 | bool isSelected = false;
37 | final String text;
38 | late final FocusNode focusNode;
39 |
40 | ListItem(this.text) {
41 | focusNode = FocusNode();
42 | }
43 | }
44 |
45 | List setupListData() {
46 | List list = [];
47 | list.add(ListItem('E. Honda'));
48 | list.add(ListItem('Blanka'));
49 | list.add(ListItem('Ryu'));
50 | list.add(ListItem('Ken'));
51 | list.add(ListItem('Zangief'));
52 | list.add(ListItem('Dhalsim'));
53 | list.add(ListItem('Guile'));
54 | list.add(ListItem('Chun-Li'));
55 | list.add(ListItem('Balrog'));
56 | list.add(ListItem('Vega'));
57 | list.add(ListItem('Sagat'));
58 | list.add(ListItem('M. Bison'));
59 | return list;
60 | }
61 |
62 | class _HomePageState extends State {
63 |
64 | late final ColmiR0xController _controller;
65 | ControllerState _controllerState = ControllerState.disconnected;
66 | ControlEvent _controlEvent = ControlEvent.none;
67 |
68 | late final List _list;
69 | int _focusItem = 0;
70 | String _hint = 'Wait for connection';
71 |
72 | final ScrollController _scrollController = ScrollController();
73 |
74 | _HomePageState() {
75 | _list = setupListData();
76 | _controller = ColmiR0xController(_stateListener, _controlEventListener);
77 | _controller.connect();
78 | }
79 |
80 | @override
81 | void dispose() {
82 | for (var f in _list) {
83 | f.focusNode.dispose();
84 | }
85 | _controller.disconnect();
86 | super.dispose();
87 | }
88 |
89 | void _stateListener(ControllerState newState) {
90 | debugPrint('State Listener called: $newState');
91 |
92 | switch (newState) {
93 | case ControllerState.disconnected:
94 | _hint = 'Click connect button to connect to ring';
95 | break;
96 | case ControllerState.scanning:
97 | _hint = 'Wait for scanning to find ring';
98 | break;
99 | case ControllerState.connecting:
100 | _hint = 'Wait for connection to ring';
101 | break;
102 | case ControllerState.idle:
103 | _hint = 'Wave to wake';
104 | break;
105 | case ControllerState.userInput:
106 | _hint = 'Scroll up or down to move focus';
107 | break;
108 | case ControllerState.verifyIntentionalWakeup:
109 | _hint = 'Scroll a full revolution to confirm wakeup; reverse scroll to cancel';
110 | break;
111 | case ControllerState.verifyIntentionalSelection:
112 | _hint = 'Scroll a full revolution to confirm selection; reverse scroll to cancel';
113 | break;
114 | default:
115 | }
116 |
117 | _controllerState = newState;
118 | setState(() {});
119 | }
120 |
121 | void _controlEventListener(ControlEvent event) {
122 | debugPrint('Control Event Listener called: $event');
123 | _controlEvent = event;
124 |
125 | switch (event) {
126 | case ControlEvent.confirmWakeupIntent:
127 | break;
128 | case ControlEvent.confirmSelectionIntent:
129 | _list[_focusItem].isSelected = !_list[_focusItem].isSelected;
130 | _setFocusAndScroll(_focusItem);
131 | break;
132 | case ControlEvent.scrollUp:
133 | _focusItem == 0 ? null : _focusItem--;
134 | _setFocusAndScroll(_focusItem);
135 | break;
136 | case ControlEvent.scrollDown:
137 | _focusItem == _list.length - 1 ? null : _focusItem++;
138 | _setFocusAndScroll(_focusItem);
139 | break;
140 | case ControlEvent.cancelIntent:
141 | break;
142 | default:
143 | }
144 |
145 | // TODO work out the role of the delay here
146 | Future.delayed(const Duration(milliseconds: 50),(){_list[_focusItem].focusNode.requestFocus();});
147 | setState(() {});
148 | }
149 |
150 | /// Connect to the ring if we have previously disconnected
151 | Future _connect() async {
152 | _controller.connect();
153 | setState(() {});
154 | }
155 |
156 | /// Disconnect from the ring and cancel the notification subscription
157 | Future _disconnect() async {
158 | _controller.disconnect();
159 | setState(() {});
160 | }
161 |
162 | Widget _getListItemTile(BuildContext context, int index) {
163 | return Focus(
164 | focusNode: _list[index].focusNode,
165 | onFocusChange: (hasFocus) { setState(() {});}, // rebuild to apply visual changes
166 | child: Container(
167 | decoration: BoxDecoration(
168 | border: _list[index].focusNode.hasFocus ? Border.all(color: Colors.blue, width: 2.0) : Border.all(color: Colors.white, width: 2.0),
169 | color: _list[index].isSelected ? Colors.red[100] : Colors.white,
170 | ),
171 | child: ListTile(
172 | title: Text(_list[index].text),
173 | )
174 | )
175 | );
176 | }
177 |
178 | void _setFocusAndScroll(int index) {
179 | _list[index].focusNode.requestFocus();
180 | _scrollController.animateTo(
181 | index * 25.0,
182 | duration: const Duration(milliseconds: 200),
183 | curve: Curves.easeInOut,
184 | );
185 | }
186 |
187 | @override
188 | Widget build(BuildContext context) {
189 | return Scaffold(
190 | appBar: AppBar(
191 | title: const Text('COLMi R0x Controller Sample UI Demo'),
192 | ),
193 | body: Column(
194 | crossAxisAlignment: CrossAxisAlignment.start,
195 | mainAxisAlignment: MainAxisAlignment.start,
196 | children: [
197 | const Divider(),
198 | ElevatedButton(
199 | onPressed: (_controllerState == ControllerState.disconnected) ? _connect : _disconnect,
200 | child: Text((_controllerState == ControllerState.disconnected) ? "Connect" : "Disconnect"),
201 | ),
202 | const Divider(),
203 | Text('Current State: ${_controllerState.name}',),
204 | Text('Last Event: ${_controlEvent.name}',),
205 | Text('Hint: $_hint',),
206 | const Divider(),
207 |
208 | Expanded(
209 | child: ListView.builder(
210 | itemCount: _list.length,
211 | itemBuilder: _getListItemTile,
212 | controller: _scrollController,),
213 | )
214 | ],
215 | ),
216 | );
217 | }
218 | }
219 |
--------------------------------------------------------------------------------
/examples/sample_ui/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | colmi_r0x_controller:
45 | dependency: "direct main"
46 | description:
47 | path: "../.."
48 | relative: true
49 | source: path
50 | version: "0.1.0"
51 | fake_async:
52 | dependency: transitive
53 | description:
54 | name: fake_async
55 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
56 | url: "https://pub.dev"
57 | source: hosted
58 | version: "1.3.1"
59 | flutter:
60 | dependency: "direct main"
61 | description: flutter
62 | source: sdk
63 | version: "0.0.0"
64 | flutter_blue_plus:
65 | dependency: "direct main"
66 | description:
67 | name: flutter_blue_plus
68 | sha256: ce8241302bf955bfa885457aa571cc215c10444e0c75c3e55d90b5fc05cc7e93
69 | url: "https://pub.dev"
70 | source: hosted
71 | version: "1.32.8"
72 | flutter_lints:
73 | dependency: "direct dev"
74 | description:
75 | name: flutter_lints
76 | sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
77 | url: "https://pub.dev"
78 | source: hosted
79 | version: "3.0.2"
80 | flutter_test:
81 | dependency: "direct dev"
82 | description: flutter
83 | source: sdk
84 | version: "0.0.0"
85 | leak_tracker:
86 | dependency: transitive
87 | description:
88 | name: leak_tracker
89 | sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
90 | url: "https://pub.dev"
91 | source: hosted
92 | version: "10.0.4"
93 | leak_tracker_flutter_testing:
94 | dependency: transitive
95 | description:
96 | name: leak_tracker_flutter_testing
97 | sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
98 | url: "https://pub.dev"
99 | source: hosted
100 | version: "3.0.3"
101 | leak_tracker_testing:
102 | dependency: transitive
103 | description:
104 | name: leak_tracker_testing
105 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
106 | url: "https://pub.dev"
107 | source: hosted
108 | version: "3.0.1"
109 | lints:
110 | dependency: transitive
111 | description:
112 | name: lints
113 | sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
114 | url: "https://pub.dev"
115 | source: hosted
116 | version: "3.0.0"
117 | matcher:
118 | dependency: transitive
119 | description:
120 | name: matcher
121 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
122 | url: "https://pub.dev"
123 | source: hosted
124 | version: "0.12.16+1"
125 | material_color_utilities:
126 | dependency: transitive
127 | description:
128 | name: material_color_utilities
129 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
130 | url: "https://pub.dev"
131 | source: hosted
132 | version: "0.8.0"
133 | meta:
134 | dependency: transitive
135 | description:
136 | name: meta
137 | sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
138 | url: "https://pub.dev"
139 | source: hosted
140 | version: "1.12.0"
141 | path:
142 | dependency: transitive
143 | description:
144 | name: path
145 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
146 | url: "https://pub.dev"
147 | source: hosted
148 | version: "1.9.0"
149 | sky_engine:
150 | dependency: transitive
151 | description: flutter
152 | source: sdk
153 | version: "0.0.99"
154 | source_span:
155 | dependency: transitive
156 | description:
157 | name: source_span
158 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
159 | url: "https://pub.dev"
160 | source: hosted
161 | version: "1.10.0"
162 | stack_trace:
163 | dependency: transitive
164 | description:
165 | name: stack_trace
166 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
167 | url: "https://pub.dev"
168 | source: hosted
169 | version: "1.11.1"
170 | stream_channel:
171 | dependency: transitive
172 | description:
173 | name: stream_channel
174 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
175 | url: "https://pub.dev"
176 | source: hosted
177 | version: "2.1.2"
178 | string_scanner:
179 | dependency: transitive
180 | description:
181 | name: string_scanner
182 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
183 | url: "https://pub.dev"
184 | source: hosted
185 | version: "1.2.0"
186 | term_glyph:
187 | dependency: transitive
188 | description:
189 | name: term_glyph
190 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
191 | url: "https://pub.dev"
192 | source: hosted
193 | version: "1.2.1"
194 | test_api:
195 | dependency: transitive
196 | description:
197 | name: test_api
198 | sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
199 | url: "https://pub.dev"
200 | source: hosted
201 | version: "0.7.0"
202 | vector_math:
203 | dependency: transitive
204 | description:
205 | name: vector_math
206 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
207 | url: "https://pub.dev"
208 | source: hosted
209 | version: "2.1.4"
210 | vm_service:
211 | dependency: transitive
212 | description:
213 | name: vm_service
214 | sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
215 | url: "https://pub.dev"
216 | source: hosted
217 | version: "14.2.1"
218 | sdks:
219 | dart: ">=3.4.3 <4.0.0"
220 | flutter: ">=3.18.0-18.0.pre.54"
221 |
--------------------------------------------------------------------------------
/examples/raw_viewer/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | colmi_r0x_controller:
45 | dependency: "direct main"
46 | description:
47 | path: "../.."
48 | relative: true
49 | source: path
50 | version: "0.1.0"
51 | cupertino_icons:
52 | dependency: transitive
53 | description:
54 | name: cupertino_icons
55 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
56 | url: "https://pub.dev"
57 | source: hosted
58 | version: "1.0.8"
59 | fake_async:
60 | dependency: transitive
61 | description:
62 | name: fake_async
63 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
64 | url: "https://pub.dev"
65 | source: hosted
66 | version: "1.3.1"
67 | flutter:
68 | dependency: "direct main"
69 | description: flutter
70 | source: sdk
71 | version: "0.0.0"
72 | flutter_blue_plus:
73 | dependency: "direct main"
74 | description:
75 | name: flutter_blue_plus
76 | sha256: ce8241302bf955bfa885457aa571cc215c10444e0c75c3e55d90b5fc05cc7e93
77 | url: "https://pub.dev"
78 | source: hosted
79 | version: "1.32.8"
80 | flutter_lints:
81 | dependency: "direct dev"
82 | description:
83 | name: flutter_lints
84 | sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
85 | url: "https://pub.dev"
86 | source: hosted
87 | version: "3.0.2"
88 | flutter_test:
89 | dependency: "direct dev"
90 | description: flutter
91 | source: sdk
92 | version: "0.0.0"
93 | leak_tracker:
94 | dependency: transitive
95 | description:
96 | name: leak_tracker
97 | sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
98 | url: "https://pub.dev"
99 | source: hosted
100 | version: "10.0.4"
101 | leak_tracker_flutter_testing:
102 | dependency: transitive
103 | description:
104 | name: leak_tracker_flutter_testing
105 | sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
106 | url: "https://pub.dev"
107 | source: hosted
108 | version: "3.0.3"
109 | leak_tracker_testing:
110 | dependency: transitive
111 | description:
112 | name: leak_tracker_testing
113 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
114 | url: "https://pub.dev"
115 | source: hosted
116 | version: "3.0.1"
117 | lints:
118 | dependency: transitive
119 | description:
120 | name: lints
121 | sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
122 | url: "https://pub.dev"
123 | source: hosted
124 | version: "3.0.0"
125 | matcher:
126 | dependency: transitive
127 | description:
128 | name: matcher
129 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
130 | url: "https://pub.dev"
131 | source: hosted
132 | version: "0.12.16+1"
133 | material_color_utilities:
134 | dependency: transitive
135 | description:
136 | name: material_color_utilities
137 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
138 | url: "https://pub.dev"
139 | source: hosted
140 | version: "0.8.0"
141 | meta:
142 | dependency: transitive
143 | description:
144 | name: meta
145 | sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
146 | url: "https://pub.dev"
147 | source: hosted
148 | version: "1.12.0"
149 | oscilloscope:
150 | dependency: "direct main"
151 | description:
152 | name: oscilloscope
153 | sha256: c7769846ccf948ea7a276954db169be6f13486f54ecf920923e115c0a741b7a9
154 | url: "https://pub.dev"
155 | source: hosted
156 | version: "0.2.0+1"
157 | path:
158 | dependency: transitive
159 | description:
160 | name: path
161 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
162 | url: "https://pub.dev"
163 | source: hosted
164 | version: "1.9.0"
165 | sky_engine:
166 | dependency: transitive
167 | description: flutter
168 | source: sdk
169 | version: "0.0.99"
170 | source_span:
171 | dependency: transitive
172 | description:
173 | name: source_span
174 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
175 | url: "https://pub.dev"
176 | source: hosted
177 | version: "1.10.0"
178 | stack_trace:
179 | dependency: transitive
180 | description:
181 | name: stack_trace
182 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
183 | url: "https://pub.dev"
184 | source: hosted
185 | version: "1.11.1"
186 | stream_channel:
187 | dependency: transitive
188 | description:
189 | name: stream_channel
190 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
191 | url: "https://pub.dev"
192 | source: hosted
193 | version: "2.1.2"
194 | string_scanner:
195 | dependency: transitive
196 | description:
197 | name: string_scanner
198 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
199 | url: "https://pub.dev"
200 | source: hosted
201 | version: "1.2.0"
202 | term_glyph:
203 | dependency: transitive
204 | description:
205 | name: term_glyph
206 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
207 | url: "https://pub.dev"
208 | source: hosted
209 | version: "1.2.1"
210 | test_api:
211 | dependency: transitive
212 | description:
213 | name: test_api
214 | sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
215 | url: "https://pub.dev"
216 | source: hosted
217 | version: "0.7.0"
218 | vector_math:
219 | dependency: transitive
220 | description:
221 | name: vector_math
222 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
223 | url: "https://pub.dev"
224 | source: hosted
225 | version: "2.1.4"
226 | vm_service:
227 | dependency: transitive
228 | description:
229 | name: vm_service
230 | sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
231 | url: "https://pub.dev"
232 | source: hosted
233 | version: "14.2.1"
234 | sdks:
235 | dart: ">=3.4.3 <4.0.0"
236 | flutter: ">=3.18.0-18.0.pre.54"
237 |
--------------------------------------------------------------------------------
/examples/raw_viewer/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:math';
3 |
4 | import 'package:colmi_r0x_controller/colmi_r0x_controller.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_blue_plus/flutter_blue_plus.dart';
7 | import 'package:oscilloscope/oscilloscope.dart';
8 |
9 | void main() {
10 | FlutterBluePlus.setLogLevel(LogLevel.info);
11 | runApp(const MainApp());
12 | }
13 |
14 | class MainApp extends StatelessWidget {
15 | const MainApp({super.key});
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return MaterialApp(
20 | title: 'COLMi R0x Controller Demo',
21 | theme: ThemeData(
22 | primarySwatch: Colors.blue,
23 | ),
24 | home: const HomePage(),
25 | );
26 | }
27 | }
28 |
29 | class HomePage extends StatefulWidget {
30 | const HomePage({super.key});
31 |
32 | @override
33 | State createState() => _HomePageState();
34 | }
35 |
36 | class _HomePageState extends State {
37 |
38 | late final ColmiR0xController _controller;
39 | ControllerState _controllerState = ControllerState.disconnected;
40 | ControlEvent _controlEvent = ControlEvent.none;
41 |
42 | int _rawX = 0;
43 | int _rawY = 0;
44 | int _rawZ = 0;
45 | int _accelMillis = 0;
46 | double _rawScrollPosition = 0.0;
47 | double _cumulativeScrollPosition = 0.0;
48 | double _rawNetGforce = 0.0;
49 | double _filteredNetGforce = 0.0;
50 |
51 | static const int _graphPoints = 300;
52 | final List _rawScrollPositionList = [];
53 | final List _cumulativeScrollPositionList = [];
54 | final List _filteredNetGforceList = [];
55 | final List _rawNetGForceList = [];
56 | final List _tapsList = [];
57 | int _taps = 0;
58 | int _scrollUps = 0;
59 | int _scrollDowns = 0;
60 |
61 | _HomePageState() {
62 | // note: rawEventListener is not necessary, only used for realtime display of raw values in this demo
63 | _controller = ColmiR0xController(_stateListener, _controlEventListener, rawEventListener: _rawEventListener);
64 | _controller.connect();
65 | }
66 |
67 | void _stateListener(ControllerState newState) {
68 | debugPrint('State Listener called: $newState');
69 | _controllerState = newState;
70 | setState(() {});
71 | }
72 |
73 | void _controlEventListener(ControlEvent event) {
74 | debugPrint('Control Event Listener called: $event');
75 | _controlEvent = event;
76 | switch (event) {
77 | case ControlEvent.confirmSelectionIntent:
78 | _taps++;
79 | break;
80 | case ControlEvent.scrollUp:
81 | _scrollUps++;
82 | break;
83 | case ControlEvent.scrollDown:
84 | _scrollDowns++;
85 | break;
86 | default:
87 | }
88 |
89 | setState(() {});
90 | }
91 |
92 | void _rawEventListener(int rawX, int rawY, int rawZ, double rawScrollPosition, double filteredScrollPosition, double filteredScrollPositionDiff, double rawNetGforce, double filteredNetGforce, bool isTap, int accelMillis) {
93 | _accelMillis = accelMillis;
94 | _rawX = rawX;
95 | _rawY = rawY;
96 | _rawZ = rawZ;
97 |
98 | _rawNetGforce = rawNetGforce;
99 | _filteredNetGforce = filteredNetGforce;
100 |
101 | _rawScrollPosition = rawScrollPosition;
102 | _cumulativeScrollPosition += filteredScrollPositionDiff;
103 | if (_cumulativeScrollPosition.abs() > 15) _cumulativeScrollPosition = 0;
104 |
105 | // show the changing values on oscilloscopes
106 | _rawNetGForceList.add(_rawNetGforce);
107 | if (_rawNetGForceList.length > _graphPoints) _rawNetGForceList.removeAt(0);
108 | _filteredNetGforceList.add(_filteredNetGforce);
109 | if (_filteredNetGforceList.length > _graphPoints) _filteredNetGforceList.removeAt(0);
110 | _tapsList.add(isTap ? 1.0 : 0.0);
111 | if (_tapsList.length > _graphPoints) _tapsList.removeAt(0);
112 |
113 | _cumulativeScrollPositionList.add(_cumulativeScrollPosition);
114 | if (_cumulativeScrollPositionList.length > _graphPoints) _cumulativeScrollPositionList.removeAt(0);
115 | _rawScrollPositionList.add(_rawScrollPosition);
116 | if (_rawScrollPositionList.length > _graphPoints) _rawScrollPositionList.removeAt(0);
117 |
118 | setState(() {});
119 | }
120 |
121 | /// Connect to the ring if we have previously disconnected
122 | Future _connect() async {
123 | _controller.connect();
124 | setState(() {});
125 | }
126 |
127 |
128 | /// Disconnect from the ring and cancel the notification subscription
129 | Future _disconnect() async {
130 | _controller.disconnect();
131 | setState(() {});
132 | }
133 |
134 | @override
135 | Widget build(BuildContext context) {
136 | return Scaffold(
137 | appBar: AppBar(
138 | title: const Text('COLMi R0x Controller Raw Viewer Demo'),
139 | ),
140 | body: Align(
141 | alignment: Alignment.centerLeft,
142 | child: Column(
143 | crossAxisAlignment: CrossAxisAlignment.start,
144 | mainAxisAlignment: MainAxisAlignment.start,
145 | children: [
146 | const Divider(),
147 | ElevatedButton(
148 | onPressed: (_controllerState == ControllerState.disconnected) ? _connect : _disconnect,
149 | child: Text((_controllerState == ControllerState.disconnected) ? "Connect" : "Disconnect"),
150 | ),
151 | const Divider(),
152 | Text('Current State: ${_controllerState.name}',),
153 | Text('Last Event: ${_controlEvent.name}',),
154 | const Divider(),
155 |
156 | // accelerometer data
157 | SizedBox(height: 60,
158 | child: Wrap(direction: Axis.vertical, runSpacing: 30.0, children: [
159 | Text('Raw X: $_rawX',),
160 | Text('Raw Y: $_rawY',),
161 | Text('Raw Z: $_rawZ',),
162 | Text('Taps: $_taps',),
163 | Text('Scroll Ups: $_scrollUps',),
164 | Text('Scroll Downs: $_scrollDowns',),
165 | Text('Accel Millis: $_accelMillis',),
166 | const SizedBox(height: 10),
167 | ]),
168 | ),
169 | const Divider(),
170 |
171 | Text('Raw Scroll: ${_rawScrollPosition.toStringAsFixed(2)}',),
172 | SizedBox(height: 90,
173 | child:Oscilloscope(
174 | yAxisMin: -pi,
175 | yAxisMax: pi,
176 | dataSet: _rawScrollPositionList.toList(),
177 | backgroundColor: Colors.white,
178 | traceColor: Colors.black,
179 | )),
180 | const Divider(),
181 |
182 | Text('Cumulative Scroll Position: ${_cumulativeScrollPosition.toStringAsFixed(2)}',),
183 | SizedBox(height: 90,
184 | child:Oscilloscope(
185 | yAxisMin: -4*pi,
186 | yAxisMax: 4*pi,
187 | dataSet: _cumulativeScrollPositionList.toList(),
188 | backgroundColor: Colors.white,
189 | traceColor: Colors.black,
190 | )),
191 | const Divider(),
192 |
193 | Text('Raw Net g-Force: ${_rawNetGforce.toStringAsFixed(2)}',),
194 | SizedBox(height: 90,
195 | child:Oscilloscope(
196 | yAxisMin: 0,
197 | yAxisMax: 1,
198 | dataSet: _rawNetGForceList.toList(),
199 | backgroundColor: Colors.white,
200 | traceColor: Colors.black,
201 | )),
202 | const Divider(),
203 |
204 | Text('Filtered Net g-Force: ${_filteredNetGforce.toStringAsFixed(2)}',),
205 | SizedBox(height: 90,
206 | child:Oscilloscope(
207 | yAxisMin: 0,
208 | yAxisMax: 1,
209 | dataSet: _filteredNetGforceList.toList(),
210 | backgroundColor: Colors.white,
211 | traceColor: Colors.black,
212 | )),
213 | const Divider(),
214 |
215 | const Text('Taps',),
216 | SizedBox(height: 90,
217 | child:Oscilloscope(
218 | yAxisMin: 0,
219 | yAxisMax: 1,
220 | dataSet: _tapsList.toList(),
221 | backgroundColor: Colors.white,
222 | traceColor: Colors.black,
223 | )),
224 | ],
225 | ),
226 | ),
227 | );
228 | }
229 | }
230 |
--------------------------------------------------------------------------------
/examples/raw_viewer/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 97C146E61CF9000F007C117D /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 97C146ED1CF9000F007C117D;
25 | remoteInfo = Runner;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXCopyFilesBuildPhase section */
30 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
31 | isa = PBXCopyFilesBuildPhase;
32 | buildActionMask = 2147483647;
33 | dstPath = "";
34 | dstSubfolderSpec = 10;
35 | files = (
36 | );
37 | name = "Embed Frameworks";
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXCopyFilesBuildPhase section */
41 |
42 | /* Begin PBXFileReference section */
43 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
44 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
45 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
46 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
47 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
48 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
49 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
50 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 331C8082294A63A400263BE5 /* RunnerTests */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 331C807B294A618700263BE5 /* RunnerTests.swift */,
75 | );
76 | path = RunnerTests;
77 | sourceTree = "";
78 | };
79 | 9740EEB11CF90186004384FC /* Flutter */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
83 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
84 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
85 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
86 | );
87 | name = Flutter;
88 | sourceTree = "";
89 | };
90 | 97C146E51CF9000F007C117D = {
91 | isa = PBXGroup;
92 | children = (
93 | 9740EEB11CF90186004384FC /* Flutter */,
94 | 97C146F01CF9000F007C117D /* Runner */,
95 | 97C146EF1CF9000F007C117D /* Products */,
96 | 331C8082294A63A400263BE5 /* RunnerTests */,
97 | );
98 | sourceTree = "";
99 | };
100 | 97C146EF1CF9000F007C117D /* Products */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 97C146EE1CF9000F007C117D /* Runner.app */,
104 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
105 | );
106 | name = Products;
107 | sourceTree = "";
108 | };
109 | 97C146F01CF9000F007C117D /* Runner */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
113 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
114 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
115 | 97C147021CF9000F007C117D /* Info.plist */,
116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
118 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
119 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
120 | );
121 | path = Runner;
122 | sourceTree = "";
123 | };
124 | /* End PBXGroup section */
125 |
126 | /* Begin PBXNativeTarget section */
127 | 331C8080294A63A400263BE5 /* RunnerTests */ = {
128 | isa = PBXNativeTarget;
129 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
130 | buildPhases = (
131 | 331C807D294A63A400263BE5 /* Sources */,
132 | 331C807F294A63A400263BE5 /* Resources */,
133 | );
134 | buildRules = (
135 | );
136 | dependencies = (
137 | 331C8086294A63A400263BE5 /* PBXTargetDependency */,
138 | );
139 | name = RunnerTests;
140 | productName = RunnerTests;
141 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
142 | productType = "com.apple.product-type.bundle.unit-test";
143 | };
144 | 97C146ED1CF9000F007C117D /* Runner */ = {
145 | isa = PBXNativeTarget;
146 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
147 | buildPhases = (
148 | 9740EEB61CF901F6004384FC /* Run Script */,
149 | 97C146EA1CF9000F007C117D /* Sources */,
150 | 97C146EB1CF9000F007C117D /* Frameworks */,
151 | 97C146EC1CF9000F007C117D /* Resources */,
152 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
153 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
154 | );
155 | buildRules = (
156 | );
157 | dependencies = (
158 | );
159 | name = Runner;
160 | productName = Runner;
161 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
162 | productType = "com.apple.product-type.application";
163 | };
164 | /* End PBXNativeTarget section */
165 |
166 | /* Begin PBXProject section */
167 | 97C146E61CF9000F007C117D /* Project object */ = {
168 | isa = PBXProject;
169 | attributes = {
170 | BuildIndependentTargetsInParallel = YES;
171 | LastUpgradeCheck = 1510;
172 | ORGANIZATIONNAME = "";
173 | TargetAttributes = {
174 | 331C8080294A63A400263BE5 = {
175 | CreatedOnToolsVersion = 14.0;
176 | TestTargetID = 97C146ED1CF9000F007C117D;
177 | };
178 | 97C146ED1CF9000F007C117D = {
179 | CreatedOnToolsVersion = 7.3.1;
180 | LastSwiftMigration = 1100;
181 | };
182 | };
183 | };
184 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
185 | compatibilityVersion = "Xcode 9.3";
186 | developmentRegion = en;
187 | hasScannedForEncodings = 0;
188 | knownRegions = (
189 | en,
190 | Base,
191 | );
192 | mainGroup = 97C146E51CF9000F007C117D;
193 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
194 | projectDirPath = "";
195 | projectRoot = "";
196 | targets = (
197 | 97C146ED1CF9000F007C117D /* Runner */,
198 | 331C8080294A63A400263BE5 /* RunnerTests */,
199 | );
200 | };
201 | /* End PBXProject section */
202 |
203 | /* Begin PBXResourcesBuildPhase section */
204 | 331C807F294A63A400263BE5 /* Resources */ = {
205 | isa = PBXResourcesBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | );
209 | runOnlyForDeploymentPostprocessing = 0;
210 | };
211 | 97C146EC1CF9000F007C117D /* Resources */ = {
212 | isa = PBXResourcesBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
216 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
217 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
218 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | /* End PBXResourcesBuildPhase section */
223 |
224 | /* Begin PBXShellScriptBuildPhase section */
225 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
226 | isa = PBXShellScriptBuildPhase;
227 | alwaysOutOfDate = 1;
228 | buildActionMask = 2147483647;
229 | files = (
230 | );
231 | inputPaths = (
232 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
233 | );
234 | name = "Thin Binary";
235 | outputPaths = (
236 | );
237 | runOnlyForDeploymentPostprocessing = 0;
238 | shellPath = /bin/sh;
239 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
240 | };
241 | 9740EEB61CF901F6004384FC /* Run Script */ = {
242 | isa = PBXShellScriptBuildPhase;
243 | alwaysOutOfDate = 1;
244 | buildActionMask = 2147483647;
245 | files = (
246 | );
247 | inputPaths = (
248 | );
249 | name = "Run Script";
250 | outputPaths = (
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | shellPath = /bin/sh;
254 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
255 | };
256 | /* End PBXShellScriptBuildPhase section */
257 |
258 | /* Begin PBXSourcesBuildPhase section */
259 | 331C807D294A63A400263BE5 /* Sources */ = {
260 | isa = PBXSourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
264 | );
265 | runOnlyForDeploymentPostprocessing = 0;
266 | };
267 | 97C146EA1CF9000F007C117D /* Sources */ = {
268 | isa = PBXSourcesBuildPhase;
269 | buildActionMask = 2147483647;
270 | files = (
271 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
272 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | };
276 | /* End PBXSourcesBuildPhase section */
277 |
278 | /* Begin PBXTargetDependency section */
279 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
280 | isa = PBXTargetDependency;
281 | target = 97C146ED1CF9000F007C117D /* Runner */;
282 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
283 | };
284 | /* End PBXTargetDependency section */
285 |
286 | /* Begin PBXVariantGroup section */
287 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
288 | isa = PBXVariantGroup;
289 | children = (
290 | 97C146FB1CF9000F007C117D /* Base */,
291 | );
292 | name = Main.storyboard;
293 | sourceTree = "";
294 | };
295 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
296 | isa = PBXVariantGroup;
297 | children = (
298 | 97C147001CF9000F007C117D /* Base */,
299 | );
300 | name = LaunchScreen.storyboard;
301 | sourceTree = "";
302 | };
303 | /* End PBXVariantGroup section */
304 |
305 | /* Begin XCBuildConfiguration section */
306 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
307 | isa = XCBuildConfiguration;
308 | buildSettings = {
309 | ALWAYS_SEARCH_USER_PATHS = NO;
310 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
311 | CLANG_ANALYZER_NONNULL = YES;
312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
313 | CLANG_CXX_LIBRARY = "libc++";
314 | CLANG_ENABLE_MODULES = YES;
315 | CLANG_ENABLE_OBJC_ARC = YES;
316 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317 | CLANG_WARN_BOOL_CONVERSION = YES;
318 | CLANG_WARN_COMMA = YES;
319 | CLANG_WARN_CONSTANT_CONVERSION = YES;
320 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322 | CLANG_WARN_EMPTY_BODY = YES;
323 | CLANG_WARN_ENUM_CONVERSION = YES;
324 | CLANG_WARN_INFINITE_RECURSION = YES;
325 | CLANG_WARN_INT_CONVERSION = YES;
326 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
328 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
331 | CLANG_WARN_STRICT_PROTOTYPES = YES;
332 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
333 | CLANG_WARN_UNREACHABLE_CODE = YES;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
341 | GCC_C_LANGUAGE_STANDARD = gnu99;
342 | GCC_NO_COMMON_BLOCKS = YES;
343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
345 | GCC_WARN_UNDECLARED_SELECTOR = YES;
346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
347 | GCC_WARN_UNUSED_FUNCTION = YES;
348 | GCC_WARN_UNUSED_VARIABLE = YES;
349 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
350 | MTL_ENABLE_DEBUG_INFO = NO;
351 | SDKROOT = iphoneos;
352 | SUPPORTED_PLATFORMS = iphoneos;
353 | TARGETED_DEVICE_FAMILY = "1,2";
354 | VALIDATE_PRODUCT = YES;
355 | };
356 | name = Profile;
357 | };
358 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
359 | isa = XCBuildConfiguration;
360 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
361 | buildSettings = {
362 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
363 | CLANG_ENABLE_MODULES = YES;
364 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
365 | ENABLE_BITCODE = NO;
366 | INFOPLIST_FILE = Runner/Info.plist;
367 | LD_RUNPATH_SEARCH_PATHS = (
368 | "$(inherited)",
369 | "@executable_path/Frameworks",
370 | );
371 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController;
372 | PRODUCT_NAME = "$(TARGET_NAME)";
373 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
374 | SWIFT_VERSION = 5.0;
375 | VERSIONING_SYSTEM = "apple-generic";
376 | };
377 | name = Profile;
378 | };
379 | 331C8088294A63A400263BE5 /* Debug */ = {
380 | isa = XCBuildConfiguration;
381 | buildSettings = {
382 | BUNDLE_LOADER = "$(TEST_HOST)";
383 | CODE_SIGN_STYLE = Automatic;
384 | CURRENT_PROJECT_VERSION = 1;
385 | GENERATE_INFOPLIST_FILE = YES;
386 | MARKETING_VERSION = 1.0;
387 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController.RunnerTests;
388 | PRODUCT_NAME = "$(TARGET_NAME)";
389 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
390 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
391 | SWIFT_VERSION = 5.0;
392 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
393 | };
394 | name = Debug;
395 | };
396 | 331C8089294A63A400263BE5 /* Release */ = {
397 | isa = XCBuildConfiguration;
398 | buildSettings = {
399 | BUNDLE_LOADER = "$(TEST_HOST)";
400 | CODE_SIGN_STYLE = Automatic;
401 | CURRENT_PROJECT_VERSION = 1;
402 | GENERATE_INFOPLIST_FILE = YES;
403 | MARKETING_VERSION = 1.0;
404 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController.RunnerTests;
405 | PRODUCT_NAME = "$(TARGET_NAME)";
406 | SWIFT_VERSION = 5.0;
407 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
408 | };
409 | name = Release;
410 | };
411 | 331C808A294A63A400263BE5 /* Profile */ = {
412 | isa = XCBuildConfiguration;
413 | buildSettings = {
414 | BUNDLE_LOADER = "$(TEST_HOST)";
415 | CODE_SIGN_STYLE = Automatic;
416 | CURRENT_PROJECT_VERSION = 1;
417 | GENERATE_INFOPLIST_FILE = YES;
418 | MARKETING_VERSION = 1.0;
419 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController.RunnerTests;
420 | PRODUCT_NAME = "$(TARGET_NAME)";
421 | SWIFT_VERSION = 5.0;
422 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
423 | };
424 | name = Profile;
425 | };
426 | 97C147031CF9000F007C117D /* Debug */ = {
427 | isa = XCBuildConfiguration;
428 | buildSettings = {
429 | ALWAYS_SEARCH_USER_PATHS = NO;
430 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
431 | CLANG_ANALYZER_NONNULL = YES;
432 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
433 | CLANG_CXX_LIBRARY = "libc++";
434 | CLANG_ENABLE_MODULES = YES;
435 | CLANG_ENABLE_OBJC_ARC = YES;
436 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
437 | CLANG_WARN_BOOL_CONVERSION = YES;
438 | CLANG_WARN_COMMA = YES;
439 | CLANG_WARN_CONSTANT_CONVERSION = YES;
440 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
441 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
442 | CLANG_WARN_EMPTY_BODY = YES;
443 | CLANG_WARN_ENUM_CONVERSION = YES;
444 | CLANG_WARN_INFINITE_RECURSION = YES;
445 | CLANG_WARN_INT_CONVERSION = YES;
446 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
447 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
448 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
449 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
450 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
451 | CLANG_WARN_STRICT_PROTOTYPES = YES;
452 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
453 | CLANG_WARN_UNREACHABLE_CODE = YES;
454 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
455 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
456 | COPY_PHASE_STRIP = NO;
457 | DEBUG_INFORMATION_FORMAT = dwarf;
458 | ENABLE_STRICT_OBJC_MSGSEND = YES;
459 | ENABLE_TESTABILITY = YES;
460 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
461 | GCC_C_LANGUAGE_STANDARD = gnu99;
462 | GCC_DYNAMIC_NO_PIC = NO;
463 | GCC_NO_COMMON_BLOCKS = YES;
464 | GCC_OPTIMIZATION_LEVEL = 0;
465 | GCC_PREPROCESSOR_DEFINITIONS = (
466 | "DEBUG=1",
467 | "$(inherited)",
468 | );
469 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
470 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
471 | GCC_WARN_UNDECLARED_SELECTOR = YES;
472 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
473 | GCC_WARN_UNUSED_FUNCTION = YES;
474 | GCC_WARN_UNUSED_VARIABLE = YES;
475 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
476 | MTL_ENABLE_DEBUG_INFO = YES;
477 | ONLY_ACTIVE_ARCH = YES;
478 | SDKROOT = iphoneos;
479 | TARGETED_DEVICE_FAMILY = "1,2";
480 | };
481 | name = Debug;
482 | };
483 | 97C147041CF9000F007C117D /* Release */ = {
484 | isa = XCBuildConfiguration;
485 | buildSettings = {
486 | ALWAYS_SEARCH_USER_PATHS = NO;
487 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
488 | CLANG_ANALYZER_NONNULL = YES;
489 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
490 | CLANG_CXX_LIBRARY = "libc++";
491 | CLANG_ENABLE_MODULES = YES;
492 | CLANG_ENABLE_OBJC_ARC = YES;
493 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
494 | CLANG_WARN_BOOL_CONVERSION = YES;
495 | CLANG_WARN_COMMA = YES;
496 | CLANG_WARN_CONSTANT_CONVERSION = YES;
497 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
498 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
499 | CLANG_WARN_EMPTY_BODY = YES;
500 | CLANG_WARN_ENUM_CONVERSION = YES;
501 | CLANG_WARN_INFINITE_RECURSION = YES;
502 | CLANG_WARN_INT_CONVERSION = YES;
503 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
504 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
505 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
506 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
507 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
508 | CLANG_WARN_STRICT_PROTOTYPES = YES;
509 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
510 | CLANG_WARN_UNREACHABLE_CODE = YES;
511 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
512 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
513 | COPY_PHASE_STRIP = NO;
514 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
515 | ENABLE_NS_ASSERTIONS = NO;
516 | ENABLE_STRICT_OBJC_MSGSEND = YES;
517 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
518 | GCC_C_LANGUAGE_STANDARD = gnu99;
519 | GCC_NO_COMMON_BLOCKS = YES;
520 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
521 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
522 | GCC_WARN_UNDECLARED_SELECTOR = YES;
523 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
524 | GCC_WARN_UNUSED_FUNCTION = YES;
525 | GCC_WARN_UNUSED_VARIABLE = YES;
526 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
527 | MTL_ENABLE_DEBUG_INFO = NO;
528 | SDKROOT = iphoneos;
529 | SUPPORTED_PLATFORMS = iphoneos;
530 | SWIFT_COMPILATION_MODE = wholemodule;
531 | SWIFT_OPTIMIZATION_LEVEL = "-O";
532 | TARGETED_DEVICE_FAMILY = "1,2";
533 | VALIDATE_PRODUCT = YES;
534 | };
535 | name = Release;
536 | };
537 | 97C147061CF9000F007C117D /* Debug */ = {
538 | isa = XCBuildConfiguration;
539 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
540 | buildSettings = {
541 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
542 | CLANG_ENABLE_MODULES = YES;
543 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
544 | ENABLE_BITCODE = NO;
545 | INFOPLIST_FILE = Runner/Info.plist;
546 | LD_RUNPATH_SEARCH_PATHS = (
547 | "$(inherited)",
548 | "@executable_path/Frameworks",
549 | );
550 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController;
551 | PRODUCT_NAME = "$(TARGET_NAME)";
552 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
553 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
554 | SWIFT_VERSION = 5.0;
555 | VERSIONING_SYSTEM = "apple-generic";
556 | };
557 | name = Debug;
558 | };
559 | 97C147071CF9000F007C117D /* Release */ = {
560 | isa = XCBuildConfiguration;
561 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
562 | buildSettings = {
563 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
564 | CLANG_ENABLE_MODULES = YES;
565 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
566 | ENABLE_BITCODE = NO;
567 | INFOPLIST_FILE = Runner/Info.plist;
568 | LD_RUNPATH_SEARCH_PATHS = (
569 | "$(inherited)",
570 | "@executable_path/Frameworks",
571 | );
572 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController;
573 | PRODUCT_NAME = "$(TARGET_NAME)";
574 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
575 | SWIFT_VERSION = 5.0;
576 | VERSIONING_SYSTEM = "apple-generic";
577 | };
578 | name = Release;
579 | };
580 | /* End XCBuildConfiguration section */
581 |
582 | /* Begin XCConfigurationList section */
583 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
584 | isa = XCConfigurationList;
585 | buildConfigurations = (
586 | 331C8088294A63A400263BE5 /* Debug */,
587 | 331C8089294A63A400263BE5 /* Release */,
588 | 331C808A294A63A400263BE5 /* Profile */,
589 | );
590 | defaultConfigurationIsVisible = 0;
591 | defaultConfigurationName = Release;
592 | };
593 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
594 | isa = XCConfigurationList;
595 | buildConfigurations = (
596 | 97C147031CF9000F007C117D /* Debug */,
597 | 97C147041CF9000F007C117D /* Release */,
598 | 249021D3217E4FDB00AE95B9 /* Profile */,
599 | );
600 | defaultConfigurationIsVisible = 0;
601 | defaultConfigurationName = Release;
602 | };
603 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
604 | isa = XCConfigurationList;
605 | buildConfigurations = (
606 | 97C147061CF9000F007C117D /* Debug */,
607 | 97C147071CF9000F007C117D /* Release */,
608 | 249021D4217E4FDB00AE95B9 /* Profile */,
609 | );
610 | defaultConfigurationIsVisible = 0;
611 | defaultConfigurationName = Release;
612 | };
613 | /* End XCConfigurationList section */
614 | };
615 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
616 | }
617 |
--------------------------------------------------------------------------------
/examples/sample_ui/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 97C146E61CF9000F007C117D /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 97C146ED1CF9000F007C117D;
25 | remoteInfo = Runner;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXCopyFilesBuildPhase section */
30 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
31 | isa = PBXCopyFilesBuildPhase;
32 | buildActionMask = 2147483647;
33 | dstPath = "";
34 | dstSubfolderSpec = 10;
35 | files = (
36 | );
37 | name = "Embed Frameworks";
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXCopyFilesBuildPhase section */
41 |
42 | /* Begin PBXFileReference section */
43 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
44 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
45 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
46 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
47 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
48 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
49 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
50 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 331C8082294A63A400263BE5 /* RunnerTests */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 331C807B294A618700263BE5 /* RunnerTests.swift */,
75 | );
76 | path = RunnerTests;
77 | sourceTree = "";
78 | };
79 | 9740EEB11CF90186004384FC /* Flutter */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
83 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
84 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
85 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
86 | );
87 | name = Flutter;
88 | sourceTree = "";
89 | };
90 | 97C146E51CF9000F007C117D = {
91 | isa = PBXGroup;
92 | children = (
93 | 9740EEB11CF90186004384FC /* Flutter */,
94 | 97C146F01CF9000F007C117D /* Runner */,
95 | 97C146EF1CF9000F007C117D /* Products */,
96 | 331C8082294A63A400263BE5 /* RunnerTests */,
97 | );
98 | sourceTree = "";
99 | };
100 | 97C146EF1CF9000F007C117D /* Products */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 97C146EE1CF9000F007C117D /* Runner.app */,
104 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
105 | );
106 | name = Products;
107 | sourceTree = "";
108 | };
109 | 97C146F01CF9000F007C117D /* Runner */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
113 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
114 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
115 | 97C147021CF9000F007C117D /* Info.plist */,
116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
118 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
119 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
120 | );
121 | path = Runner;
122 | sourceTree = "";
123 | };
124 | /* End PBXGroup section */
125 |
126 | /* Begin PBXNativeTarget section */
127 | 331C8080294A63A400263BE5 /* RunnerTests */ = {
128 | isa = PBXNativeTarget;
129 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
130 | buildPhases = (
131 | 331C807D294A63A400263BE5 /* Sources */,
132 | 331C807F294A63A400263BE5 /* Resources */,
133 | );
134 | buildRules = (
135 | );
136 | dependencies = (
137 | 331C8086294A63A400263BE5 /* PBXTargetDependency */,
138 | );
139 | name = RunnerTests;
140 | productName = RunnerTests;
141 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
142 | productType = "com.apple.product-type.bundle.unit-test";
143 | };
144 | 97C146ED1CF9000F007C117D /* Runner */ = {
145 | isa = PBXNativeTarget;
146 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
147 | buildPhases = (
148 | 9740EEB61CF901F6004384FC /* Run Script */,
149 | 97C146EA1CF9000F007C117D /* Sources */,
150 | 97C146EB1CF9000F007C117D /* Frameworks */,
151 | 97C146EC1CF9000F007C117D /* Resources */,
152 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
153 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
154 | );
155 | buildRules = (
156 | );
157 | dependencies = (
158 | );
159 | name = Runner;
160 | productName = Runner;
161 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
162 | productType = "com.apple.product-type.application";
163 | };
164 | /* End PBXNativeTarget section */
165 |
166 | /* Begin PBXProject section */
167 | 97C146E61CF9000F007C117D /* Project object */ = {
168 | isa = PBXProject;
169 | attributes = {
170 | BuildIndependentTargetsInParallel = YES;
171 | LastUpgradeCheck = 1510;
172 | ORGANIZATIONNAME = "";
173 | TargetAttributes = {
174 | 331C8080294A63A400263BE5 = {
175 | CreatedOnToolsVersion = 14.0;
176 | TestTargetID = 97C146ED1CF9000F007C117D;
177 | };
178 | 97C146ED1CF9000F007C117D = {
179 | CreatedOnToolsVersion = 7.3.1;
180 | LastSwiftMigration = 1100;
181 | };
182 | };
183 | };
184 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
185 | compatibilityVersion = "Xcode 9.3";
186 | developmentRegion = en;
187 | hasScannedForEncodings = 0;
188 | knownRegions = (
189 | en,
190 | Base,
191 | );
192 | mainGroup = 97C146E51CF9000F007C117D;
193 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
194 | projectDirPath = "";
195 | projectRoot = "";
196 | targets = (
197 | 97C146ED1CF9000F007C117D /* Runner */,
198 | 331C8080294A63A400263BE5 /* RunnerTests */,
199 | );
200 | };
201 | /* End PBXProject section */
202 |
203 | /* Begin PBXResourcesBuildPhase section */
204 | 331C807F294A63A400263BE5 /* Resources */ = {
205 | isa = PBXResourcesBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | );
209 | runOnlyForDeploymentPostprocessing = 0;
210 | };
211 | 97C146EC1CF9000F007C117D /* Resources */ = {
212 | isa = PBXResourcesBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
216 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
217 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
218 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | /* End PBXResourcesBuildPhase section */
223 |
224 | /* Begin PBXShellScriptBuildPhase section */
225 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
226 | isa = PBXShellScriptBuildPhase;
227 | alwaysOutOfDate = 1;
228 | buildActionMask = 2147483647;
229 | files = (
230 | );
231 | inputPaths = (
232 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
233 | );
234 | name = "Thin Binary";
235 | outputPaths = (
236 | );
237 | runOnlyForDeploymentPostprocessing = 0;
238 | shellPath = /bin/sh;
239 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
240 | };
241 | 9740EEB61CF901F6004384FC /* Run Script */ = {
242 | isa = PBXShellScriptBuildPhase;
243 | alwaysOutOfDate = 1;
244 | buildActionMask = 2147483647;
245 | files = (
246 | );
247 | inputPaths = (
248 | );
249 | name = "Run Script";
250 | outputPaths = (
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | shellPath = /bin/sh;
254 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
255 | };
256 | /* End PBXShellScriptBuildPhase section */
257 |
258 | /* Begin PBXSourcesBuildPhase section */
259 | 331C807D294A63A400263BE5 /* Sources */ = {
260 | isa = PBXSourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
264 | );
265 | runOnlyForDeploymentPostprocessing = 0;
266 | };
267 | 97C146EA1CF9000F007C117D /* Sources */ = {
268 | isa = PBXSourcesBuildPhase;
269 | buildActionMask = 2147483647;
270 | files = (
271 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
272 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | };
276 | /* End PBXSourcesBuildPhase section */
277 |
278 | /* Begin PBXTargetDependency section */
279 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
280 | isa = PBXTargetDependency;
281 | target = 97C146ED1CF9000F007C117D /* Runner */;
282 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
283 | };
284 | /* End PBXTargetDependency section */
285 |
286 | /* Begin PBXVariantGroup section */
287 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
288 | isa = PBXVariantGroup;
289 | children = (
290 | 97C146FB1CF9000F007C117D /* Base */,
291 | );
292 | name = Main.storyboard;
293 | sourceTree = "";
294 | };
295 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
296 | isa = PBXVariantGroup;
297 | children = (
298 | 97C147001CF9000F007C117D /* Base */,
299 | );
300 | name = LaunchScreen.storyboard;
301 | sourceTree = "";
302 | };
303 | /* End PBXVariantGroup section */
304 |
305 | /* Begin XCBuildConfiguration section */
306 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
307 | isa = XCBuildConfiguration;
308 | buildSettings = {
309 | ALWAYS_SEARCH_USER_PATHS = NO;
310 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
311 | CLANG_ANALYZER_NONNULL = YES;
312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
313 | CLANG_CXX_LIBRARY = "libc++";
314 | CLANG_ENABLE_MODULES = YES;
315 | CLANG_ENABLE_OBJC_ARC = YES;
316 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317 | CLANG_WARN_BOOL_CONVERSION = YES;
318 | CLANG_WARN_COMMA = YES;
319 | CLANG_WARN_CONSTANT_CONVERSION = YES;
320 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322 | CLANG_WARN_EMPTY_BODY = YES;
323 | CLANG_WARN_ENUM_CONVERSION = YES;
324 | CLANG_WARN_INFINITE_RECURSION = YES;
325 | CLANG_WARN_INT_CONVERSION = YES;
326 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
328 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
331 | CLANG_WARN_STRICT_PROTOTYPES = YES;
332 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
333 | CLANG_WARN_UNREACHABLE_CODE = YES;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
341 | GCC_C_LANGUAGE_STANDARD = gnu99;
342 | GCC_NO_COMMON_BLOCKS = YES;
343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
345 | GCC_WARN_UNDECLARED_SELECTOR = YES;
346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
347 | GCC_WARN_UNUSED_FUNCTION = YES;
348 | GCC_WARN_UNUSED_VARIABLE = YES;
349 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
350 | MTL_ENABLE_DEBUG_INFO = NO;
351 | SDKROOT = iphoneos;
352 | SUPPORTED_PLATFORMS = iphoneos;
353 | TARGETED_DEVICE_FAMILY = "1,2";
354 | VALIDATE_PRODUCT = YES;
355 | };
356 | name = Profile;
357 | };
358 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
359 | isa = XCBuildConfiguration;
360 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
361 | buildSettings = {
362 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
363 | CLANG_ENABLE_MODULES = YES;
364 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
365 | ENABLE_BITCODE = NO;
366 | INFOPLIST_FILE = Runner/Info.plist;
367 | LD_RUNPATH_SEARCH_PATHS = (
368 | "$(inherited)",
369 | "@executable_path/Frameworks",
370 | );
371 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController;
372 | PRODUCT_NAME = "$(TARGET_NAME)";
373 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
374 | SWIFT_VERSION = 5.0;
375 | VERSIONING_SYSTEM = "apple-generic";
376 | };
377 | name = Profile;
378 | };
379 | 331C8088294A63A400263BE5 /* Debug */ = {
380 | isa = XCBuildConfiguration;
381 | buildSettings = {
382 | BUNDLE_LOADER = "$(TEST_HOST)";
383 | CODE_SIGN_STYLE = Automatic;
384 | CURRENT_PROJECT_VERSION = 1;
385 | GENERATE_INFOPLIST_FILE = YES;
386 | MARKETING_VERSION = 1.0;
387 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController.RunnerTests;
388 | PRODUCT_NAME = "$(TARGET_NAME)";
389 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
390 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
391 | SWIFT_VERSION = 5.0;
392 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
393 | };
394 | name = Debug;
395 | };
396 | 331C8089294A63A400263BE5 /* Release */ = {
397 | isa = XCBuildConfiguration;
398 | buildSettings = {
399 | BUNDLE_LOADER = "$(TEST_HOST)";
400 | CODE_SIGN_STYLE = Automatic;
401 | CURRENT_PROJECT_VERSION = 1;
402 | GENERATE_INFOPLIST_FILE = YES;
403 | MARKETING_VERSION = 1.0;
404 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController.RunnerTests;
405 | PRODUCT_NAME = "$(TARGET_NAME)";
406 | SWIFT_VERSION = 5.0;
407 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
408 | };
409 | name = Release;
410 | };
411 | 331C808A294A63A400263BE5 /* Profile */ = {
412 | isa = XCBuildConfiguration;
413 | buildSettings = {
414 | BUNDLE_LOADER = "$(TEST_HOST)";
415 | CODE_SIGN_STYLE = Automatic;
416 | CURRENT_PROJECT_VERSION = 1;
417 | GENERATE_INFOPLIST_FILE = YES;
418 | MARKETING_VERSION = 1.0;
419 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController.RunnerTests;
420 | PRODUCT_NAME = "$(TARGET_NAME)";
421 | SWIFT_VERSION = 5.0;
422 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
423 | };
424 | name = Profile;
425 | };
426 | 97C147031CF9000F007C117D /* Debug */ = {
427 | isa = XCBuildConfiguration;
428 | buildSettings = {
429 | ALWAYS_SEARCH_USER_PATHS = NO;
430 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
431 | CLANG_ANALYZER_NONNULL = YES;
432 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
433 | CLANG_CXX_LIBRARY = "libc++";
434 | CLANG_ENABLE_MODULES = YES;
435 | CLANG_ENABLE_OBJC_ARC = YES;
436 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
437 | CLANG_WARN_BOOL_CONVERSION = YES;
438 | CLANG_WARN_COMMA = YES;
439 | CLANG_WARN_CONSTANT_CONVERSION = YES;
440 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
441 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
442 | CLANG_WARN_EMPTY_BODY = YES;
443 | CLANG_WARN_ENUM_CONVERSION = YES;
444 | CLANG_WARN_INFINITE_RECURSION = YES;
445 | CLANG_WARN_INT_CONVERSION = YES;
446 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
447 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
448 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
449 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
450 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
451 | CLANG_WARN_STRICT_PROTOTYPES = YES;
452 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
453 | CLANG_WARN_UNREACHABLE_CODE = YES;
454 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
455 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
456 | COPY_PHASE_STRIP = NO;
457 | DEBUG_INFORMATION_FORMAT = dwarf;
458 | ENABLE_STRICT_OBJC_MSGSEND = YES;
459 | ENABLE_TESTABILITY = YES;
460 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
461 | GCC_C_LANGUAGE_STANDARD = gnu99;
462 | GCC_DYNAMIC_NO_PIC = NO;
463 | GCC_NO_COMMON_BLOCKS = YES;
464 | GCC_OPTIMIZATION_LEVEL = 0;
465 | GCC_PREPROCESSOR_DEFINITIONS = (
466 | "DEBUG=1",
467 | "$(inherited)",
468 | );
469 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
470 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
471 | GCC_WARN_UNDECLARED_SELECTOR = YES;
472 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
473 | GCC_WARN_UNUSED_FUNCTION = YES;
474 | GCC_WARN_UNUSED_VARIABLE = YES;
475 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
476 | MTL_ENABLE_DEBUG_INFO = YES;
477 | ONLY_ACTIVE_ARCH = YES;
478 | SDKROOT = iphoneos;
479 | TARGETED_DEVICE_FAMILY = "1,2";
480 | };
481 | name = Debug;
482 | };
483 | 97C147041CF9000F007C117D /* Release */ = {
484 | isa = XCBuildConfiguration;
485 | buildSettings = {
486 | ALWAYS_SEARCH_USER_PATHS = NO;
487 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
488 | CLANG_ANALYZER_NONNULL = YES;
489 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
490 | CLANG_CXX_LIBRARY = "libc++";
491 | CLANG_ENABLE_MODULES = YES;
492 | CLANG_ENABLE_OBJC_ARC = YES;
493 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
494 | CLANG_WARN_BOOL_CONVERSION = YES;
495 | CLANG_WARN_COMMA = YES;
496 | CLANG_WARN_CONSTANT_CONVERSION = YES;
497 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
498 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
499 | CLANG_WARN_EMPTY_BODY = YES;
500 | CLANG_WARN_ENUM_CONVERSION = YES;
501 | CLANG_WARN_INFINITE_RECURSION = YES;
502 | CLANG_WARN_INT_CONVERSION = YES;
503 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
504 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
505 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
506 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
507 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
508 | CLANG_WARN_STRICT_PROTOTYPES = YES;
509 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
510 | CLANG_WARN_UNREACHABLE_CODE = YES;
511 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
512 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
513 | COPY_PHASE_STRIP = NO;
514 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
515 | ENABLE_NS_ASSERTIONS = NO;
516 | ENABLE_STRICT_OBJC_MSGSEND = YES;
517 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
518 | GCC_C_LANGUAGE_STANDARD = gnu99;
519 | GCC_NO_COMMON_BLOCKS = YES;
520 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
521 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
522 | GCC_WARN_UNDECLARED_SELECTOR = YES;
523 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
524 | GCC_WARN_UNUSED_FUNCTION = YES;
525 | GCC_WARN_UNUSED_VARIABLE = YES;
526 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
527 | MTL_ENABLE_DEBUG_INFO = NO;
528 | SDKROOT = iphoneos;
529 | SUPPORTED_PLATFORMS = iphoneos;
530 | SWIFT_COMPILATION_MODE = wholemodule;
531 | SWIFT_OPTIMIZATION_LEVEL = "-O";
532 | TARGETED_DEVICE_FAMILY = "1,2";
533 | VALIDATE_PRODUCT = YES;
534 | };
535 | name = Release;
536 | };
537 | 97C147061CF9000F007C117D /* Debug */ = {
538 | isa = XCBuildConfiguration;
539 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
540 | buildSettings = {
541 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
542 | CLANG_ENABLE_MODULES = YES;
543 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
544 | ENABLE_BITCODE = NO;
545 | INFOPLIST_FILE = Runner/Info.plist;
546 | LD_RUNPATH_SEARCH_PATHS = (
547 | "$(inherited)",
548 | "@executable_path/Frameworks",
549 | );
550 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController;
551 | PRODUCT_NAME = "$(TARGET_NAME)";
552 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
553 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
554 | SWIFT_VERSION = 5.0;
555 | VERSIONING_SYSTEM = "apple-generic";
556 | };
557 | name = Debug;
558 | };
559 | 97C147071CF9000F007C117D /* Release */ = {
560 | isa = XCBuildConfiguration;
561 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
562 | buildSettings = {
563 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
564 | CLANG_ENABLE_MODULES = YES;
565 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
566 | ENABLE_BITCODE = NO;
567 | INFOPLIST_FILE = Runner/Info.plist;
568 | LD_RUNPATH_SEARCH_PATHS = (
569 | "$(inherited)",
570 | "@executable_path/Frameworks",
571 | );
572 | PRODUCT_BUNDLE_IDENTIFIER = com.example.colmiR0xController;
573 | PRODUCT_NAME = "$(TARGET_NAME)";
574 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
575 | SWIFT_VERSION = 5.0;
576 | VERSIONING_SYSTEM = "apple-generic";
577 | };
578 | name = Release;
579 | };
580 | /* End XCBuildConfiguration section */
581 |
582 | /* Begin XCConfigurationList section */
583 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
584 | isa = XCConfigurationList;
585 | buildConfigurations = (
586 | 331C8088294A63A400263BE5 /* Debug */,
587 | 331C8089294A63A400263BE5 /* Release */,
588 | 331C808A294A63A400263BE5 /* Profile */,
589 | );
590 | defaultConfigurationIsVisible = 0;
591 | defaultConfigurationName = Release;
592 | };
593 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
594 | isa = XCConfigurationList;
595 | buildConfigurations = (
596 | 97C147031CF9000F007C117D /* Debug */,
597 | 97C147041CF9000F007C117D /* Release */,
598 | 249021D3217E4FDB00AE95B9 /* Profile */,
599 | );
600 | defaultConfigurationIsVisible = 0;
601 | defaultConfigurationName = Release;
602 | };
603 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
604 | isa = XCConfigurationList;
605 | buildConfigurations = (
606 | 97C147061CF9000F007C117D /* Debug */,
607 | 97C147071CF9000F007C117D /* Release */,
608 | 249021D4217E4FDB00AE95B9 /* Profile */,
609 | );
610 | defaultConfigurationIsVisible = 0;
611 | defaultConfigurationName = Release;
612 | };
613 | /* End XCConfigurationList section */
614 | };
615 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
616 | }
617 |
--------------------------------------------------------------------------------
/lib/colmi_r0x_controller.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:io';
3 | import 'dart:math';
4 |
5 | import 'package:flutter/foundation.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter_blue_plus/flutter_blue_plus.dart';
8 | import 'colmi_ring.dart' as ring;
9 |
10 | enum ControllerState {
11 | scanning,
12 | connecting,
13 | connected, // connected but not raw polling or awaiting shake gesture
14 | idle, // shake to wake, not raw polling
15 | verifyIntentionalWakeup, // Shake detected, Start polling accelerometer for rotation, times out back to idle
16 | userInput, // User did full rotation, start taking input (or else back to idle) continue polling accelerometer for menu selection
17 | verifyIntentionalSelection, // after user tap, ensure one more full rotation to confirm, generate selection event then back to idle, or else time out back to idle
18 | // Or else multiple chained selection actions; does the host app tell the controller to go straight back to userInput state in its OnSelected event handler? (As long as the controller is in Idle?)
19 | disconnected, // doesn't necessarily auto-reconnect
20 | }
21 |
22 | enum ControlEvent {
23 | none,
24 | scrollUp,
25 | scrollDown,
26 | provisionalWakeupIntent,
27 | provisionalSelectionIntent,
28 | verifyIntent25,
29 | verifyIntent50,
30 | verifyIntent75,
31 | cancelIntent,
32 | confirmWakeupIntent,
33 | confirmSelectionIntent,
34 | timeout,
35 | }
36 |
37 | /// Finds, connects to and sets up a Colmi R0x ring as a controller for input.
38 | class ColmiR0xController {
39 | /// how much time after the tap to allow the user to start a verification scroll
40 | static const int intentMillisInitial = 2000;
41 | /// how much more time to add each time the verification passes another 25%
42 | static const int intentMillisExtra = 500;
43 | /// angular velocity in radians per second to generate a scroll up or down event (should be positive)
44 | static const double scrollEventThreshold = 5;
45 | /// reverse scroll absolute angle in radians to generate a cancel event during verify stage (threshold value should be positive)
46 | static const double scrollCancelThreshold = pi/4;
47 |
48 |
49 | StreamSubscription>? _scanResultSubs; // device scan subscription
50 | StreamSubscription>? _charNotifySubs; // custom notify stream subscription
51 | StreamSubscription? _connStateSubs; // device connection state subscription
52 |
53 | BluetoothDevice? _device;
54 | BluetoothCharacteristic? _charWrite; // custom write
55 | BluetoothCharacteristic? _charNotify; // custom notify
56 |
57 | ControllerState _currentState = ControllerState.disconnected;
58 | final Function _stateListener;
59 | final Function _controlEventListener;
60 | final Function? _rawEventListener;
61 |
62 | bool _pollRawDataOn = false;
63 | bool _sentPriorityRequest = false;
64 | int _connectTime = 0;
65 | int _lastUpdateTime = 0;
66 | int _accelMillis = 0;
67 | int _sampleNumber = -1;
68 |
69 | // keep the previous 2 values as history for detecting taps and scrolls
70 | // [0] has the older value, [1] is the newer
71 | double _filteredScrollPositionPrev = 0.0;
72 | final _filteredScrollPositionDiff = [0.0, 0.0]; // filtered, rectified difference between samples
73 | final _filteredNetGForce = [0.0, 0.0];
74 |
75 | // track current position and time for verify procedure (full rotation within a certain time)
76 | double _currentAbsPos = 0.0;
77 | double _verifyStartPos = 0.0;
78 | int _verifyStartTime = 0;
79 |
80 | /// Take StateListener and ControlEventListener callback functions, optionally a rawEventListener
81 | ColmiR0xController(this._stateListener, this._controlEventListener, {Function? rawEventListener}) : _rawEventListener = rawEventListener;
82 |
83 | /// Scan, connect, discover characteristics and transition to ControllerState.idle if possible
84 | Future connect() async {
85 | assert(_currentState == ControllerState.disconnected);
86 |
87 | // if we've previously connected, just reconnect, don't scan
88 | if (_device != null) {
89 | await _reconnect();
90 | return;
91 | }
92 |
93 | await _scanAndConnect();
94 | }
95 |
96 | /// Disconnect from the ring and cancel the notification subscription
97 | Future disconnect() async {
98 | await _charNotifySubs?.cancel();
99 | await _device?.disconnect();
100 | _charWrite = null;
101 | _charNotify = null;
102 | _sentPriorityRequest = false;
103 | _connectTime = 0;
104 | _transitionTo(ControllerState.disconnected);
105 | }
106 |
107 | /// Private method for reconnecting to a known device
108 | Future _reconnect() async {
109 | try {
110 | if (Platform.isAndroid) {
111 | await _device!.connect(mtu: 24); // ring messages are only 16-bytes + BLE headers
112 | await _device!.setPreferredPhy(txPhy: Phy.le2m.mask, rxPhy: Phy.le2m.mask, option: PhyCoding.noPreferred);
113 | }
114 | else {
115 | await _device!.connect();
116 | }
117 |
118 | await _discoverServices();
119 | // record the moment of connection because in 5s we need to send a connection priority request
120 | _connectTime = DateTime.timestamp().millisecondsSinceEpoch;
121 | _transitionTo(ControllerState.idle);
122 | } catch (e) {
123 | debugPrint('Error occurred while connecting: $e');
124 | // TODO if Android error 133
125 | // TODO connectionStateListener should attempt another reconnection?
126 | }
127 | }
128 |
129 | /// Private method for scanning and connecting to a device for the first time
130 | Future _scanAndConnect() async {
131 | try {
132 | // Wait for Bluetooth enabled & permission granted
133 | await FlutterBluePlus.adapterState.where((val) => val == BluetoothAdapterState.on).first;
134 |
135 | // guessing that all the rings advertise a name of R0* based on my R06
136 | FlutterBluePlus.startScan(timeout: const Duration(seconds: 5),
137 | withKeywords: ['R0']);
138 | _transitionTo(ControllerState.scanning);
139 | } catch (e) {
140 | debugPrint(e.toString());
141 | _transitionTo(ControllerState.disconnected);
142 | }
143 |
144 | // Listen to scan results
145 | // if there's already a subscription, remember to cancel it first if we can
146 | // Connects to the first one; if you have several rings in range then tweak this
147 | await _scanResultSubs?.cancel();
148 | _scanResultSubs = FlutterBluePlus.scanResults.listen((results) async {
149 | for (ScanResult r in results) {
150 | // not quite sure if all the rings follow 'R0n_xxxx' but my R06 does
151 | if (r.advertisementData.advName.startsWith(RegExp(ring.advertisedNamePattern))) {
152 | FlutterBluePlus.stopScan();
153 | _device = r.device;
154 | _transitionTo(ControllerState.connecting);
155 |
156 | try {
157 | // firstly set up a subscription to track connections/disconnections from the ring
158 | _connStateSubs = _device!.connectionState.listen((BluetoothConnectionState state) async {
159 | debugPrint('device connection state change: $state');
160 | if (state == BluetoothConnectionState.disconnected) {
161 | DisconnectReason? reason = _device!.disconnectReason;
162 |
163 | if (reason != null) {
164 | debugPrint('device disconnection reason: ${_device!.disconnectReason}');
165 | if (reason.platform == ErrorPlatform.android && reason.code == 133) {
166 | debugPrint('ANDROID_SPECIFIC_ERROR occurred. Multiple attempts to reconnect (3+) usually solve it.');
167 | _reconnect();
168 | }
169 | }
170 | }
171 | });
172 |
173 | _device!.cancelWhenDisconnected(_connStateSubs!, delayed:true, next:true);
174 |
175 | _reconnect();
176 | }
177 | catch (e) {
178 | debugPrint(e.toString());
179 | _transitionTo(ControllerState.disconnected);
180 | }
181 | break;
182 | }
183 | }
184 | });
185 | }
186 |
187 | /// Find and keep references to the custom write and notify characteristics
188 | Future _discoverServices() async {
189 | if (_device != null && _device!.isConnected) {
190 | List services = await _device!.discoverServices();
191 | for (BluetoothService service in services) {
192 | if (service.uuid.str128 == ring.Uuid.cmdService.str128) {
193 | for (BluetoothCharacteristic c in service.characteristics) {
194 | // Find the Char for writing 16-byte commands to the ring
195 | if (c.uuid.str128 == ring.Uuid.cmdWriteChar.str128) {
196 | _charWrite = c;
197 | }
198 | // Find the Char for receiving 16-byte notifications from the ring and subscribe
199 | else if (c.uuid.str128 == ring.Uuid.cmdNotifyChar.str128) {
200 | _charNotify = c;
201 | // if there's already a subscription, remember to cancel the old one first if we can
202 | await _charNotifySubs?.cancel();
203 | _charNotifySubs = _charNotify!.onValueReceived.listen(_onNotificationData);
204 | await _charNotify!.setNotifyValue(true);
205 | }
206 | }
207 | }
208 | }
209 | }
210 | }
211 |
212 | void _transitionTo(ControllerState newState) {
213 | debugPrint('Transitioning from $_currentState to $newState');
214 |
215 | switch (newState) {
216 | case ControllerState.connected:
217 | // nothing to do, wait for app to ask for transition to idle or userInput
218 | break;
219 |
220 | case ControllerState.idle:
221 | _enableWaveGestureDetection();
222 | break;
223 |
224 | case ControllerState.userInput:
225 | // if coming from a successful verifyIntentionalWakeup then no need
226 | // to change wave gesture detection or raw data polling
227 | // if coming from an aborted verifyIntentionalSelection then no need
228 | // to change wave gesture detection or raw data polling
229 | // but it doesn't hurt to reaffirm the connection priority
230 | _enableRawDataPolling();
231 | break;
232 |
233 | case ControllerState.disconnected:
234 | _disableRawDataPolling();
235 | break;
236 |
237 | case ControllerState.verifyIntentionalSelection:
238 | _verifyStartPos = _currentAbsPos;
239 | _verifyStartTime = DateTime.timestamp().millisecondsSinceEpoch;
240 | // coming from userInput state, so raw polling is on already,
241 | // but it doesn't hurt to reaffirm the connection priority
242 | _enableRawDataPolling();
243 | break;
244 |
245 | case ControllerState.verifyIntentionalWakeup:
246 | _verifyStartPos = _currentAbsPos;
247 | _verifyStartTime = DateTime.timestamp().millisecondsSinceEpoch;
248 | _disableWaveGestureDetection();
249 | _enableRawDataPolling();
250 | break;
251 | default:
252 | }
253 |
254 | _currentState = newState;
255 | // send events first, and the new state at the end
256 | _stateListener.call(newState);
257 | }
258 |
259 | /// Callback for handling all 16-byte data notifications from the custom notification characteristic
260 | /// We only process raw accelerometer and wave gesture messages and ignore any others
261 | void _onNotificationData(List data) {
262 | if (data.length != 16) {
263 | debugPrint('Invalid message length: ${data.length}');
264 | return;
265 | }
266 |
267 | // process accelerometer updates
268 | if (data[0] == ring.Notification.rawSensor.code &&
269 | data[1] == ring.RawSensorSubtype.accelerometer.code) {
270 |
271 | // only process during the relevant states
272 | if (_currentState == ControllerState.userInput ||
273 | _currentState == ControllerState.verifyIntentionalWakeup ||
274 | _currentState == ControllerState.verifyIntentionalSelection) {
275 |
276 | // track the time between accelerometer updates
277 | var receivedTime = DateTime.timestamp().millisecondsSinceEpoch;
278 | _accelMillis = receivedTime - _lastUpdateTime;
279 | _lastUpdateTime = receivedTime;
280 | // if it's been more than 2 seconds since our last sample, then treat this
281 | // as a new interaction so we can't refer to prior scroll position or forces
282 | (_accelMillis > 2000 || _sampleNumber < 0) ? _sampleNumber = 0 : _sampleNumber++;
283 |
284 | if (Platform.isAndroid ) {
285 | // connection priority requests earlier than 5 seconds don't appear to stick
286 | // so send one here after 5 seconds
287 | if (!_sentPriorityRequest && (receivedTime - _connectTime > 5000) && _device != null && _device!.isConnected) {
288 | _device!.requestConnectionPriority(connectionPriorityRequest: ConnectionPriority.high);
289 | _sentPriorityRequest = true;
290 | }
291 | }
292 |
293 | // pull the raw values out of the bluetooth message payload
294 | var (rawX, rawY, rawZ) = ring.parseRawAccelerometerSensorData(data);
295 |
296 | // calculate the magnitude of the acceleration overall, net of gravity, in g
297 | var rawNetGforce = (sqrt(rawX * rawX + rawY * rawY + rawZ * rawZ)/512.0 - 1.0).abs();
298 | var filteredNetGForce = 0.0;
299 |
300 | // for tracking the scroll position
301 | var rawScrollPosition = 0.0;
302 | var filteredScrollPosition = 0.0;
303 | var filteredScrollPositionDiff = 0.0;
304 |
305 | // for tracking gestures
306 | bool isTap = false;
307 | bool isScrollUp = false;
308 | bool isScrollDown = false;
309 |
310 | // now process the gesture based on the current state
311 | switch (_currentState) {
312 | case ControllerState.userInput:
313 | // first two samples we don't really have a choice but to calculate scroll position
314 | // and filtered g force
315 | if (_sampleNumber < 2) {
316 | //debugPrint('Sample $_sampleNumber: rawNetGforce=$rawNetGforce, scrollPosition=${atan2(rawY, rawX)}');
317 | // calculate absolute "scroll" position when rotated around the finger
318 | // (the finger matches the Z axis)
319 | // range -pi .. pi
320 | rawScrollPosition = atan2(rawY, rawX);
321 | filteredScrollPosition = rawScrollPosition;
322 | _currentAbsPos = rawScrollPosition;
323 | filteredNetGForce = rawNetGforce < 0.50 ? 0.0 : rawNetGforce;
324 |
325 | if (_sampleNumber == 0) {
326 | filteredScrollPositionDiff = 0.0;
327 | // also "zero" out the prior
328 | }
329 | else {
330 | filteredScrollPositionDiff = _calcScrollDistance(rawScrollPosition, _filteredScrollPositionPrev);
331 | }
332 | }
333 | // if the force is pretty close to g, then the ring is at rest or perhaps gentle scrolling
334 | // but not a tap, so scroll position can still be interpreted
335 | else if (rawNetGforce < 0.50) {
336 | // filter all small g forces out to zero
337 | filteredNetGForce = 0.0;
338 |
339 | // still calculate absolute "scroll" position when rotated around the finger
340 | // (the finger matches the Z axis)
341 | // range -pi .. pi
342 | rawScrollPosition = atan2(rawY, rawX);
343 | filteredScrollPosition = rawScrollPosition;
344 | _currentAbsPos = rawScrollPosition;
345 | filteredScrollPositionDiff = _calcScrollDistance(rawScrollPosition, _filteredScrollPositionPrev);
346 |
347 | // we say it's a tap if:
348 | // - it's a crazy large force (3.0+, never should happen just scrolling, only taps or waves)
349 | // - it's large g-force (1.25) that lasts for only one sample i.e. _/\_
350 | // - valid ranges of calculated scroll diffs are so large in taps that we seem to be unable to filter
351 | // out occasional rough scrolls by putting constraints on scroll diff amounts here
352 | isTap = (_filteredNetGForce[1] > 3.0) ||
353 | ((_filteredNetGForce[0] == 0.0) && (_filteredNetGForce[1] > 1.25) && (filteredNetGForce == 0.0));
354 |
355 | //if (_filteredNetGForce[1] > 0.20) {
356 | // debugPrint('Sample $_sampleNumber: rawNetGforce=$rawNetGforce, gf-1=${_filteredNetGForce[1]}, gf-2=${_filteredNetGForce[0]}, rawScrollPrev=$_rawScrollPositionPrev, rawScroll=$rawScrollPosition, isTap=$isTap');
357 | //}
358 |
359 | if (!isTap) {
360 | // generate scroll events if the net gforce is low (clipped to zero)
361 | // and there has been significant movement in the absolute scroll position
362 | // adjust for speed of polling; "significant movement" needs to be an angular rate, not an absolute amount
363 | // We clamp to a max/min because if accelMillis are really fast, the threshold becomes very small and twitchy
364 | // so we also threshold it with an absolute amount that any scroll must exceed
365 | isScrollUp = (filteredScrollPositionDiff > max((scrollEventThreshold * (_accelMillis / 1000)), 0.4));
366 | isScrollDown = (filteredScrollPositionDiff < min((-scrollEventThreshold * (_accelMillis / 1000)), -0.4));
367 | }
368 | }
369 | else if (rawNetGforce > 1.25) {
370 | // if values are large, this might be a flick or tap,
371 | // so scroll position will be unreliable, so copy the previous filtered scroll position
372 | // and don't change _currentAbsPos
373 | // and leave _filteredScrollPositionDiff at 0.0
374 | rawScrollPosition = atan2(rawY, rawX);
375 | filteredScrollPosition = _filteredScrollPositionPrev;
376 | filteredScrollPositionDiff = 0.0;
377 |
378 | // range > 0, in g
379 | filteredNetGForce = rawNetGforce;
380 | //debugPrint('Sample $_sampleNumber: rawNetGforce=$rawNetGforce, gf-1=${_filteredNetGForce[1]}, gf-2=${_filteredNetGForce[0]}, rawScrollPrev=$_rawScrollPositionPrev, rawScroll=$rawScrollPosition');
381 | }
382 | else {
383 | // ambiguous zone (0.5 -> 1.25 at the moment), just report the previous value for filtered scroll position
384 | // and zero for everything else
385 | // So no tap events, no scroll events
386 | rawScrollPosition = atan2(rawY, rawX);
387 | filteredScrollPosition = _filteredScrollPositionPrev;
388 | //debugPrint('Sample $_sampleNumber: rawNetGforce=$rawNetGforce, gf-1=${_filteredNetGForce[1]}, gf-2=${_filteredNetGForce[0]}, rawScrollPrev=$_rawScrollPositionPrev, rawScroll=$rawScrollPosition');
389 | }
390 | break;
391 |
392 | case ControllerState.verifyIntentionalSelection:
393 | case ControllerState.verifyIntentionalWakeup:
394 | // just track scrolling, don't worry about detecting taps
395 | // calculate absolute "scroll" position when rotated around the finger
396 | // (the finger matches the Z axis)
397 | // range -pi .. pi
398 | rawScrollPosition = atan2(rawY, rawX);
399 | filteredScrollPosition = rawScrollPosition;
400 | filteredScrollPositionDiff = _sampleNumber == 0 ? 0.0 : _calcScrollDistance(rawScrollPosition, _filteredScrollPositionPrev);
401 | // keep filteredNetGforce and filteredNetOrthoForce at 0.0
402 |
403 | // absolute position accumulates the diffs so its range can exceed +-pi
404 | // because it's necessary to detect when a revolution has happened
405 | _currentAbsPos += filteredScrollPositionDiff;
406 | break;
407 |
408 | default:
409 | }
410 |
411 | // update the raw event listener with the latest values (if subscribed)
412 | _rawEventListener?.call(rawX, rawY, rawZ, rawScrollPosition, filteredScrollPosition, filteredScrollPositionDiff, rawNetGforce, filteredNetGForce, isTap, _accelMillis);
413 |
414 | // control events: taps and scrolls, and tap confirmations (half revolution after provisional tap)
415 | switch (_currentState) {
416 | case ControllerState.userInput:
417 | if (isTap) {
418 | // taps are only valid provisional selections when in userInput mode
419 | _controlEventListener.call(ControlEvent.provisionalSelectionIntent);
420 | _transitionTo(ControllerState.verifyIntentionalSelection);
421 | }
422 | else if (isScrollUp) {
423 | _controlEventListener.call(ControlEvent.scrollUp);
424 | }
425 | else if (isScrollDown) {
426 | _controlEventListener.call(ControlEvent.scrollDown);
427 | }
428 | break;
429 |
430 | case ControllerState.verifyIntentionalWakeup:
431 | // if our timeout for confirmation has expired, transition back to idle
432 | if (receivedTime - _verifyStartTime > intentMillisInitial) {
433 | _pollRawDataOn = false;
434 | _controlEventListener.call(ControlEvent.timeout);
435 | _transitionTo(ControllerState.idle);
436 | break;
437 | }
438 | var isScrollUp = (filteredNetGForce == 0.0) && (filteredScrollPositionDiff > (scrollEventThreshold * (_accelMillis / 1000)));
439 | if (isScrollUp) {
440 | if (_currentAbsPos >= _verifyStartPos + 2*pi) {
441 | _controlEventListener.call(ControlEvent.confirmWakeupIntent);
442 | _transitionTo(ControllerState.userInput);
443 | }
444 | else if (_currentAbsPos >= _verifyStartPos + (3*pi)/2) {
445 | _controlEventListener.call(ControlEvent.verifyIntent75);
446 | _verifyStartTime += intentMillisExtra;
447 | }
448 | else if (_currentAbsPos >= _verifyStartPos + pi) {
449 | _controlEventListener.call(ControlEvent.verifyIntent50);
450 | _verifyStartTime += intentMillisExtra;
451 | }
452 | else if (_currentAbsPos >= _verifyStartPos + pi/2) {
453 | _controlEventListener.call(ControlEvent.verifyIntent25);
454 | _verifyStartTime += intentMillisExtra;
455 | }
456 | }
457 | else if (_currentAbsPos < _verifyStartPos - scrollCancelThreshold) {
458 | // down scroll is a cancel when verifying; back to Idle
459 | _pollRawDataOn = false;
460 | _controlEventListener.call(ControlEvent.cancelIntent);
461 | _transitionTo(ControllerState.idle);
462 | }
463 |
464 | break;
465 |
466 | case ControllerState.verifyIntentionalSelection:
467 | // if our timeout for confirmation has expired, transition back to userInput
468 | if (DateTime.timestamp().millisecondsSinceEpoch - _verifyStartTime > intentMillisInitial) {
469 | _controlEventListener.call(ControlEvent.timeout);
470 | _transitionTo(ControllerState.userInput);
471 | break;
472 | }
473 | var isScrollUp = (filteredNetGForce == 0.0) && (filteredScrollPositionDiff > (scrollEventThreshold * (_accelMillis / 1000)));
474 | if (isScrollUp) {
475 | if (_currentAbsPos >= _verifyStartPos + 2*pi) {
476 | _pollRawDataOn = false;
477 | _controlEventListener.call(ControlEvent.confirmSelectionIntent);
478 | _transitionTo(ControllerState.idle);
479 | // TODO alternatively go to userInput if caller wants multiple selections
480 | }
481 | else if (_currentAbsPos >= _verifyStartPos + (3*pi)/2) {
482 | _controlEventListener.call(ControlEvent.verifyIntent75);
483 | _verifyStartTime += intentMillisExtra;
484 | }
485 | else if (_currentAbsPos >= _verifyStartPos + pi) {
486 | _controlEventListener.call(ControlEvent.verifyIntent50);
487 | _verifyStartTime += intentMillisExtra;
488 | }
489 | else if (_currentAbsPos >= _verifyStartPos + pi/2) {
490 | _controlEventListener.call(ControlEvent.verifyIntent25);
491 | _verifyStartTime += intentMillisExtra;
492 | }
493 | break;
494 | }
495 | else if (_currentAbsPos < _verifyStartPos - scrollCancelThreshold) {
496 | // down scroll is a cancel when verifying; back to userInput
497 | _controlEventListener.call(ControlEvent.cancelIntent);
498 | _transitionTo(ControllerState.userInput);
499 | }
500 |
501 | default:
502 | }
503 |
504 | // kick off the next request
505 | if (_pollRawDataOn) {
506 | _sendCommand(ring.Command.getAllRawData.bytes);
507 | }
508 |
509 | // update previous values
510 | // if the current and the n-1 g-force samples have exactly the same (non-zero) values,
511 | // coalesce them here to make the _/\_ spike detection easier
512 | // in cases where we sample the accelerometer so frequently we see the exact same value
513 | if (_filteredNetGForce[1] == 0 || filteredNetGForce != _filteredNetGForce[1]) {
514 | _filteredNetGForce[0] = _filteredNetGForce[1];
515 | _filteredNetGForce[1] = filteredNetGForce;
516 | }
517 | _filteredNetGForce[1] = filteredNetGForce;
518 |
519 | _filteredScrollPositionPrev = filteredScrollPosition;
520 | _filteredScrollPositionDiff[0] = _filteredScrollPositionDiff[1];
521 | _filteredScrollPositionDiff[1] = filteredScrollPositionDiff;
522 | }
523 | }
524 | // process wave gesture updates
525 | else if (data[0] == ring.Notification.waveGesture.code) {
526 | if (data[1] == 2) {
527 | if (_currentState == ControllerState.idle) {
528 | _transitionTo(ControllerState.verifyIntentionalWakeup);
529 | }
530 | else {
531 | debugPrint('Error: Wave Gesture Detected during unexpected state: $_currentState');
532 | }
533 | }
534 | }
535 | }
536 |
537 | /// calculates the scroll direction (+-) and magnitude from the previous absolute scroll position
538 | /// to the current absolute scroll position.
539 | /// Range of both current and previous should be -pi..pi
540 | double _calcScrollDistance(double current, double previous) {
541 | // handle negative crossover cases
542 | if (current >= 0.0 && previous >= 0.0) {
543 | return current - previous; // e.g. 3.1 - 1.5 = +1.6; 1.5 - 3.1 = -1.6
544 | }
545 | else if (current <= 0.0 && previous <= 0.0) {
546 | return current - previous; // e.g. -2 - -1 = -1; -1 - -2 = 1;
547 | }
548 | else if (current <= 0.0 && previous >= 0.0) {
549 | if ((previous - current) < pi) {
550 | return current - previous; // e.g. -1 - 1 = -2
551 | }
552 | else {
553 | return 2*pi + (current - previous); // e.g. 2pi + (-2 - 2) = 2pi-4
554 | }
555 | }
556 | else if (current >= 0.0 && previous <= 0.0) {
557 | if ((current - previous) < pi) {
558 | return current - previous; // e.g. 1 - -1 = 2
559 | }
560 | else {
561 | return (current - previous) - 2*pi; // e.g. (2 - -2)-2pi = 4-2pi
562 | }
563 | }
564 | return 0.0;
565 | }
566 |
567 | /// Polls the ring for a snapshot of SpO2, PPG and Accelerometer data
568 | Future _enableRawDataPolling() async {
569 | // requesting high priority each time we're tracking scrolling reduces the latency to ~30ms
570 | if (Platform.isAndroid && _device != null && _device!.isConnected) {
571 | await _device!.requestConnectionPriority(connectionPriorityRequest: ConnectionPriority.high);
572 | }
573 |
574 | if (!_pollRawDataOn) {
575 | _pollRawDataOn = true;
576 |
577 | await _sendCommand(ring.Command.getAllRawData.bytes);
578 | }
579 | }
580 |
581 | /// Stops polling the ring for a snapshot of SpO2, PPG and Accelerometer data
582 | Future _disableRawDataPolling() async {
583 | _pollRawDataOn = false;
584 |
585 | // requesting balanced priority when not polling quickly for updates
586 | if (Platform.isAndroid && _device != null && _device!.isConnected) {
587 | await _device!.requestConnectionPriority(connectionPriorityRequest: ConnectionPriority.balanced);
588 | }
589 | }
590 |
591 | Future _enableWaveGestureDetection() async {
592 | // TODO If the ring is on charge this call fails, we could check what/if it returns in case we need to do it again
593 | // (disconnect then reconnect when off the charger works)
594 | await _sendCommand(ring.Command.enableWaveGesture.bytes);
595 | }
596 |
597 | Future _disableWaveGestureDetection() async {
598 | await _sendCommand(ring.Command.disableWaveGesture.bytes);
599 | }
600 |
601 | /// Actually send the 16-byte command message to the custom Write characteristic
602 | Future _sendCommand(List cmd) async {
603 | if (_device != null && _device!.isConnected && _charWrite != null) {
604 | try {
605 | await _charWrite!.write(cmd);
606 | }
607 | catch (e) {
608 | debugPrint(e.toString());
609 | }
610 | }
611 | }
612 | }
613 |
--------------------------------------------------------------------------------