diff --git a/COMputer/COMputer.sdf b/COMputer/COMputer.sdf index e85e9e1..b43b985 100644 Binary files a/COMputer/COMputer.sdf and b/COMputer/COMputer.sdf differ diff --git a/COMputer/COMputer.suo b/COMputer/COMputer.suo index a7741be..bcd8407 100644 Binary files a/COMputer/COMputer.suo and b/COMputer/COMputer.suo differ diff --git a/libdivecomputer/libdivecomputer.sdf b/libdivecomputer/libdivecomputer.sdf index 49e6804..79fe6b3 100644 Binary files a/libdivecomputer/libdivecomputer.sdf and b/libdivecomputer/libdivecomputer.sdf differ diff --git a/libdivecomputer/libdivecomputer.suo b/libdivecomputer/libdivecomputer.suo index 4a937a7..ae5c988 100644 Binary files a/libdivecomputer/libdivecomputer.suo and b/libdivecomputer/libdivecomputer.suo differ diff --git a/projects/DiveBoard/ComputerFactory.cpp b/projects/DiveBoard/ComputerFactory.cpp index dc26d5c..f56f514 100644 --- a/projects/DiveBoard/ComputerFactory.cpp +++ b/projects/DiveBoard/ComputerFactory.cpp @@ -46,8 +46,8 @@ ComputerFactory::ComputerFactory(void) recognisedPorts["LDC vtpro"].push_back("XXXXXXXXXXXXXX"); recognisedPorts["LDC veo250"].push_back("XXXXXXXXXXXXXX"); recognisedPorts["LDC atom2"].push_back("XXXXXXXXXXXXXX"); - recognisedPorts["Mares M2"].push_back("XXXXXXXXXXXXXX"); - recognisedPorts["LDC nemo"].push_back("XXXXXXXXXXXXXX"); + recognisedPorts["Mares M2"].push_back("Silicon Labs CP210x USB to UART Bridge"); + recognisedPorts["LDC nemo"].push_back("Silicon Labs CP210x USB to UART Bridge"); recognisedPorts["LDC puck"].push_back("XXXXXXXXXXXXXX"); recognisedPorts["LDC ostc"].push_back("XXXXXXXXXXXXXX"); recognisedPorts["LDC edy"].push_back("XXXXXXXXXXXXXX"); diff --git a/projects/DiveBoard/ComputerLibdc.cpp b/projects/DiveBoard/ComputerLibdc.cpp index 49ce118..a58c1b1 100644 --- a/projects/DiveBoard/ComputerLibdc.cpp +++ b/projects/DiveBoard/ComputerLibdc.cpp @@ -36,7 +36,7 @@ LIBTYPE openDLLLibrary() dll += DLL_PATH; LOGINFO("Searching DLL at %s", dll.c_str()); - HINSTANCE libdc = LoadLibrary(TEXT("J:\\Dev\\DB_plugin\\libdivecomputer\\Debug\\libdivecomputer.dll")); + HINSTANCE libdc = LoadLibrary(dll.c_str()); if (!libdc) { LPVOID lpMsgBuf; @@ -363,6 +363,7 @@ sample_cb (parser_sample_type_t type, parser_sample_value_t value, void *userdat //sample_data_t *sampledata = (sample_data_t *) userdata; unsigned int nsamples = 0; struct sample_cb_data *data = (struct sample_cb_data *) userdata; + std::string vendor; LOGDEBUG("Parsing element of type '%d'", type); @@ -400,10 +401,11 @@ sample_cb (parser_sample_type_t type, parser_sample_value_t value, void *userdat data->sampleXML += str(boost::format("%u") % value.bearing); break; case SAMPLE_TYPE_VENDOR: - data->sampleXML += str(boost::format("") % value.vendor.type % value.vendor.size); + vendor += str(boost::format("vendor type=\"%u\" size=\"%u\"") % value.vendor.type % value.vendor.size); for (unsigned int i = 0; i < value.vendor.size; ++i) - data->sampleXML += str(boost::format("%02X") % (((unsigned char *) value.vendor.data)[i])); - data->sampleXML += ""; + vendor += str(boost::format("%02X") % (((unsigned char *) value.vendor.data)[i])); + + LOGINFO(vendor); break; default: LOGWARNING("Received an element of unknown type '%d'", type); @@ -630,7 +632,7 @@ static void event_cb (device_t *device, device_event_t event, const void *data, device_data_t *devdata = evdata->devdata; - LOGDEBUG("Received event of tyep '%d'", event); + LOGDEBUG("Received event of type '%d'", event); switch (event) { case DEVICE_EVENT_WAITING: @@ -675,6 +677,8 @@ static void event_cb (device_t *device, device_event_t event, const void *data, break; } + LOGDEBUG("End of event handling"); + } catch(std::exception &e) { LOGWARNING("Caught Exception : %s",e.what()); throw; @@ -930,7 +934,9 @@ void ComputerLibdc::dowork (device_type_t &backend, const std::string &devname, divedata.status = &status; divedata.computer = this; - diveXML.append(""); + diveXML.append(""); + diveXML.append(lookup_name(backend)); + diveXML.append(""); // Download the dives. LOGINFO("Downloading the dives."); diff --git a/projects/DiveBoard/ComputerMares.cpp b/projects/DiveBoard/ComputerMares.cpp index 8ea5b04..43e071f 100644 --- a/projects/DiveBoard/ComputerMares.cpp +++ b/projects/DiveBoard/ComputerMares.cpp @@ -282,7 +282,7 @@ int ComputerMares::list_dives(std::vector &dives) void ComputerMares::format_dives(std::vector dives, std::string &xml) { - xml += ""; + xml += "MaresM2"; for (unsigned int i=0; im_x, evt->m_y); return false; } -bool DiveBoard::onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow *) +bool DiveBoard::onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow *w) { // The window is attached; act appropriately return false; diff --git a/projects/DiveBoard/installer.nsi b/projects/DiveBoard/installer.nsi index 11d2a76..2d4e26d 100644 --- a/projects/DiveBoard/installer.nsi +++ b/projects/DiveBoard/installer.nsi @@ -124,7 +124,7 @@ Section "FTDI" Driver1 SetOutPath $TEMP\DB_FTDI File /r "..\..\drivers\ftdi_win" ExecWait 'rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 "$TEMP\DB_FTDI\ftdi_win\ftdibus.inf"' $0 - MessageBox MB_OK "FTDI Driver installed. Installer returned $0.\n $TEMP" IDOK 0 + # MessageBox MB_OK "FTDI Driver installed. Installer returned $0.\n $TEMP" IDOK 0 Delete "$TEMP\DB_FTDI" SectionEnd @@ -134,7 +134,7 @@ Section "SiliconLabs CP210x" Driver2 File /r "..\..\drivers\Silabs_windows" ExecWait '"$TEMP\DB_SILABS\Silabs_windows\CP210x_VCP_Win2K.exe"' $0 - MessageBox MB_OK "SiliconLabs CP210x Driver installed. Installer returned $0.\n $TEMP" IDOK 0 + # MessageBox MB_OK "SiliconLabs CP210x Driver installed. Installer returned $0.\n $TEMP" IDOK 0 Delete "$TEMP\DB_SILABS" SectionEnd @@ -144,7 +144,7 @@ Section "Prolific" Driver3 File /r "..\..\drivers\prolific_win" ExecWait '"$TEMP\DB_PROLIFIC\prolific_win\PL2303_Prolific_DriverInstaller_v130.exe"' $0 - MessageBox MB_OK "Prolific Driver installed. Installer returned $0 \n $TEMP" IDOK 0 + # MessageBox MB_OK "Prolific Driver installed. Installer returned $0 \n $TEMP" IDOK 0 Delete "$TEMP\DB_PROLIFIC" SectionEnd