On 11/28/2014 09:34 PM, Scott Talbert wrote: > On Thu, 27 Nov 2014, Phil Dibowitz wrote: > >>> - 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)); >> >> How about: >> >> if (is_mh_remote()) { >> >> ? > > Can't, because not all MH remotes use this weird serial number format. > The earlier ones use the more traditional one.
Gotcha. Comment please. >>> +int mh_read_file(const char *filename, uint8_t *buffer, const uint32_t >>> buflen, >>> + uint32_t *data_read) >> >> Is that 2 tabs and a space? We just nuked all our tabs! I think that should >> be >> 17 spaces. :) > > Ooops. I don't know how that snuck in there. I'll fix in the next > version. Never saw one. >>> int err; >>> - if ((err = usb_set_configuration(h_hid, 1))) { >>> - debug("Failed to set device configuration: %d (%s)", err, >>> - usb_strerror()); >>> - return err; >>> - } >> >> Errrrr. I'm not sure 1 is always the default on every device. This change >> terrifies me. > > Heh. I figured you might ask about this. So, for one thing, this only > affects the libusbhid code (which the person who was testing the Harmony > Touch happened to be using). HIDAPI doesn't ever call Set Configuration > and we seem to be working fine there. If it would make you feel better, > maybe we can make a Get Configuration call first and then Set > Configuration if it isn't 1. Unfortunately, for the Touch (and probably > also at least the Link), calling Set Configuration when the configuration > is already set to 1 causes the device to reset. OK. Fuck it. ;) >> For this patch / now, I'm fine with this, but I wonder if we should instead >> expose a _is_set_time_supported function that upper-level functions can call >> to determine if this is a sensible thing to do. >> >> By doing that, when a user asks to set time we can actually say "Sorry, your >> device doesn't support that. > > Yeah, that's probably not a bad idea for the future. File a wishlist for it? Fix the spacing, add the comment and I'll merge it. -- Phil Dibowitz p...@ipom.com Open Source software and tech docs Insanity 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
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel