Błędny pierwszy odczyt na drugim kanale

Asica10
Posts: 52
Joined: Thu Feb 28, 2019 8:12 pm

Mon Sep 16, 2019 4:31 am

Witam,
Do Wemosa mam podłączone 2 czujniki Dht22 oraz BME280. Grneralnie wszystko działa ok poza pierwszym odczytem z czujnika z "drugiego" miejsca.

Pierwsze wartości przesłane na serwer dla drugiego czujnika sa błedne:
- jeżeli w programie jest pierwsze xtemp poźniej xhumidity to pierwszy odczyt to przypisanie wartości temp do kanału temp jak i wilgotności ( wilgotnoścć w pierwszym odczycie ma wartość temp), kolejne odczyty są właściwe

- jeżeli w programie jest pierwsze xhumidity i linie niżej xtemp to sytuacja jest odwrotna, odczytywana jest wilgotność i wartość ta w pierwszym odczycie przypisana jest do temp i wilgotności.

Dzieje sie tak zawsze dla czujnika na innym kanale niż 0 poza ciśnieniem, który będąc na kanele innym niż 0 ( w moim wypaku kanal nr 1 ).
Wygląda tak jak by program nie zdążyl wykonać wszystkich odczytów przed wysłaniem danych na serwer .

Ktoś może stwierdzić że problem jest nieistotny, ale w przypadku deep sleep ( deep sleep dziala na supli bardzo dobrze jeżeli czaas uśpienia jest krótszy niż odczytów wartości przez serwer) gdzie wysyłam 1 odczyt i usypiam esp na ok 20s jest to duży problem, ponieważ mam caly czas dla czujnika 2 np 20 stopni na temp i 20% wilgotności na kanale humidity.

Czy ktoś ma pomysł jak rozwiązać ten problem?

Pozdrawiam
User avatar
pzygmunt
Posts: 6584
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Mon Sep 16, 2019 9:05 am

Najprawdopodobniej niepoprawnie inicjujesz kanały. Nie wrzuciłeś linka do źródła. PS czas życia modułu możesz zwiększyć indywidualnie więc i deep sleep też.
Asica10
Posts: 52
Joined: Thu Feb 28, 2019 8:12 pm

Mon Sep 16, 2019 3:33 pm

pzygmunt wrote:
Mon Sep 16, 2019 9:05 am
Najprawdopodobniej niepoprawnie inicjujesz kanały. Nie wrzuciłeś linka do źródła. PS czas życia modułu możesz zwiększyć indywidualnie więc i deep sleep też.


Dzięki za odpowiedź. Poniżej załączam kod, prosiłbym o informacje co powinno być poprawione (powycinałem to co nie ma wpływu na odczyty)

Code: Select all


...

// BME280 Sensor read implementation
void get_temperature_and_humidity(int channelNumber, double *temp, double *humidity) {


    switch(channelNumber){
      case 0:
// BME280 Sensor read implementation
     
    *temp = bme.readTemperature();
    *humidity = bme.readHumidity();
    Serial.print("BME Temp g : ");
    Serial.print(*temp);
    Serial.print("   Wilgotność g : ");
    Serial.println(*humidity);

      Serial.print("   kanal bme: ");
Serial.print(channelNumber);

 if ( isnan(*temp) || isnan(*humidity) ) {
      *temp = -275;
      *humidity = -1;

  }
  break;

 // DHT22 Sensor read implementation   
  case 2: 

    *humidity = dht_a.readHumidity(); 
    *temp = dht_a.readTemperature();
    

    Serial.print("DHT Temp a : ");
    Serial.print(*temp);
    Serial.print("   Wilgotność a : ");
    Serial.println(*humidity);

       Serial.print("   kanal dht: ");
Serial.print(channelNumber);
    if ( isnan(*temp) || isnan(*humidity) ) {
      *temp = -275;
      *humidity = -1;
        }
break; 
  }}
  
  
