[concordance-devel] [PATCH] Support the Harmony Touch (v12)
Add the PID for the Touch to the list of MH PIDs. Add the Touch's Skin/Arch to the remote_info structs. Add support for handling the Touch's non-standard serial number, and provide a libconcord call to expose this information. Don't try to read the /cfg/usercfg on the Link/Touch. Remove set_configuration - doesn't seem to be needed and causes problems for Harmony Touch. Add new API methods so that MHGUI can perform a sync operation. Fix WriteFile() so that it reads and responds to the periodic acks. Implement SetTime() for the Touch. Signed-off-by: Scott Talbert --- concordance/concordance.c| 7 +- libconcord/bindings/python/libconcord.py | 27 +++ libconcord/libconcord.cpp| 23 ++ libconcord/libconcord.h | 5 ++ libconcord/libusbhid.cpp | 5 -- libconcord/remote.h | 2 + libconcord/remote_info.h | 15 +++- libconcord/remote_mh.cpp | 126 +-- 8 files changed, 163 insertions(+), 47 deletions(-) diff --git a/concordance/concordance.c b/concordance/concordance.c index 4471697..6b66527 100644 --- a/concordance/concordance.c +++ b/concordance/concordance.c @@ -900,8 +900,11 @@ int print_version_info(struct options_t *options) printf(" USB PID: %04X\n", get_usb_pid()); printf(" USB Ver: %04X\n", get_usb_bcd()); -printf(" Serial Number: %s\n\t%s\n\t%s\n", get_serial(1), - get_serial(2), get_serial(3)); +if (strlen(mh_get_serial()) != 0) +printf(" Serial Number: %s\n", mh_get_serial()); +else +printf(" Serial Number: %s\n\t%s\n\t%s\n", get_serial(1), + get_serial(2), get_serial(3)); } used = get_config_bytes_used(); diff --git a/libconcord/bindings/python/libconcord.py b/libconcord/bindings/python/libconcord.py index 718fc0e..491471a 100644 --- a/libconcord/bindings/python/libconcord.py +++ b/libconcord/bindings/python/libconcord.py @@ -973,3 +973,30 @@ mh_set_wifi_config = _create_func( _ret_lc_concord(), _in('config', POINTER(mh_wifi_config)) ) + +# const char *mh_get_serial(); +mh_get_serial = _create_func( +'mh_get_serial', +c_char_p +) + +#int mh_read_file(const char *filename, uint8_t *buffer, const uint32_t buflen, +# uint32_t *data_read); +mh_read_file = _create_func( +'mh_read_file', +_ret_lc_concord(), +_in('filename', c_char_p), +_in('buffer', POINTER(c_ubyte)), +_in('buflen', c_uint), +_out('data_read', c_uint) +) + +#int mh_write_file(const char *filename, uint8_t *buffer, +# const uint32_t buflen); +mh_write_file = _create_func( +'mh_write_file', +_ret_lc_concord(), +_in('filename', c_char_p), +_in('buffer', POINTER(c_ubyte)), +_in('buflen', c_uint) +) diff --git a/libconcord/libconcord.cpp b/libconcord/libconcord.cpp index be54ab5..c5f9121 100644 --- a/libconcord/libconcord.cpp +++ b/libconcord/libconcord.cpp @@ -229,6 +229,8 @@ int is_mh_pid(unsigned int pid) case 0xC124: /* Harmony 300 */ case 0xC125: /* Harmony 200 */ case 0xC126: /* Harmony Link */ +case 0xC129: /* Harmony Hub */ +case 0xC12B: /* Harmony Touch/Ultimate */ return 1; default: return 0; @@ -1942,6 +1944,27 @@ int mh_set_wifi_config(const struct mh_wifi_config *config) return err; } +const char *mh_get_serial() +{ +return ri.mh_serial.c_str(); +} + +int mh_read_file(const char *filename, uint8_t *buffer, const uint32_t buflen, +uint32_t *data_read) +{ +if (!is_mh_remote()) +return LC_ERROR; +return rmt->ReadFile(filename, buffer, buflen, data_read, 0x00, NULL, NULL, + 0); +} + +int mh_write_file(const char *filename, uint8_t *buffer, const uint32_t buflen) +{ +if (!is_mh_remote()) +return LC_ERROR; +return rmt->WriteFile(filename, buffer, buflen); +} + /* * PRIVATE-SHARED INTERNAL FUNCTIONS * These are functions used by the whole library but are NOT part of the API diff --git a/libconcord/libconcord.h b/libconcord/libconcord.h index 8e6f7ec..c0d2ba0 100644 --- a/libconcord/libconcord.h +++ b/libconcord/libconcord.h @@ -527,6 +527,11 @@ int mh_set_cfg_properties(const struct mh_cfg_properties *properties); int mh_get_wifi_networks(struct mh_wifi_networks *networks); int mh_get_wifi_config(struct mh_wifi_config *config); int mh_set_wifi_config(const struct mh_wifi_config *config); +const char *mh_get_serial(); +int mh_read_file(const char *filename, uint8_t *buffer, const uint32_t buflen, + uint32_t *data_read); +int mh_write_file(const char *filename, uint8_t *buffer, + const uint32_t buflen); #ifdef __cplusplus } diff --git a/libconcord/libusbhid.cpp b/libconcord/libusbhid.cpp index 915c11f..86ba786 100644 --- a/libconcord/libusbhid.cpp +++ b/libconcor
Re: [concordance-devel] Tickets to close
On 08/22/2014 04:03 PM, Phil Dibowitz wrote: > On 04/03/2014 06:28 AM, Scott Talbert wrote: >> Phil, >> >> I think the following tickets can be closed: >> >> Bugs: 37, 38 >> Feature Requests: 7, 12, 24 FYI, 38 was just re-opened for ya. :) -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss signature.asc Description: OpenPGP digital signature -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] Tickets to close
On 04/03/2014 06:28 AM, Scott Talbert wrote: > Phil, > > I think the following tickets can be closed: > > Bugs: 37, 38 > Feature Requests: 7, 12, 24 Done. Thanks! -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss signature.asc Description: OpenPGP digital signature -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Windows install/documentation fixes
Applied, thanks. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss signature.asc Description: OpenPGP digital signature -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH 2/2] MINOR: Ignore binding generated files
Applied, thanks. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss signature.asc Description: OpenPGP digital signature -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH 1/2] BUG/MINOR: Use concordance mailing list as the bugreport contact
Applied, thanks. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss signature.asc Description: OpenPGP digital signature -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Remove -ansi and -pedantic-errors from concordance compile flags
Applied, thanks. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss signature.asc Description: OpenPGP digital signature -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Fix a warning when building in debug mode
Applied, thanks. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss signature.asc Description: OpenPGP digital signature -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel