On 03/09/2012 07:30 PM, Scott Talbert wrote: > - printf(" Hardware Version: %i.%i\n", get_hw_ver_maj(), > - get_hw_ver_min()); > + printf(" Hardware Version: %i.%i.%i\n", get_hw_ver_maj(), > + get_hw_ver_min(), get_hw_ver_mic());
This seems unrelated - are you just doing this for... future compatibility? > -AC_CHECK_LIB(zzip, zzip_dir_open, [] [a=0]) > +AC_CHECK_LIB(zzip, zzip_dir_open, [], [a=0]) HAHA. Nice. > -#ifdef WIN32 > if ((err = FindUsbLanRemote())) { > return LC_ERROR_CONNECT; > } I seem to remember this hanging horribly on non usblan remotes... > @@ -635,8 +641,10 @@ int init_concord() > int deinit_concord() > { > ShutdownUSB(); > - if (of) > - delete of; > + // Do not delete the OperationFile here. It is used again in > + // concordance after deinit_concord() is called. > + //if (of) > + //delete of; We do? For what? > @@ -113,6 +113,7 @@ int OperationFile::ReadZipFile(char *fil > } else { > data_size = dirent.st_size; > data = new uint8_t[data_size]; > + data_alloc = true; What is this? > @@ -117,6 +118,13 @@ struct TRemoteInfo { > bool valid_config; > uint32_t config_bytes_used; > uint32_t max_config_size; > + uint8_t num_regions; > + uint8_t *region_ids; > + char **region_versions; I know what these are because I was trying to consider how we'd handle multiple regions, but... > + uint32_t home_id; > + uint8_t node_id; > + char *tid; > + char *xml_user_rf_setting; what are these? > public: > CRemoteZ_TCP() {}; > virtual ~CRemoteZ_TCP() {}; > + int UpdateConfig(const uint32_t len, const uint8_t *wr, > + lc_callback cb, void *cb_arg, uint32_t cb_stage); > + int GetTime(const TRemoteInfo &ri, THarmonyTime &ht); > + int SetTime(const TRemoteInfo &ri, const THarmonyTime &ht, > + lc_callback cb=NULL, void *cb_arg=NULL, uint32_t cb_stage=NULL); > + int IsUSBNet() {return true;} I'm starting to feel like the CRemoteZ_TCP class should be renamed CRemoteZ_USB. > int CRemoteZ_TCP::Write(uint8_t typ, uint8_t cmd, uint32_t len, > uint8_t *data) > { > - if (len > 60) { > + if (len > 1033) { Explanation? > +int CRemoteZ_TCP::TCPSendAndCheck(uint8_t cmd, uint32_t len, uint8_t *data) > +{ I'm wondering if the TCPSendAndCheck can be abstracted into the CRemoteZ_Base. They seam nearly identical, the only issues I see is that the default Write for HID is UDPWrite and so we force TCPWrite but the USB case uses it's default (and only) Write() function. Also, you don't check for the ACK - should you? > + /* write data */ > + debug("UPDATE_DATA"); > + uint32_t pkt_len; > + int tlen = len; > + int bytes_written = 0; > + uint8_t *wr_ptr = const_cast<uint8_t*>(wr); > + uint8_t tmp_pkt[1033]; > + tmp_pkt[0] = 0x03; // 3 parameters > + tmp_pkt[1] = 0x01; // 1st parameter, 1 byte > + tmp_pkt[2] = REGION_USER_CONFIG; > + tmp_pkt[3] = 0xC2; // 2nd parameter, 1024 bytes > + tmp_pkt[1028] = 0x04; // 3rd parameter, 4 bytes This all still assumes we only need to write to one region, if I read it correctly (which is probably true for the 900, but I'm fairly certain not true for most zwave/usb remotes). > @@ -428,10 +660,10 @@ int CRemoteZ_Base::GetIdentity(TRemoteIn > const unsigned int hw = GetWord(pl.p[7]); > ri.hw_ver_major = hw >> 8; // ??? > ri.hw_ver_minor = (hw >> 4) & 0x0F; // ??? > - // hw_ver_micro = hw & 0x0F // ??? > + ri.hw_ver_micro = hw & 0x0F; // ??? Oh, *that's* why you did that. Heh. > //ri.hw_ver_major = hw >> 4; > //ri.hw_ver_minor = hw & 0x0F; I wonder what's up with this. > - ri.protocol = 0; > + ri.protocol = GetWord(pl.p[2]); // Seems to be the same as arch? HAHA. Nice. > } > + > +int GetXMLUserRFSetting(char **data) Can you explain how this stuff goes together? Either in the docs/ directory or at as part of the patch description or in comments, or some combination thereof? > #ifdef linux > + /* If this is a usbnet remote, abort before trying to detach drivers */ > + if (h_dev && (h_dev->descriptor.idProduct == 0xC11F)) { > + return LC_ERROR_CONNECT; > + } OK, now that I've looked at the code, I see why you did this. Makes sense. :) -- 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
------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel