New Config-Values
authorTobias <tm@tm3d.de>
Wed, 25 Oct 2017 06:29:24 +0000 (08:29 +0200)
committerTobias <tm@tm3d.de>
Wed, 25 Oct 2017 06:29:24 +0000 (08:29 +0200)
src/main.cpp
src/owDeviceConfig.cpp

index 2e7e655..1d9e64f 100755 (executable)
@@ -284,6 +284,11 @@ void continuous(std::vector<owDevice*> *devices,int intervall,int headline,int s
                printf("%d-%02d-%02d %02d:%02d:%02d\t", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
                for (owDevice* dev :*devices) {
                        for(int k=0;k<owi->maxrepeat;k++){
+                               std::vector<uint8_t> data;
+                               //data.push_back(0xCC);
+                               //data.push_back(0x44);
+                               //owi->Reset();
+                               //owi->Communicate(&data, 2, 0);
                                dev->convertAll();
                                if (owi->log->last()<OWLOG_ERROR) break;
                                owi->log->clear();
index 00bb4b4..66bc9df 100644 (file)
@@ -170,7 +170,7 @@ std::vector<std::string> owDeviceConfig::getQuantityFromNumber(uint8_t code) {
                case 3:
                        l.push_back("illuminance");
                        l.push_back("Beleuchtungsstärke");
-                       l.push_back("lux");
+                       l.push_back("lx");
                        break;
                case 4:
                        l.push_back("humidity");
@@ -211,6 +211,38 @@ std::vector<std::string> owDeviceConfig::getQuantityFromNumber(uint8_t code) {
                        l.push_back("Widerstand");
                        l.push_back("kOhm");
                        break;  
+                case 12:
+                        l.push_back("wind speed");
+                        l.push_back("Windgeschwindigkeit");
+                        l.push_back("m/s");
+                        break;  
+                case 13:
+                        l.push_back("wind speed max");
+                        l.push_back("Maximale Windgeschwindigkeit");
+                        l.push_back("m/s");
+                        break;  
+                case 14:
+                        l.push_back("wind direction");
+                        l.push_back("Windrichtung");
+                        l.push_back("°");
+                        break;  
+                case 15:
+                        l.push_back("wind direction variance");
+                        l.push_back("Varianz der Windrichtung");
+                        l.push_back("°");
+                        break;  
+               case 16:
+                       l.push_back("illuminance red");
+                       l.push_back("Beleuchtungsstärke Rot");
+                       l.push_back("lx");
+               case 17:
+                       l.push_back("illuminance green");
+                       l.push_back("Beleuchtungsstärke Grün");
+                       l.push_back("lx");
+               case 18:
+                       l.push_back("illuminance blue");
+                       l.push_back("Beleuchtungsstärke Blau");
+                       l.push_back("lx");
                default:
                        l.push_back("");
                        l.push_back("");
@@ -246,6 +278,7 @@ double owDeviceConfig::calculateValueFromNumber(int code, int vn, std::vector<in
                        case 18:return V[vn]/8.0;break;
                        case 19:return V[vn]/500.0*14.0;break;  //Test
                        case 20:return V[vn]*0.5+700;break;  
+                       case 21:return V[vn]+1280; break;  
                        default:return 0;
                }
 }
@@ -276,6 +309,10 @@ std::string owDeviceConfig::getSensorChip(uint8_t ch) {
                case 20: s="Intern ADC";break;
                case 21: s="SHT35";break;       //      Feuchte/Temperatur Bester
                case 22: s="SHT31";break;       //      Feuchte/Temperautr
+               case 23: s="APDS-9960";break;   //      Feuchte/Temperautr
+               case 24: s="BMP680";break;
+               case 25: s="SGP30";break;
+               case 26: s="SGPC3";break;
                default: return "";
        }
        return s;