mirror of
https://github.com/BotChain-Robots/ui.git
synced 2026-07-08 15:07:22 +02:00
Update control library
This commit is contained in:
102
.gitignore
vendored
102
.gitignore
vendored
@@ -1,8 +1,96 @@
|
|||||||
[Ll]ibrary/
|
# https://github.com/github/gitignore/blob/main/Unity.gitignore
|
||||||
[Tt]emp/
|
.utmp/
|
||||||
[Oo]bj/
|
/[Ll]ibrary/
|
||||||
[Ll]ogs/
|
/[Tt]emp/
|
||||||
[Bb]uild/
|
/[Oo]bj/
|
||||||
[Bb]uilds/
|
/[Bb]uild/
|
||||||
|
/[Bb]uilds/
|
||||||
|
/[Ll]ogs/
|
||||||
|
/[Uu]ser[Ss]ettings/
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# By default unity supports Blender asset imports, *.blend1 blender files do not need to be commited to version control.
|
||||||
|
*.blend1
|
||||||
|
*.blend1.meta
|
||||||
|
|
||||||
|
# MemoryCaptures can get excessive in size.
|
||||||
|
# They also could contain extremely sensitive data
|
||||||
|
/[Mm]emoryCaptures/
|
||||||
|
|
||||||
|
# Recordings can get excessive in size
|
||||||
|
/[Rr]ecordings/
|
||||||
|
|
||||||
|
# Uncomment this line if you wish to ignore the asset store tools plugin
|
||||||
|
# /[Aa]ssets/AssetStoreTools*
|
||||||
|
|
||||||
|
# Autogenerated Jetbrains Rider plugin
|
||||||
|
/[Aa]ssets/Plugins/Editor/JetBrains*
|
||||||
|
# Jetbrains Rider personal-layer settings
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# Visual Studio cache directory
|
||||||
.vs/
|
.vs/
|
||||||
.DS_Store
|
|
||||||
|
# Gradle cache directory
|
||||||
|
.gradle/
|
||||||
|
|
||||||
|
# Autogenerated VS/MD/Consulo solution and project files
|
||||||
|
ExportedObj/
|
||||||
|
.consulo/
|
||||||
|
*.csproj
|
||||||
|
*.unityproj
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
*.tmp
|
||||||
|
*.user
|
||||||
|
*.userprefs
|
||||||
|
*.pidb
|
||||||
|
*.booproj
|
||||||
|
*.svd
|
||||||
|
*.pdb
|
||||||
|
*.mdb
|
||||||
|
*.opendb
|
||||||
|
*.VC.db
|
||||||
|
|
||||||
|
# Unity3D generated meta files
|
||||||
|
*.pidb.meta
|
||||||
|
*.pdb.meta
|
||||||
|
*.mdb.meta
|
||||||
|
|
||||||
|
# Unity3D generated file on crash reports
|
||||||
|
sysinfo.txt
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Builds
|
||||||
|
*.apk
|
||||||
|
*.aab
|
||||||
|
*.unitypackage
|
||||||
|
*.unitypackage.meta
|
||||||
|
*.app
|
||||||
|
|
||||||
|
# Crashlytics generated file
|
||||||
|
crashlytics-build.properties
|
||||||
|
|
||||||
|
# TestRunner generated files
|
||||||
|
InitTestScene*.unity*
|
||||||
|
|
||||||
|
# Addressables default ignores, before user customizations
|
||||||
|
/ServerData
|
||||||
|
/[Aa]ssets/StreamingAssets/aa*
|
||||||
|
/[Aa]ssets/AddressableAssetsData/link.xml*
|
||||||
|
/[Aa]ssets/Addressables_Temp*
|
||||||
|
# By default, Addressables content builds will generate addressables_content_state.bin
|
||||||
|
# files in platform-specific subfolders, for example:
|
||||||
|
# /Assets/AddressableAssetsData/OSX/addressables_content_state.bin
|
||||||
|
/[Aa]ssets/AddressableAssetsData/*/*.bin*
|
||||||
|
|
||||||
|
# Visual Scripting auto-generated files
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db.meta
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers.meta
|
||||||
|
|
||||||
|
# Auto-generated scenes by play mode tests
|
||||||
|
/[Aa]ssets/[Ii]nit[Tt]est[Ss]cene*.unity*
|
||||||
|
|||||||
@@ -7,18 +7,34 @@ using Google.FlatBuffers;
|
|||||||
|
|
||||||
public class ControlLibrary : MonoBehaviour
|
public class ControlLibrary : MonoBehaviour
|
||||||
{
|
{
|
||||||
[DllImport("libcontrol")]
|
[DllImport("libc_control")]
|
||||||
public static extern void init();
|
public static extern void init();
|
||||||
|
|
||||||
[DllImport("libcontrol")]
|
[DllImport("libc_control")]
|
||||||
public static extern void cleanup();
|
public static extern void cleanup();
|
||||||
|
|
||||||
[DllImport("libcontrol")]
|
[DllImport("libc_control")]
|
||||||
public static extern int send_angle_control(int module_id, int angle);
|
public static extern int send_angle_control(int module_id, int angle);
|
||||||
|
|
||||||
[DllImport("libcontrol")]
|
[DllImport("libc_control")]
|
||||||
private static extern IntPtr get_configuration(out int module_id); // the data this points to will be invalidated when called again
|
private static extern IntPtr get_configuration(out int module_id); // the data this points to will be invalidated when called again
|
||||||
|
|
||||||
|
[DllImport("libc_control")]
|
||||||
|
public static extern bool control_sentry_init(
|
||||||
|
string dsn,
|
||||||
|
string environment,
|
||||||
|
string release
|
||||||
|
);
|
||||||
|
|
||||||
|
[DllImport("libc_control")]
|
||||||
|
public static extern void control_sentry_set_app_info(
|
||||||
|
string app_name,
|
||||||
|
string app_version,
|
||||||
|
string build_number);
|
||||||
|
|
||||||
|
[DllImport("libc_control")]
|
||||||
|
public static extern void control_sentry_shutdown();
|
||||||
|
|
||||||
|
|
||||||
public static Frontend.RobotConfiguration getRobotConfiguration() // this is not thread safe
|
public static Frontend.RobotConfiguration getRobotConfiguration() // this is not thread safe
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
@@ -1,63 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2e245339cbf750a4f9521fd4f064e92f
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 1
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
: Any
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
Exclude Editor: 0
|
|
||||||
Exclude Linux64: 0
|
|
||||||
Exclude OSXUniversal: 0
|
|
||||||
Exclude Win: 0
|
|
||||||
Exclude Win64: 0
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
OS: Windows
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1e106a4fd65ba469d815025f404d1916
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -6,7 +6,13 @@ public class DiscoveryButton : MonoBehaviour
|
|||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
ControlLibrary.init(); // todo: where should this be? needs to be somewhere on startup of the game.
|
// todo: where should this be? needs to be somewhere on startup of the game.
|
||||||
|
|
||||||
|
// Sentry is used for crash logging
|
||||||
|
ControlLibrary.control_sentry_init("https://945ddf43f243019f176a8b6171cf534a@o4505559031545856.ingest.us.sentry.io/4510490606567424", "env", "rel");
|
||||||
|
ControlLibrary.control_sentry_set_app_info("unity", "1", "1");
|
||||||
|
|
||||||
|
ControlLibrary.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnDiscoveryPressed()
|
public void OnDiscoveryPressed()
|
||||||
@@ -26,5 +32,6 @@ public class DiscoveryButton : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Debug.Log("Cleaning up native resources");
|
Debug.Log("Cleaning up native resources");
|
||||||
ControlLibrary.cleanup();
|
ControlLibrary.cleanup();
|
||||||
|
ControlLibrary.control_sentry_shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user