aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-05-02 17:18:27 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-05-02 17:18:27 +0300
commit93c300c43ee9978c16edddf6ec06965e4fe91b6a (patch)
treec1ab450d019a63837222da0749af05b7f56f3a6f /Software
parent702be0f8634c3012a1a5e833eeadd37bc7d06181 (diff)
downloadTango-93c300c43ee9978c16edddf6ec06965e4fe91b6a.tar.gz
Tango-93c300c43ee9978c16edddf6ec06965e4fe91b6a.zip
Working on TCC...
Diffstat (limited to 'Software')
-rw-r--r--Software/Android_Studio/ColorCapture/app/build.gradle2
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java123
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/ViewModelBase.java21
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/navigation/AndroidNavigationProvider.java29
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragment.java22
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java3
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java59
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/web/TCCService.java26
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_primary_background.xml1
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/res/drawable/gradient_progress.xml23
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml4
-rw-r--r--Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_send_to_machine.xml18
-rw-r--r--Software/DB/PPC/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/PPC/Tango_log.ldfbin53673984 -> 53673984 bytes
-rw-r--r--Software/DB/TCC/TCC.mdfbin8388608 -> 8388608 bytes
-rw-r--r--Software/DB/TCC/TCC_log.ldfbin8388608 -> 8388608 bytes
-rw-r--r--Software/Graphics/Mobile/zeplin/drawable-hdpi/snapmatch.pngbin0 -> 181461 bytes
-rw-r--r--Software/Graphics/Mobile/zeplin/drawable-mdpi/snapmatch.pngbin0 -> 98923 bytes
-rw-r--r--Software/Graphics/Mobile/zeplin/drawable-xhdpi/snapmatch.pngbin0 -> 281457 bytes
-rw-r--r--Software/Graphics/Mobile/zeplin/drawable-xxhdpi/snapmatch.pngbin0 -> 550027 bytes
-rw-r--r--Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/snapmatch.pngbin0 -> 894264 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml35
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedViewVM.cs16
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/snapmatch.pngbin0 -> 181461 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj13
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs51
-rw-r--r--Software/Visual_Studio/Tango.Integration/ExternalBridge/ColorProfileRequestEventArgs.cs35
-rw-r--r--Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs49
-rw-r--r--Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs5
-rw-r--r--Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj3
-rw-r--r--Software/Visual_Studio/Tango.PMR/Common/MessageType.cs123
32 files changed, 517 insertions, 172 deletions
diff --git a/Software/Android_Studio/ColorCapture/app/build.gradle b/Software/Android_Studio/ColorCapture/app/build.gradle
index be070a573..7b8adc999 100644
--- a/Software/Android_Studio/ColorCapture/app/build.gradle
+++ b/Software/Android_Studio/ColorCapture/app/build.gradle
@@ -23,7 +23,7 @@ android {
buildTypes {
debug {
- buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://10.100.102.46:45455/api/\""
+ buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://192.168.1.86:45455/api/\""
buildConfigField "String", "WEB_SERVICE_APP_ID", "\"Tdf793i4ughsiduf8749509237885ehgfdlkghlT\""
}
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java
index 3d4d80ccf..b2ccc16dc 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java
+++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java
@@ -3,6 +3,7 @@ package com.twine.colorcapture.integration;
import com.google.protobuf.ByteString;
import com.twine.colorcapture.core.IAction;
import com.twine.colorcapture.core.IAction1;
+import com.twine.colorcapture.core.Task;
import com.twine.colorcapture.web.messages.DetectionColor;
import com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer;
import com.twine.tango.pmr.common.MessageTypeOuterClass;
@@ -25,79 +26,87 @@ public class ExternalBridgeClient
public void sendColorProfile(ExternalBridgeMachine machine, DetectionColor detectionColor, IAction success, IAction1<Exception> error)
{
- try
+ Thread t = new Thread(() ->
{
- Socket tcpClient = new Socket();
- tcpClient.connect(new InetSocketAddress(machine.getIpAddress(), EXTERNAL_BRIDGE_PORT), 2000);
+ try
+ {
+ Socket tcpClient = new Socket();
+ tcpClient.connect(new InetSocketAddress(machine.getIpAddress(), EXTERNAL_BRIDGE_PORT), 2000);
- //Create detection color
- DetectionColorOuterClass.DetectionColor.Builder color = DetectionColorOuterClass.DetectionColor.newBuilder();
- color.setR(detectionColor.getR());
- color.setG(detectionColor.getG());
- color.setB(detectionColor.getB());
+ //Create detection color
+ DetectionColorOuterClass.DetectionColor.Builder color = DetectionColorOuterClass.DetectionColor.newBuilder();
+ color.setR(detectionColor.getR());
+ color.setG(detectionColor.getG());
+ color.setB(detectionColor.getB());
- //Create Message
- ColorProfileRequest.Builder message = ColorProfileRequest.newBuilder();
- message.setAppID("SnapMatch");
- message.setDetectionColor(color);
+ //Create Message
+ ColorProfileRequest.Builder message = ColorProfileRequest.newBuilder();
+ message.setAppID("SnapMatch");
+ message.setDetectionColor(color);
- //Create container
- MessageContainer.Builder container = MessageContainer.newBuilder();
- container.setToken(UUID.randomUUID().toString());
- container.setType(MessageTypeOuterClass.MessageType.ColorProfileRequest);
- container.setData(ByteString.copyFrom(message.build().toByteArray()));
+ //Create container
+ MessageContainer.Builder container = MessageContainer.newBuilder();
+ container.setToken(UUID.randomUUID().toString());
+ container.setType(MessageTypeOuterClass.MessageType.ColorProfileRequest);
+ container.setData(ByteString.copyFrom(message.build().toByteArray()));
- //Create data
- byte[] data = container.build().toByteArray();
- byte[] size = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(data.length).array();
- byte[] packet = concatByteArrays(size, data);
+ //Create data
+ byte[] data = container.build().toByteArray();
+ byte[] size = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(data.length).array();
+ byte[] packet = concatByteArrays(size, data);
- //Write data
- tcpClient.getOutputStream().write(packet);
+ //Write data
+ tcpClient.getOutputStream().write(packet);
- //Wait for response...
- InputStream stream = tcpClient.getInputStream();
+ //Wait for response...
+ InputStream stream = tcpClient.getInputStream();
- //Initializing expected message size.
- size = new byte[4];
+ //Initializing expected message size.
+ size = new byte[4];
- //Block reading from socket.
- int read = stream.read(size, 0, size.length);
- if (read == -1)
- {
- throw new SocketException("Error reading from TCP adapter.");
- }
+ //Block reading from socket.
+ int read = stream.read(size, 0, size.length);
+ if (read == -1)
+ {
+ throw new SocketException("Error reading from TCP adapter.");
+ }
- //Get expected size.
- int expectedSize = ByteBuffer.wrap(size).order(ByteOrder.LITTLE_ENDIAN).getInt();
+ //Get expected size.
+ int expectedSize = ByteBuffer.wrap(size).order(ByteOrder.LITTLE_ENDIAN).getInt();
- //Init response message size.
- data = new byte[expectedSize];
- read = 0;
+ //Init response message size.
+ data = new byte[expectedSize];
+ read = 0;
- //Read the whole message.
- while (read < expectedSize)
- {
- read += stream.read(data, read, Math.min(stream.available(), expectedSize - read));
- }
+ //Read the whole message.
+ while (read < expectedSize)
+ {
+ read += stream.read(data, read, Math.min(stream.available(), expectedSize - read));
+ }
- //Init response container and message.
- MessageContainer responseContainer = MessageContainer.parseFrom(data);
- ColorProfileResponse response = ColorProfileResponse.parseFrom(responseContainer.getData());
+ //Init response container and message.
+ MessageContainer responseContainer = MessageContainer.parseFrom(data);
+ ColorProfileResponse response = ColorProfileResponse.parseFrom(responseContainer.getData());
- if (response.getApproved())
+ tcpClient.close();
+
+ if (response.getApproved())
+ {
+ //Approved !!!
+ success.invoke();
+ }
+ else
+ {
+ //Declined
+ error.invoke(new Exception("The machine owner has declined the request."));
+ }
+ }
+ catch (Exception ex)
{
- //Approved !!!
+ error.invoke(ex);
}
-
- tcpClient.close();
-
- success.invoke();
- }
- catch (Exception ex)
- {
- error.invoke(ex);
- }
+ });
+ t.start();
}
private byte[] concatByteArrays(byte[] first, byte[] second)
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/ViewModelBase.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/ViewModelBase.java
index 0f426c912..a9f0550c0 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/ViewModelBase.java
+++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/ViewModelBase.java
@@ -1,7 +1,11 @@
package com.twine.colorcapture.mvvm;
+import android.os.Handler;
+import android.os.Looper;
import android.util.Log;
+import com.twine.colorcapture.core.IAction;
+
import java.lang.reflect.Field;
/**
@@ -55,6 +59,23 @@ public abstract class ViewModelBase<T extends IView> extends ExtendedObject
}
}
+ protected void invokeUI(IAction action)
+ {
+ Handler handler = new Handler(Looper.getMainLooper());
+ handler.post(new Runnable() {
+ public void run() {
+ try
+ {
+ action.invoke();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ });
+ }
+
protected void onNavigatedTo()
{
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/navigation/AndroidNavigationProvider.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/navigation/AndroidNavigationProvider.java
index 923dc41b2..5924c17d9 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/navigation/AndroidNavigationProvider.java
+++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/navigation/AndroidNavigationProvider.java
@@ -224,27 +224,32 @@ public class AndroidNavigationProvider extends ExtendedObject implements INaviga
final FragmentBase fragmentTo = fragment;
final FragmentBase fragmentFrom = currentFragment;
- activity.runOnUiThread(() ->
+ fragment.setOnCreateListener((f) ->
{
- if (fragmentTo.getVM() instanceof INavigationObjectReceiver)
+ activity.runOnUiThread(() ->
{
- ((INavigationObjectReceiver)fragmentTo.getVM()).onNavigationObjectReceived(navigationObject);
- }
+ if (fragmentTo.getVM() instanceof INavigationObjectReceiver && navigationObject != null)
+ {
+ ((INavigationObjectReceiver)fragmentTo.getVM()).onNavigationObjectReceived(navigationObject);
+ }
- new Handler().postDelayed(() ->
- {
+ new Handler().postDelayed(() ->
+ {
- fragmentTo.getVM().notifyNavigatedTo();
+ fragmentTo.getVM().notifyNavigatedTo();
- if (fragmentFrom != null && !fragmentTo.getClass().getSimpleName().equals(fragmentFrom.getClass().getSimpleName()))
- {
- fragmentFrom.getVM().notifyNavigatedFrom();
- }
+ if (fragmentFrom != null && !fragmentTo.getClass().getSimpleName().equals(fragmentFrom.getClass().getSimpleName()))
+ {
+ fragmentFrom.getVM().notifyNavigatedFrom();
+ }
- }, 300);
+ }, 300);
+ });
});
+
+
// try
// {
// //noinspection ConstantConditions
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragment.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragment.java
index 4da73e988..fa8c1cde5 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragment.java
+++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragment.java
@@ -272,17 +272,17 @@ public class CaptureFragment extends FragmentBase<FragmentCaptureBinding, Captur
parameters = camera.getParameters();
- List<Size> sizes = parameters.getSupportedPreviewSizes();
-
- for (Camera.Size size : parameters.getSupportedPreviewSizes())
- {
- if (size.width >= 1200 & size.width <= 1280)
- {
- parameters.setPreviewSize(1280, 720);
- parameters.setPictureSize(1280, 720);
- break;
- }
- }
+// List<Size> sizes = parameters.getSupportedPreviewSizes();
+//
+// for (Camera.Size size : parameters.getSupportedPreviewSizes())
+// {
+// if (size.width >= 1200 & size.width <= 1280)
+// {
+// parameters.setPreviewSize(1280, 720);
+// parameters.setPictureSize(1280, 720);
+// break;
+// }
+// }
imageFormat = parameters.getPreviewFormat();
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java
index e9c6c3878..b043bef9f 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java
+++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java
@@ -155,7 +155,7 @@ public class CaptureFragmentVM extends ViewModelBase<ICaptureFragment> implement
DetectionResponse response = tccService.detect(sampleBitmap, barcode);
- ThreadingUtils.sleep(5000);
+ ThreadingUtils.sleep(1000);
isDetecting.set(false);
@@ -166,6 +166,7 @@ public class CaptureFragmentVM extends ViewModelBase<ICaptureFragment> implement
}
else
{
+ isCardDetected.set(false);
onNavigatedTo();
}
}
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java
index b89b3cdb9..0d415b498 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java
+++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java
@@ -9,6 +9,7 @@ import android.widget.AdapterView;
import com.twine.colorcapture.BR;
import com.twine.colorcapture.R;
+import com.twine.colorcapture.integration.ExternalBridgeClient;
import com.twine.colorcapture.integration.ExternalBridgeMachine;
import com.twine.colorcapture.integration.ExternalBridgeScanner;
import com.twine.colorcapture.mvvm.ViewModelBase;
@@ -17,6 +18,8 @@ import com.twine.colorcapture.navigation.INavigationProvider;
import com.twine.colorcapture.notification.INotificationProvider;
import com.twine.colorcapture.web.messages.DetectionColor;
+import java.util.concurrent.atomic.AtomicBoolean;
+
import javax.inject.Inject;
import me.tatarka.bindingcollectionadapter2.ItemBinding;
@@ -24,6 +27,9 @@ import me.tatarka.bindingcollectionadapter2.ItemBinding;
public class SendToMachineFragmentVM extends ViewModelBase<ISendToMachineFragment> implements INavigationObjectReceiver<DetectionColor>
{
private ExternalBridgeScanner scanner;
+ private DetectionColor detectionColor;
+ private INotificationProvider notificationProvider;
+ private INavigationProvider navigationProvider;
public ObservableList<ExternalBridgeMachine> machines;
public ItemBinding<String> machineBinding;
@@ -31,6 +37,9 @@ public class SendToMachineFragmentVM extends ViewModelBase<ISendToMachineFragmen
@Inject
public SendToMachineFragmentVM(INotificationProvider notificationProvider, INavigationProvider navigationProvider)
{
+ this.notificationProvider = notificationProvider;
+ this.navigationProvider = navigationProvider;
+
machines = new ObservableArrayList<>();
scanner = new ExternalBridgeScanner();
machineBinding = ItemBinding.of(BR.machine, R.layout.external_machine_item);
@@ -41,21 +50,17 @@ public class SendToMachineFragmentVM extends ViewModelBase<ISendToMachineFragmen
private void onMachineDisconnected(Object o, ExternalBridgeMachine machine)
{
- Handler handler = new Handler(Looper.getMainLooper());
- handler.post(new Runnable() {
- public void run() {
- machines.remove(machine);
- }
+ invokeUI(() ->
+ {
+ machines.remove(machine);
});
}
private void onMachineDiscovered(Object o, ExternalBridgeMachine machine)
{
- Handler handler = new Handler(Looper.getMainLooper());
- handler.post(new Runnable() {
- public void run() {
- machines.add(0, machine);
- }
+ invokeUI(() ->
+ {
+ machines.add(0, machine);
});
}
@@ -78,12 +83,42 @@ public class SendToMachineFragmentVM extends ViewModelBase<ISendToMachineFragmen
@Override
public void onNavigationObjectReceived(DetectionColor detectionColor)
{
- DetectionColor color = detectionColor;
+ this.detectionColor = detectionColor;
}
public void onMachineSelected(AdapterView<?> adapterView, View view, int i, long l)
{
ExternalBridgeMachine machine = (ExternalBridgeMachine) adapterView.getAdapter().getItem(i);
- ExternalBridgeMachine m = machine;
+
+ AtomicBoolean canceled = new AtomicBoolean(false);
+
+ notificationProvider.showProgress("Send To Machine", "Sending your color...", (vm) ->
+ {
+ canceled.set(true);
+ });
+
+ ExternalBridgeClient client = new ExternalBridgeClient();
+ client.sendColorProfile(machine, detectionColor, () ->
+ {
+ if (!canceled.get())
+ {
+ invokeUI(() ->
+ {
+ notificationProvider.showSuccess("Sending To Machine", "Color sent successfully.", null);
+ navigationProvider.navigateBack();
+ });
+ }
+
+ }, (ex) ->
+ {
+ if (!canceled.get())
+ {
+ invokeUI(() ->
+ {
+ notificationProvider.showError("Sending To Machine", ex.getMessage(), null);
+ navigationProvider.navigateBack();
+ });
+ }
+ });
}
}
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/web/TCCService.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/web/TCCService.java
index 6ecb815b7..6e03755b8 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/web/TCCService.java
+++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/web/TCCService.java
@@ -1,6 +1,9 @@
package com.twine.colorcapture.web;
+import android.content.SharedPreferences;
import android.graphics.Bitmap;
+import android.os.Build;
+import android.provider.Settings;
import android.util.Base64;
import com.twine.colorcapture.BuildConfig;
@@ -15,17 +18,22 @@ import com.twine.colorcapture.web.messages.MachineRegistrationRequest;
import com.twine.colorcapture.web.messages.MachineRegistrationResponse;
import java.io.IOException;
+import java.util.UUID;
import javax.inject.Inject;
import retrofit2.HttpException;
import retrofit2.Response;
+import static android.content.Context.MODE_PRIVATE;
+import static com.twine.colorcapture.App.getContext;
+
public class TCCService implements ITCCService
{
private DefinitionResponse definition;
private IWebServiceAPI webAPI;
private LoginResponse loginResponse;
+ private static final String DEVICE_ID_PREF_NAME = "DeviceIdFile";
@Inject
public TCCService(IWebServiceAPI webServiceAPI)
@@ -109,7 +117,23 @@ public class TCCService implements ITCCService
{
LoginRequest request = new LoginRequest();
request.setAppId(BuildConfig.WEB_SERVICE_APP_ID);
- request.setDeviceId("1234");
+
+ String deviceId;
+
+ SharedPreferences prefs = getContext().getSharedPreferences(DEVICE_ID_PREF_NAME, MODE_PRIVATE);
+ deviceId = prefs.getString("DeviceId", null);
+
+ if (deviceId == null)
+ {
+ deviceId = UUID.randomUUID().toString();
+ SharedPreferences.Editor editor = getContext().getSharedPreferences(DEVICE_ID_PREF_NAME, MODE_PRIVATE).edit();
+ editor.putString("DeviceId", deviceId);
+ editor.apply();
+ }
+
+ request.setDeviceId(deviceId);
+ request.setDevice(Build.MANUFACTURER + " " + Build.MODEL);
+ request.setOsVersion(Build.VERSION_CODES.class.getFields()[android.os.Build.VERSION.SDK_INT].getName());
Response<LoginResponse> response = webAPI.login(request).execute();
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_primary_background.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_primary_background.xml
index 51861f9fe..a69dfcd5e 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_primary_background.xml
+++ b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/border_primary_background.xml
@@ -4,6 +4,7 @@
<layer-list>
<item android:bottom="5dp">
<shape android:shape="rectangle">
+ <stroke android:color="#979797" android:width="1dp" />
<solid android:color="@color/colorPrimaryBackground"/>
<corners android:radius="5dp" />
</shape>
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/gradient_progress.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/gradient_progress.xml
new file mode 100644
index 000000000..b942480f0
--- /dev/null
+++ b/Software/Android_Studio/ColorCapture/app/src/main/res/drawable/gradient_progress.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background">
+ <shape>
+ <corners android:radius="5dp"/>
+ <solid android:color="#fff"/>
+ </shape>
+ </item>
+
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape>
+ <corners android:radius="5dp"/>
+ <gradient
+ android:endColor="@color/colorGradientAccent1"
+ android:startColor="@color/colorGradientAccent2"
+ />
+ </shape>
+ </clip>
+ </item>
+
+</layer-list> \ No newline at end of file
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml
index a6ea50d88..a4c4affc8 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml
+++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_capture.xml
@@ -88,8 +88,8 @@
android:layout_width="match_parent"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
- android:layout_height="5dp"
- android:background="@color/colorPrimary"
+ android:layout_height="2dp"
+ android:background="@color/colorGradientAccent2"
android:visibility="@{vm.isCardDetected ? View.GONE : View.VISIBLE}"/>
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_send_to_machine.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_send_to_machine.xml
index 0e9fba276..6881b50ff 100644
--- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_send_to_machine.xml
+++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/fragment_send_to_machine.xml
@@ -36,16 +36,28 @@
android:layout_height="wrap_content"
android:layout_below="@id/txtTitle"
android:layout_gravity="center"
+ android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:fontFamily="@font/flexo_light"
android:letterSpacing="0.07"
- android:text="Scanning for machines on your local network..."
- android:textSize="17.3sp" />
+ android:text="Scanning your local network..."
+ android:textSize="15.3sp" />
+
+ <ProgressBar
+ android:layout_below="@id/txtScanning"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:id="@+id/scanProgress"
+ android:layout_width="match_parent"
+ android:layout_height="4dp"
+ android:layout_marginTop="5dp"
+ android:progressDrawable="@drawable/gradient_progress"
+ android:indeterminate="true"
+ tools:progress="100"/>
<ListView
android:id="@+id/listResults"
android:layout_marginTop="10dp"
- android:layout_below="@id/txtScanning"
+ android:layout_below="@id/scanProgress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="none"
diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf
index a5e2a9840..0fc4b64c3 100644
--- a/Software/DB/PPC/Tango.mdf
+++ b/Software/DB/PPC/Tango.mdf
Binary files differ
diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf
index e8b6bafb7..4f43b9c7e 100644
--- a/Software/DB/PPC/Tango_log.ldf
+++ b/Software/DB/PPC/Tango_log.ldf
Binary files differ
diff --git a/Software/DB/TCC/TCC.mdf b/Software/DB/TCC/TCC.mdf
index bccfddb93..f75889225 100644
--- a/Software/DB/TCC/TCC.mdf
+++ b/Software/DB/TCC/TCC.mdf
Binary files differ
diff --git a/Software/DB/TCC/TCC_log.ldf b/Software/DB/TCC/TCC_log.ldf
index 96abe49bd..0efa971ca 100644
--- a/Software/DB/TCC/TCC_log.ldf
+++ b/Software/DB/TCC/TCC_log.ldf
Binary files differ
diff --git a/Software/Graphics/Mobile/zeplin/drawable-hdpi/snapmatch.png b/Software/Graphics/Mobile/zeplin/drawable-hdpi/snapmatch.png
new file mode 100644
index 000000000..05656ffdc
--- /dev/null
+++ b/Software/Graphics/Mobile/zeplin/drawable-hdpi/snapmatch.png
Binary files differ
diff --git a/Software/Graphics/Mobile/zeplin/drawable-mdpi/snapmatch.png b/Software/Graphics/Mobile/zeplin/drawable-mdpi/snapmatch.png
new file mode 100644
index 000000000..bbd2be018
--- /dev/null
+++ b/Software/Graphics/Mobile/zeplin/drawable-mdpi/snapmatch.png
Binary files differ
diff --git a/Software/Graphics/Mobile/zeplin/drawable-xhdpi/snapmatch.png b/Software/Graphics/Mobile/zeplin/drawable-xhdpi/snapmatch.png
new file mode 100644
index 000000000..994d77ffe
--- /dev/null
+++ b/Software/Graphics/Mobile/zeplin/drawable-xhdpi/snapmatch.png
Binary files differ
diff --git a/Software/Graphics/Mobile/zeplin/drawable-xxhdpi/snapmatch.png b/Software/Graphics/Mobile/zeplin/drawable-xxhdpi/snapmatch.png
new file mode 100644
index 000000000..198fb9f6f
--- /dev/null
+++ b/Software/Graphics/Mobile/zeplin/drawable-xxhdpi/snapmatch.png
Binary files differ
diff --git a/Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/snapmatch.png b/Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/snapmatch.png
new file mode 100644
index 000000000..7bf802396
--- /dev/null
+++ b/Software/Graphics/Mobile/zeplin/drawable-xxxhdpi/snapmatch.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml
new file mode 100644
index 000000000..83c90f5ed
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml
@@ -0,0 +1,35 @@
+<UserControl x:Class="Tango.PPC.Jobs.Dialogs.ColorProfileReceivedView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Tango.PPC.Jobs.Dialogs"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ mc:Ignorable="d"
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DesignHeight="555" d:DesignWidth="560" Width="570" Height="700" d:DataContext="{d:DesignInstance Type=local:ColorProfileReceivedViewVM, IsDesignTimeCreatable=False}">
+ <Grid Margin="20">
+ <DockPanel>
+ <Grid DockPanel.Dock="Bottom">
+ <touch:TouchButton HorizontalAlignment="Left" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">DECLINE</touch:TouchButton>
+ <touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">APPROVE</touch:TouchButton>
+ </Grid>
+ <StackPanel DockPanel.Dock="Top">
+ <Image Source="../Images/snapmatch.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform" Height="120"></Image>
+ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoHeaderFontSize}">New SnapMatch Color</TextBlock>
+ <TextBlock Margin="20 10" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
+ A SnapMatch user is trying to send you a color detection result. Press 'Approve' to create a new job from this color.
+ </TextBlock>
+ </StackPanel>
+ <Grid>
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+ <TextBlock FontSize="{StaticResource TangoTitleFontSize}">Detected Color</TextBlock>
+ <Ellipse Width="100" Height="100" Margin="0 20 0 0">
+ <Ellipse.Fill>
+ <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
+ </Ellipse.Fill>
+ </Ellipse>
+ </StackPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml.cs
new file mode 100644
index 000000000..66ed6e334
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.PPC.Jobs.Dialogs
+{
+ /// <summary>
+ /// Interaction logic for ImportJobView.xaml
+ /// </summary>
+ public partial class ColorProfileReceivedView : UserControl
+ {
+ public ColorProfileReceivedView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedViewVM.cs
new file mode 100644
index 000000000..31e664825
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ColorProfileReceivedViewVM.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using Tango.Core.Commands;
+using Tango.SharedUI;
+
+namespace Tango.PPC.Jobs.Dialogs
+{
+ public class ColorProfileReceivedViewVM : DialogViewVM
+ {
+ public Color Color { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/snapmatch.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/snapmatch.png
new file mode 100644
index 000000000..05656ffdc
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/snapmatch.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
index 6e61e9330..792e32521 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
@@ -95,6 +95,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Dialogs\ColorProfileReceivedView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Dialogs\ImportJobView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -173,9 +177,13 @@
<DependentUpon>FineTuningPaletteView.xaml</DependentUpon>
</Compile>
<Compile Include="Dialogs\FineTuningPaletteViewVM.cs" />
+ <Compile Include="Dialogs\ColorProfileReceivedView.xaml.cs">
+ <DependentUpon>ColorProfileReceivedView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Dialogs\ImportJobView.xaml.cs">
<DependentUpon>ImportJobView.xaml</DependentUpon>
</Compile>
+ <Compile Include="Dialogs\ColorProfileReceivedViewVM.cs" />
<Compile Include="Dialogs\ImportJobViewVM.cs" />
<Compile Include="Dialogs\JobCreationView.xaml.cs">
<DependentUpon>JobCreationView.xaml</DependentUpon>
@@ -409,10 +417,13 @@
<ItemGroup>
<Resource Include="Images\NewJob\volume.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\snapmatch.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
index 565b7c7c3..2ea3b98b8 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
@@ -28,6 +28,8 @@ using System.IO;
using Google.Protobuf;
using Tango.PMR.Exports;
using Tango.Settings;
+using Tango.Integration.ExternalBridge;
+using System.Windows.Media;
namespace Tango.PPC.Jobs.ViewModels
{
@@ -218,7 +220,7 @@ namespace Tango.PPC.Jobs.ViewModels
});
ClearSelectionCommand = new RelayCommand(ClearSelection);
- AddJobCommand = new RelayCommand(AddNewJob);
+ AddJobCommand = new RelayCommand(() => AddNewJob());
DeleteJobsCommand = new RelayCommand(() => DeleteJobs(SelectedJobs));
CloneJobsCommand = new RelayCommand(() => CloneJobs(SelectedJobs));
ExportJobCommand = new RelayCommand(ExportJob);
@@ -374,7 +376,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Adds a new job.
/// </summary>
- private async void AddNewJob()
+ private async void AddNewJob(Color? colorProfile = null)
{
try
{
@@ -408,6 +410,12 @@ namespace Tango.PPC.Jobs.ViewModels
vm.SelectedColorSpace = space.IsUserSpace() ? space : ColorSpaces.Twine;
}
+ if (colorProfile != null)
+ {
+ vm.SupportedColorSpaces = new List<ColorSpaces>() { ColorSpaces.RGB };
+ vm.SelectedColorSpace = vm.SupportedColorSpaces.First();
+ }
+
if (machine.SupportedJobTypes.Count != 1 || machine.SupportedColorSpaces.Count != 1)
{
vm = await NotificationProvider.ShowDialog<JobCreationViewVM>(vm);
@@ -444,7 +452,14 @@ namespace Tango.PPC.Jobs.ViewModels
job.JobIndex = Jobs.Max(x => x.JobIndex) + 1;
}
- job.AddSolidSegment(machine.DefaultSegmentLength > 0 ? machine.DefaultSegmentLength : 100);
+ if (colorProfile == null)
+ {
+ job.AddSolidSegment(machine.DefaultSegmentLength > 0 ? machine.DefaultSegmentLength : 100);
+ }
+ else
+ {
+ job.AddSolidSegment(colorProfile.Value, machine.DefaultSegmentLength > 0 ? machine.DefaultSegmentLength : 100);
+ }
_db.Jobs.Add(job);
@@ -598,6 +613,8 @@ namespace Tango.PPC.Jobs.ViewModels
public override void OnApplicationStarted()
{
LoadJobs();
+
+ ExternalBridgeService.ColorProfileRequest += ExternalBridgeService_ColorProfileRequest;
}
public override void OnApplicationReady()
@@ -696,5 +713,33 @@ namespace Tango.PPC.Jobs.ViewModels
}
#endregion
+
+ #region Color Profile Request
+
+ private void ExternalBridgeService_ColorProfileRequest(object sender, ColorProfileRequestEventArgs e)
+ {
+ InvokeUI(async () =>
+ {
+ var vm = await NotificationProvider.ShowDialog<ColorProfileReceivedViewVM>(new ColorProfileReceivedViewVM()
+ {
+ Color = Color.FromRgb(
+ (byte)e.Request.DetectionColor.R,
+ (byte)e.Request.DetectionColor.G,
+ (byte)e.Request.DetectionColor.B),
+ });
+
+ if (vm.DialogResult)
+ {
+ e.Approve();
+ AddNewJob(vm.Color);
+ }
+ else
+ {
+ e.Decline();
+ }
+ });
+ }
+
+ #endregion
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ColorProfileRequestEventArgs.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ColorProfileRequestEventArgs.cs
new file mode 100644
index 000000000..dcb20381c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ColorProfileRequestEventArgs.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PMR.Integration;
+using Tango.PMR.TCC;
+
+namespace Tango.Integration.ExternalBridge
+{
+ public class ColorProfileRequestEventArgs : EventArgs
+ {
+ private Action _approve;
+ private Action _decline;
+
+ public ColorProfileRequest Request { get; set; }
+
+ public ColorProfileRequestEventArgs(ColorProfileRequest request, Action approve, Action decline)
+ {
+ Request = request;
+ _approve = approve;
+ _decline = decline;
+ }
+
+ public void Approve()
+ {
+ _approve.Invoke();
+ }
+
+ public void Decline()
+ {
+ _decline.Invoke();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
index 76c0b9541..abd2f4015 100644
--- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
+++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs
@@ -45,6 +45,11 @@ namespace Tango.Integration.ExternalBridge
/// </summary>
public event EventHandler ClientDisconnected;
+ /// <summary>
+ /// Occurs when the service has received a new color profile request.
+ /// </summary>
+ public event EventHandler<ColorProfileRequestEventArgs> ColorProfileRequest;
+
#endregion
#region Properties
@@ -122,8 +127,6 @@ namespace Tango.Integration.ExternalBridge
/// </summary>
public ExternalBridgeService()
{
- UseKeepAlive = true;
-
var settings = SettingsManager.Default.GetOrCreate<IntegrationSettings>();
_discovery_port = settings.ExternalBridgeServiceDiscoveryPort;
@@ -202,10 +205,17 @@ namespace Tango.Integration.ExternalBridge
/// <param name="e">The <see cref="ClientConnectedEventArgs"/> instance containing the event data.</param>
private async void _tcpServer_ClientConnected(object sender, ClientConnectedEventArgs e)
{
- LogManager.Log("External bridge client connected from: " + e.Socket.GetIPAddress());
-
- Adapter = new TcpTransportAdapter(e.Socket);
- await Connect();
+ if (!IsInSession)
+ {
+ UseKeepAlive = false;
+ LogManager.Log("External bridge client connected from: " + e.Socket.GetIPAddress());
+ Adapter = new TcpTransportAdapter(e.Socket);
+ await Connect();
+ }
+ else
+ {
+ e.Socket.Dispose();
+ }
}
/// <summary>
@@ -352,6 +362,10 @@ namespace Tango.Integration.ExternalBridge
{
OnExternalBridgeLoginRequest(container);
}
+ else if (container.Type == MessageType.ColorProfileRequest)
+ {
+ OnColorProfileRequest(container);
+ }
}
}
}
@@ -530,7 +544,6 @@ namespace Tango.Integration.ExternalBridge
protected async virtual void OnExternalBridgeLoginRequest(MessageContainer container)
{
-
var request = MessageFactory.ParseTangoMessageFromContainer<ExternalBridgeLoginRequest>(container);
LogManager.Log($"External bridge login attempt:\nIntent: {request.Message.Intent}\nMessage:\n{request.Message.ToJsonString()}");
@@ -552,6 +565,7 @@ namespace Tango.Integration.ExternalBridge
if (IsInSession)
{
LogManager.Log("External bridge client has logged-in successfully.");
+ UseKeepAlive = true;
MachineOperator.EnableDiagnostics = false;
MachineOperator.EnableEmbeddedDebugging = false;
SessionIntent = request.Message.Intent;
@@ -648,6 +662,27 @@ namespace Tango.Integration.ExternalBridge
}
}
+ private void OnColorProfileRequest(MessageContainer container)
+ {
+ var request = MessageFactory.ParseTangoMessageFromContainer<ColorProfileRequest>(container);
+
+ ColorProfileRequestEventArgs e = new ColorProfileRequestEventArgs(request, () =>
+ {
+ //Approved.
+ SendResponse<ColorProfileResponse>(new ColorProfileResponse()
+ {
+ Approved = true
+ }, container.Token);
+ },
+ () =>
+ {
+ //Declined.
+ SendResponse<ColorProfileResponse>(new ColorProfileResponse(), container.Token);
+ });
+
+ ColorProfileRequest?.Invoke(this, e);
+ }
+
#endregion
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs
index 50b09cf4c..c0b41fd00 100644
--- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs
+++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs
@@ -24,6 +24,11 @@ namespace Tango.Integration.ExternalBridge
event EventHandler ClientDisconnected;
/// <summary>
+ /// Occurs when the service has received a new color profile request.
+ /// </summary>
+ event EventHandler<ColorProfileRequestEventArgs> ColorProfileRequest;
+
+ /// <summary>
/// Gets or sets the machine operator.
/// </summary>
IMachineOperator MachineOperator { get; set; }
diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
index 7bea3eccb..377cb04fb 100644
--- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
+++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
@@ -85,6 +85,7 @@
<Compile Include="Diagnostics\DiagnosticsTimeCodeChannel.cs" />
<Compile Include="Diagnostics\DiagnosticsTimeCodeChannelFrame.cs" />
<Compile Include="ExtensionMethods\IExternalBridgeClientExtensions.cs" />
+ <Compile Include="ExternalBridge\ColorProfileRequestEventArgs.cs" />
<Compile Include="ExternalBridge\ExternalBridgeClientConnectedEventArgs.cs" />
<Compile Include="IntegrationSettings.cs" />
<Compile Include="JobRuns\BasicJobRunsLogger.cs" />
@@ -179,7 +180,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
index e731b8ce1..0dc51f01b 100644
--- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
+++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
@@ -22,7 +22,7 @@ namespace Tango.PMR.Common {
static MessageTypeReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirVLgoLTWVz",
+ "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiqKLwoLTWVz",
"c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj",
"dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n",
"cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jl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URlbGV0ZVJlcXVlc3QQ4jYSEwoORGVsZXRlUmVzcG9u",
+ "c2UQ4zYSGgoVR2V0U3RvcmFnZUluZm9SZXF1ZXN0EOQ2EhsKFkdldFN0b3Jh",
+ "Z2VJbmZvUmVzcG9uc2UQ5TYSFAoPR2V0RmlsZXNSZXF1ZXN0EOY2EhUKEEdl",
+ "dEZpbGVzUmVzcG9uc2UQ5zYSGAoTRmlsZURvd25sb2FkUmVxdWVzdBDoNhIZ",
+ "ChRGaWxlRG93bmxvYWRSZXNwb25zZRDpNhIdChhGaWxlQ2h1bmtEb3dubG9h",
+ "ZFJlcXVlc3QQ6jYSHgoZRmlsZUNodW5rRG93bmxvYWRSZXNwb25zZRDrNhIb",
+ "ChZWYWxpZGF0ZVZlcnNpb25SZXF1ZXN0EOw2EhwKF1ZhbGlkYXRlVmVyc2lv",
+ "blJlc3BvbnNlEO02EhsKFkFjdGl2YXRlVmVyc2lvblJlcXVlc3QQ7jYSHAoX",
+ "QWN0aXZhdGVWZXJzaW9uUmVzcG9uc2UQ7zYSGQoURGlzcGVuc2VyRGF0YVJl",
+ "cXVlc3QQwD4SGgoVRGlzcGVuc2VyRGF0YVJlc3BvbnNlEME+QhwKGmNvbS50",
+ "d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null));
@@ -298,6 +299,8 @@ namespace Tango.PMR.Common {
[pbr::OriginalName("StartApplicationLogsResponse")] StartApplicationLogsResponse = 1010,
[pbr::OriginalName("StopApplicationLogsRequest")] StopApplicationLogsRequest = 1011,
[pbr::OriginalName("StopApplicationLogsResponse")] StopApplicationLogsResponse = 1012,
+ [pbr::OriginalName("ColorProfileRequest")] ColorProfileRequest = 1013,
+ [pbr::OriginalName("ColorProfileResponse")] ColorProfileResponse = 1014,
/// <summary>
///Diagnostics
/// </summary>