double get_pressure(int channelNumber, double pressure) {
  switch(channelNumber){
   case 1: 

 pressure =((bme.readPressure() /100) / pow(1.0-0.0065*altitude / (bme.readTemperature()+273.15),5.255));
   Serial.print("Ciśnienie = ");
   Serial.print(pressure);
   Serial.println(" *hPa");
   return pressure;

break; }
  }

void setup() {
  // Init Serial port
  Serial.begin(115200);
   // Init DHT library 
  dht_a.begin();

  if (!bme.begin(0x76)) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1);
    }

...


 // Set temperature/humidity callback
  SuplaDevice.setTemperatureHumidityCallback(&get_temperature_and_humidity);

      // Set pressure callback
  SuplaDevice.setPressureCallback(&get_pressure);
  
 
  // Replace the falowing GUID
char GUID[SUPLA_GUID_SIZE] = {0x56,0xDC,0x9A,0x06,0x1D,0x02,0xB2,0x98,0x67,0xDC,0xD6,0xE6,0x50,0xFF,0x0C,0x4B};

  // with GUID that you can retrieve from https://www.supla.org/arduino/get-guid

  // Ethernet MAC address
  uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

  // CHANNEL0,1,2 //if second channel doesn't work change the queue in srpc.c
 
   
    SuplaDevice.addDHT22();  // DHT22   
    SuplaDevice.addPressureSensor(); // BME280 pressure 
    SuplaDevice.addDHT22(); // BME280 termp and humidity  

  
  SuplaDevice.setStatusFuncImpl(&status_func);
  SuplaDevice.setName("Oled");
  SuplaDevice.begin(GUID,              // Global Unique Identifier
                    mac,               // Ethernet MAC address
                    "svr12.supla.org",  // SUPLA server address
                    xxxx                 // Location ID
                    "xxxx");               // Location Password

}


// ***********************************************************************************************************
void loop() {
  SuplaDevice.iterate()
  
...

}

SuplaDeviceCallbacks supla_arduino_get_callbacks(void) {

  SuplaDeviceCallbacks cb;


  cb.tcp_read = &supla_arduino_tcp_read;
  cb.tcp_write = &supla_arduino_tcp_write;
  cb.eth_setup = &supla_arduino_eth_setup;
  cb.svr_connected = &supla_arduino_svr_connected;
  cb.svr_connect = &supla_arduino_svr_connect;
  cb.svr_disconnect = &supla_arduino_svr_disconnect;
  cb.get_pressure= get_pressure;
  cb.get_temperature_and_humidity = get_temperature_and_humidity;
  cb.get_temperature = NULL;
  cb.get_rgbw_value = NULL;
  cb.set_rgbw_value = NULL;


  return cb;

}

}

Możesz powiedzieć jak zwiększyć "czas życia modułu"? Co powiniem zmienić by układ mógł być dłużej w Deep sleep a w aplikacji były poprawne odczyty?

Z góry bardzo dziękuje.
User avatar
pzygmunt
Posts: 6584
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Mon Sep 16, 2019 7:03 pm

Jeśli chodzi o Arduino to tu jest problem w samej bibliotece SuplaDevice.

Dodaj tutaj
https://github.com/SUPLA/arduino/blob/m ... e.cpp#L585

Poniższy kod:

Code: Select all

if (Params.cb.get_temperature) {
  channel_pin[c].last_val_dbl1 = Params.cb.get_temperature(channel_number, pin->last_val_dbl1);
}
Asica10
Posts: 52
Joined: Thu Feb 28, 2019 8:12 pm

Mon Sep 16, 2019 7:36 pm

pzygmunt wrote:
Mon Sep 16, 2019 7:03 pm
Jeśli chodzi o Arduino to tu jest problem w samej bibliotece SuplaDevice.

Dodaj tutaj
https://github.com/SUPLA/arduino/blob/m ... e.cpp#L585

Poniższy kod:

Code: Select all

if (Params.cb.get_temperature) {
  channel_pin[c].last_val_dbl1 = Params.cb.get_temperature(channel_number, pin->last_val_dbl1);
}
Po dodaniu do powyższego kodu podczas kompilacji mam poniższe komunikaty:

