return 0;\r
}\r
\r
+int owDeviceDS18B20::readMemory(int page,int start, int count,std::vector<uint8_t> *data) {\r
+ std::vector<uint8_t> d;\r
+ readScratchpad(&d);\r
+ data->insert(data->begin(),d.begin()+start,d.end());\r
+ return 8;\r
+}\r
+\r
\r
void owDeviceDS2438::setDefaultConfig() {\r
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});\r
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("");
case 26:return V[vn]*5.0/1024.0;break;
case 27:return ((double)V[2]+(double)V[1]/1000.0)/8.0;break;
case 28:return exp(V[vn]/2560.0);break;
+ case 29:return ((double)V[1]*10.0+(double)V[2]/100.0);break;
+ case 30: return V[vn] / 2.0; break;
+ case 31: return V[vn] / 4.0; break;
+ case 32: return V[vn] / 5.0; break;
default:return V[vn];
}
}
case 26: s="SGPC3";break;
case 27: s="iAQ-core C";break;
case 28: s="HDC2010";break;
+ case 29: s="LPS225HB";break;
+ case 30: s="SHTC3";break;
+ case 31: s="SPS30";break;
+ case 32: s="DHT11";break;
+ case 33: s="SCD30";break;
+ case 34: s="SCD40";break;
+
default: return "";
}
return s;
case 0x26:d=new owDeviceDS2438(this,snum);break;\r
case 0x20:d=new owDeviceDS2450(this,snum);break;\r
case 0x1D:d=new owDeviceDS2423(this,snum);break;\r
+ case 0x29:d=new owDeviceDS2408(this,snum);break;\r
default:d=new owDevice(this,snum);\r
}\r
devices.push_back(d);\r
int readScratchpad(std::vector<uint8_t> *sp);
virtual int convertAll();
virtual int getPageSize() {return 8;}
+ virtual int readMemory(int page,int start, int count,std::vector<uint8_t> *data);
} ;
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<uint8_t> *data);
+ virtual int writeMemory(int page,int start, int count,std::vector<uint8_t> *data);
+ int readChannelAccess(int count,std::vector<uint8_t> *data);
+ int writeChannelAccess(int count, std::vector<uint8_t> *data);
+ int resetActivityLatches();
+ virtual int getPageSize() {return 32;}
+
+
} ;
<ProjectGuid>{7BC76CAE-ECA9-4C9B-9DE0-3F8449F815B4}</ProjectGuid>\r
<Keyword>Win32Proj</Keyword>\r
<RootNamespace>owTools</RootNamespace>\r
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>\r
</PropertyGroup>\r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
<ConfigurationType>Application</ConfigurationType>\r
<UseDebugLibraries>true</UseDebugLibraries>\r
- <PlatformToolset>v140</PlatformToolset>\r
+ <PlatformToolset>v142</PlatformToolset>\r
<CharacterSet>Unicode</CharacterSet>\r
</PropertyGroup>\r
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
<ConfigurationType>Application</ConfigurationType>\r
<UseDebugLibraries>false</UseDebugLibraries>\r
- <PlatformToolset>v140</PlatformToolset>\r
+ <PlatformToolset>v142</PlatformToolset>\r
<WholeProgramOptimization>true</WholeProgramOptimization>\r
<CharacterSet>Unicode</CharacterSet>\r
</PropertyGroup>\r