[gnome-color-manager: 22/80] huey: try to work out what commands 02 and 03 do...
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager: 22/80] huey: try to work out what commands 02 and 03 do...
- Date: Mon, 19 Jul 2010 11:34:18 +0000 (UTC)
commit 4d45f7e4ceb6609d76426fe41465d4fdd103b778
Author: Richard Hughes <richard hughsie com>
Date: Sat Jul 17 22:48:35 2010 +0100
huey: try to work out what commands 02 and 03 do...
src/gcm-huey-example.c | 31 +++++++++++++++++++++++++++++--
1 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-huey-example.c b/src/gcm-huey-example.c
index 3da349f..4a20c47 100644
--- a/src/gcm-huey-example.c
+++ b/src/gcm-huey-example.c
@@ -47,12 +47,26 @@
* returns: 00 02 00 00 0a 00 00 00 (or)
* 00 02 00 0e c6 80 00 00
* data --^^^^^ ^-- only ever 00 or 80
+ * |
+ * \-- for RGB(00,00,00) is 09 f2
+ * RGB(ff,ff,ff) is 00 00
+ * RGB(ff,00,00) is 00 11
+ * RGB(00,ff,00) is 00 06
+ * RGB(00,00,ff) is 00 06
*
- * only when profiling */
+ * only when profiling
+ * has to be preceeded by HUEY_COMMAND_UNKNOWN_16 (00 01 00 01 00 01 7f) */
#define HUEY_COMMAND_UNKNOWN_02 0x02
/* input: 03 02 00 0f c1 80 00 00
* returns: 00 03 00 0f 18 00 00 00
+ * data --^^^^^ ^-- only ever 00 or 80
+ * |
+ * \-- for RGB(00,00,00) is 09 64
+ * RGB(ff,ff,ff) is 08 80
+ * RGB(ff,00,00) is 03 22
+ * RGB(00,ff,00) is 00 58
+ * RGB(00,00,ff) is 00 59
*
* Only used when doing profiling */
#define HUEY_COMMAND_UNKNOWN_03 0x03
@@ -490,7 +504,7 @@ if (0) {
}
}
-{
+if (0) {
guchar payload[] = { 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };
g_warning ("moo");
@@ -511,6 +525,19 @@ if (0) {
g_warning ("moo");
}
+/* try to get color value */
+if (1) {
+ guchar setup[] = { 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x7f };
+ guchar payload[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ g_warning ("moo");
+
+ send_command (priv, HUEY_COMMAND_UNKNOWN_16, setup, &error);
+
+ send_command (priv, HUEY_COMMAND_UNKNOWN_02, payload, &error);
+ send_command (priv, HUEY_COMMAND_UNKNOWN_03, payload, &error);
+
+ g_warning ("moo");
+}
/* set LEDs */
ret = send_leds (priv, 0x00, &error);
if (!ret) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]