Code: Select all

WARNING: library SuplaDevice claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).
C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addDS18B20Thermometer()':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:586:60: error: 'channel_number' was not declared in this scope

   channel_pin[c].last_val_dbl1 = Params.cb.get_temperature(channel_number, pin->last_val_dbl1);

                                                            ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:586:76: error: 'pin' was not declared in this scope

   channel_pin[c].last_val_dbl1 = Params.cb.get_temperature(channel_number, pin->last_val_dbl1);

                                                                            ^

exit status 1
Error compiling for board Generic ESP8266 Module.

Pozatym z tego co widze to miejsce w którym mam wrzucić kod dotyczy DS18B20Thermometer, a nie DHT22 (chyba że to bez znaczenia w tym przypadku)
klew
Posts: 49
Joined: Thu Jun 27, 2019 12:16 pm

Mon Sep 16, 2019 9:53 pm

W implementacji Arduino jest błąd w definicji unii:

https://github.com/SUPLA/arduino/blob/m ... ice.h#L109

Wartości dbl1 i dbl2 w unii są jedną i tą samą zmienną zaallokowaną na 4 bajtach pamięci.
Powoduje to, że przy pierwszym odczycie wartość wilgotności powietrza nadpisywała wartość temperatury ( https://github.com/SUPLA/arduino/blob/m ... e.cpp#L387 ). W dalszym działaniu raczej jest ten błąd nieszkodliwy - tylko nie działa optymalizacja polegająca na niewysyłaniu nowej wartośći temperatury i wilgotności, gdy odczyty się nie zmieniły.

Można to poprawić przez zmianę definicji uni na:

Code: Select all

union {
		uint8_t last_val;
		double last_val_dbl;
		double last_val_dbl_array[2];
	};
I odpowiednie podmianki w pliku cpp.
User avatar
pzygmunt
Posts: 6584
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Mon Sep 16, 2019 10:03 pm

Z tej unii można zrezygnować.
Zybi
Posts: 1368
Joined: Sun Jun 26, 2016 4:24 pm

Mon Sep 16, 2019 10:32 pm

klew wrote:
Mon Sep 16, 2019 9:53 pm
W implementacji Arduino jest błąd w definicji unii:

https://github.com/SUPLA/arduino/blob/m ... ice.h#L109

Wartości dbl1 i dbl2 w unii są jedną i tą samą zmienną zaallokowaną na 4 bajtach pamięci.
Powoduje to, że przy pierwszym odczycie wartość wilgotności powietrza nadpisywała wartość temperatury ( https://github.com/SUPLA/arduino/blob/m ... e.cpp#L387 ). W dalszym działaniu raczej jest ten błąd nieszkodliwy - tylko nie działa optymalizacja polegająca na niewysyłaniu nowej wartośći temperatury i wilgotności, gdy odczyty się nie zmieniły.

Można to poprawić przez zmianę definicji uni na:

Code: Select all

union {
		uint8_t last_val;
		double last_val_dbl;
		double last_val_dbl_array[2];
	};
I odpowiednie podmianki w pliku cpp.
Faktycznie tak jest. Przy pierwszym pomiarze dostaję zawsze temperaturę -1, czyli przenosi mi się wartość startowa wilgotności.

Poprawka działa i teraz jest OK!
Zybi
Posts: 1368
Joined: Sun Jun 26, 2016 4:24 pm

Mon Sep 16, 2019 11:50 pm

pzygmunt wrote:
Mon Sep 16, 2019 10:03 pm
Z tej unii można zrezygnować.
I to jest lepsze rozwiązanie, bo jednak poprawka jw. zakłóca działanie kanału przekaźnika - testowałem na Sonoff-ie Basic.
Asica10
Posts: 52
Joined: Thu Feb 28, 2019 8:12 pm

Tue Sep 17, 2019 4:10 am

pzygmunt wrote:
Mon Sep 16, 2019 10:03 pm
Z tej unii można zrezygnować.
Czy rezygnacjja z unii oznacza jej usunięcie? Jężeli tak to po usunięciu podczas próby komplacji mam następujące błędy:

Code: Select all










WARNING: library SuplaDevice claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).
C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'void SuplaDeviceClass::begin_thermometer(SuplaChannelPin*, TDS_SuplaDeviceChannel_B*, int)':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:358:14: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_temperature(channel_number, pin->last_val_dbl1);

              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:358:77: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_temperature(channel_number, pin->last_val_dbl1);

                                                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:359:52: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         channelSetDoubleValue(channel_number, pin->last_val_dbl1);

                                                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:363:14: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_pressure(channel_number, pin->last_val_dbl1);

              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:363:74: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_pressure(channel_number, pin->last_val_dbl1);

                                                                          ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:364:52: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         channelSetDoubleValue(channel_number, pin->last_val_dbl1);

                                                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:368:14: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_weight(channel_number, pin->last_val_dbl1);

              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:368:72: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_weight(channel_number, pin->last_val_dbl1);

                                                                        ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:369:52: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         channelSetDoubleValue(channel_number, pin->last_val_dbl1);

                                                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:373:14: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_wind(channel_number, pin->last_val_dbl1);

              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:373:70: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_wind(channel_number, pin->last_val_dbl1);

                                                                      ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:374:52: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         channelSetDoubleValue(channel_number, pin->last_val_dbl1);

                                                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:378:14: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_rain(channel_number, pin->last_val_dbl1);

              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:378:70: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         pin->last_val_dbl1 = Params.cb.get_rain(channel_number, pin->last_val_dbl1);

                                                                      ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:379:52: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         channelSetDoubleValue(channel_number, pin->last_val_dbl1);

                                                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:386:70: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         Params.cb.get_temperature_and_humidity(channel_number, &pin->last_val_dbl1, &pin->last_val_dbl2);

                                                                      ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:386:91: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl2'

         Params.cb.get_temperature_and_humidity(channel_number, &pin->last_val_dbl1, &pin->last_val_dbl2);

                                                                                           ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:387:61: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

         channelSetTempAndHumidityValue(channel_number, pin->last_val_dbl1, pin->last_val_dbl2);

                                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:387:81: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl2'

         channelSetTempAndHumidityValue(channel_number, pin->last_val_dbl1, pin->last_val_dbl2);

                                                                                 ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'int SuplaDeviceClass::addChannel(int, int, bool, bool)':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:420:44: error: 'struct SuplaChannelPin' has no member named 'last_val'

  channel_pin[Params.reg_dev.channel_count].last_val = suplaDigitalRead(Params.reg_dev.channel_count, bistable ? pin2 : pin1);

                                            ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addDS18B20Thermometer()':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:584:17: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

  channel_pin[c].last_val_dbl1 = -275;

                 ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:586:42: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

  channelSetDoubleValue(c, channel_pin[c].last_val_dbl1);

                                          ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addDHT(int)':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:596:17: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

  channel_pin[c].last_val_dbl1 = -275; 

                 ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:597:17: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl2'

  channel_pin[c].last_val_dbl2 = -1; 

                 ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:600:51: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

  channelSetTempAndHumidityValue(c, channel_pin[c].last_val_dbl1, channel_pin[c].last_val_dbl2);

                                                   ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:600:81: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl2'

  channelSetTempAndHumidityValue(c, channel_pin[c].last_val_dbl1, channel_pin[c].last_val_dbl2);

                                                                                 ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addDistanceSensor()':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:653:20: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channel_pin[c].last_val_dbl1 = -1;

                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:654:45: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channelSetDoubleValue(c, channel_pin[c].last_val_dbl1);

                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addPressureSensor()':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:664:20: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channel_pin[c].last_val_dbl1 = -1;

                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:665:45: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channelSetDoubleValue(c, channel_pin[c].last_val_dbl1);

                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addWeightSensor()':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:675:20: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channel_pin[c].last_val_dbl1 = -1;

                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:676:45: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channelSetDoubleValue(c, channel_pin[c].last_val_dbl1);

                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addWindSensor()':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:686:20: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channel_pin[c].last_val_dbl1 = -1;

                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:687:45: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channelSetDoubleValue(c, channel_pin[c].last_val_dbl1);

                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'bool SuplaDeviceClass::addRainSensor()':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:697:20: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channel_pin[c].last_val_dbl1 = -1;

                    ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:698:45: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

     channelSetDoubleValue(c, channel_pin[c].last_val_dbl1);

                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'void SuplaDeviceClass::iterate_relay(SuplaChannelPin*, TDS_SuplaDeviceChannel_B*, long unsigned int, int)':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:805:30: error: 'struct SuplaChannelPin' has no member named 'last_val'

             if ( val != pin->last_val ) {

                              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:807:22: error: 'struct SuplaChannelPin' has no member named 'last_val'

                 pin->last_val = val;

                      ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'void SuplaDeviceClass::iterate_sensor(SuplaChannelPin*, TDS_SuplaDeviceChannel_B*, long unsigned int, int)':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:826:26: error: 'struct SuplaChannelPin' has no member named 'last_val'

         if ( val != pin->last_val ) {

                          ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:828:18: error: 'struct SuplaChannelPin' has no member named 'last_val'

             pin->last_val = val;

                  ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:847:74: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

                 double val = Params.cb.get_distance(channel_number, pin->last_val_dbl1);

                                                                          ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:849:34: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

                 if ( val != pin->last_val_dbl1 ) {

                                  ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:851:26: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

                     pin->last_val_dbl1 = val;

                          ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp: In member function 'void SuplaDeviceClass::iterate_thermometer(SuplaChannelPin*, TDS_SuplaDeviceChannel_B*, long unsigned int, int)':

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:872:73: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

             double val = Params.cb.get_temperature(channel_number, pin->last_val_dbl1);

                                                                         ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:874:30: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

             if ( val != pin->last_val_dbl1 ) {

                              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:875:22: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

                 pin->last_val_dbl1 = val;

                      ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:885:63: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      double val = Params.cb.get_pressure(channel_number, pin->last_val_dbl1);

                                                               ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:887:23: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      if ( val != pin->last_val_dbl1 ) {

                       ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:888:12: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

       pin->last_val_dbl1 = val;

            ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:898:61: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      double val = Params.cb.get_weight(channel_number, pin->last_val_dbl1);

                                                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:900:23: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      if ( val != pin->last_val_dbl1 ) {

                       ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:901:12: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

       pin->last_val_dbl1 = val;

            ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:911:59: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      double val = Params.cb.get_wind(channel_number, pin->last_val_dbl1);

                                                           ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:913:23: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      if ( val != pin->last_val_dbl1 ) {

                       ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:914:12: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

       pin->last_val_dbl1 = val;

            ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:924:59: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      double val = Params.cb.get_rain(channel_number, pin->last_val_dbl1);

                                                           ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:926:23: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

      if ( val != pin->last_val_dbl1 ) {

                       ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:927:12: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

       pin->last_val_dbl1 = val;

            ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:942:29: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

             double t = pin->last_val_dbl1;

                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:943:29: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl2'

             double h = pin->last_val_dbl2;

                             ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:947:28: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

             if ( t != pin->last_val_dbl1

                            ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:948:30: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl2'

                 || h != pin->last_val_dbl2 ) {

                              ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:950:22: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl1'

                 pin->last_val_dbl1 = t;

                      ^

C:\Users\Damian\Documents\Arduino\libraries\SuplaDevice\SuplaDevice.cpp:951:22: error: 'struct SuplaChannelPin' has no member named 'last_val_dbl2'

                 pin->last_val_dbl2 = h;

                      ^

exit status 1
Error compiling for board Generic ESP8266 Module.

Czy mógłby ktoś krok po kroku opisać co powinienem zrobić?

Z góry bardzo dziękuje
Post Reply