From: Tobias Date: Thu, 21 Apr 2022 13:12:02 +0000 (+0200) Subject: New Configuration Data X-Git-Url: https://git.smho.de/?a=commitdiff_plain;h=fcb2710478594b367ec99f1f79651aa107b5af4f;p=owTools.git New Configuration Data --- diff --git a/AUTHORS b/AUTHORS old mode 100755 new mode 100644 diff --git a/src/owDevice.cpp b/src/owDevice.cpp index 2c1ee64..096d6f5 100644 --- a/src/owDevice.cpp +++ b/src/owDevice.cpp @@ -248,6 +248,13 @@ int owDeviceDS18B20::convertAll() { return 0; } +int owDeviceDS18B20::readMemory(int page,int start, int count,std::vector *data) { + std::vector d; + readScratchpad(&d); + data->insert(data->begin(),d.begin()+start,d.end()); + return 8; +} + void owDeviceDS2438::setDefaultConfig() { config->setConfig({1,6, 6,8, 4,7, 6,17, 0,2,3,12,4,0,0,0,0,0,0,0,0,0,0,0}); diff --git a/src/owDeviceConfig.cpp b/src/owDeviceConfig.cpp index 0e4b391..c3e4301 100644 --- a/src/owDeviceConfig.cpp +++ b/src/owDeviceConfig.cpp @@ -243,6 +243,51 @@ std::vector owDeviceConfig::getQuantityFromNumber(uint8_t code) { l.push_back("illuminance blue"); l.push_back("Beleuchtungsstärke Blau"); l.push_back("lx"); + + case 19: + l.push_back("particulate mass concentration PM1"); + l.push_back("Feinstaubkonzentration PM1"); + l.push_back("µg/m³"); + case 20: + l.push_back("particulate mass concentration PM2.5"); + l.push_back("Feinstaubkonzentration PM2.5"); + l.push_back("µg/m³"); + case 21: + l.push_back("particulate mass concentration PM4"); + l.push_back("Feinstaubkonzentration PM4"); + l.push_back("µg/m³"); + case 22: + l.push_back("particulate mass concentration PM10"); + l.push_back("Feinstaubkonzentration PM10"); + l.push_back("µg/m³"); + case 23: + l.push_back("number concentration PM0.5"); + l.push_back("Partikelzahl PM0.5"); + l.push_back("#/cm³"); + case 24: + l.push_back("number concentration PM1"); + l.push_back("Partikelzahl PM1"); + l.push_back("#/cm³"); + case 25: + l.push_back("number concentration PM2.5"); + l.push_back("Partikelzahl PM2.5"); + l.push_back("#/cm³"); + case 26: + l.push_back("number concentration PM4"); + l.push_back("Partikelzahl PM4"); + l.push_back("#/cm³"); + case 27: + l.push_back("number concentration PM10"); + l.push_back("Partikelzahl PM10"); + l.push_back("#/cm³"); + case 28: + l.push_back("typical particle size"); + l.push_back("Durchschnittliche Partikelgröße"); + l.push_back("µm"); + + + + default: l.push_back(""); l.push_back(""); @@ -286,6 +331,10 @@ double owDeviceConfig::calculateValueFromNumber(int code, int vn, std::vector *sp); virtual int convertAll(); virtual int getPageSize() {return 8;} + virtual int readMemory(int page,int start, int count,std::vector *data); } ; @@ -345,6 +346,22 @@ public: virtual int getPageSize() {return 32;} +} ; + +class owDeviceDS2408:public owDevice { +public: + owDeviceDS2408(owInterface *owi_,snum_t num):owDevice(owi_,num) {} + + virtual void setDefaultConfig(); + virtual int convertAll(); + virtual int readMemory(int page,int start, int count,std::vector *data); + virtual int writeMemory(int page,int start, int count,std::vector *data); + int readChannelAccess(int count,std::vector *data); + int writeChannelAccess(int count, std::vector *data); + int resetActivityLatches(); + virtual int getPageSize() {return 32;} + + } ; diff --git a/windows/owTools/owTools.vcxproj b/windows/owTools/owTools.vcxproj index 6987402..b34e1dd 100644 --- a/windows/owTools/owTools.vcxproj +++ b/windows/owTools/owTools.vcxproj @@ -22,19 +22,19 @@ {7BC76CAE-ECA9-4C9B-9DE0-3F8449F815B4} Win32Proj owTools - 8.1 + 10.0.19041.0 Application true - v140 + v142 Unicode Application false - v140 + v142 true Unicode