Jump to content

AirQuality bricklet bug


Recommended Posts

Hallo TF Team,

 

mit gcc 8.2 erhalte ich beim Aufruf von air_quality_get_iaq_index einen Absturz wegen Stack corruption (bei älteren GCC Versionen passiert das nicht !!):

 

==5490== Process terminating with default action of signal 6 (SIGABRT): dumping core
==5490==    at 0x4F05D7F: raise (in /usr/lib/libc-2.28.so)
==5490==    by 0x4EF0671: abort (in /usr/lib/libc-2.28.so)
==5490==    by 0x4F48877: __libc_message (in /usr/lib/libc-2.28.so)
==5490==    by 0x4FDB414: __fortify_fail_abort (in /usr/lib/libc-2.28.so)
==5490==    by 0x4FDB3C5: __stack_chk_fail (in /usr/lib/libc-2.28.so)
==5490==    by 0x204CB9: air_quality_get_iaq_index (bricklet_air_quality.cpp:633)
==5490==    by 0x48E2892: brickapi::AirQualitySensor::readValue(brickapi::SensorItem::CHANNEL_NO) (AirQualitySensor.cpp:147)
==5490==    by 0xFF000577: 
==5490==    by 0x52399AF: 

 

ich habe mir den Bricklet-Code mal angesehen:

BootloaderHandleMessageResponse get_iaq_index(const GetIAQIndex *data, GetIAQIndex_Response *response) {
response->header.length      = sizeof(GetAllValues_Response);
response->iaq_index          = voc_get_iaq_index();
response->iaq_index_accuracy = voc_get_iaq_index_accuracy();

return HANDLE_MESSAGE_RESPONSE_NEW_MESSAGE;
}

ist das hier nicht falsch: da steht

response->header.length      = sizeof(GetAllValues_Response);

 

da wird doch die falsche Response-Größe zurück geliefert - oder nicht?

Link to comment
Share on other sites

Kann es sein, dass der Bug mit der Temperatur-Kalibrierung wieder drin ist?

 

Mein Brickv zeigte nämlich schon Version 2.0.1 an => hab's überschrieben und wenn ich jetzt mit Wert 160 die Temperatur kalibriere bin ich auf einmal weit unter -100° C, dabei sollten ja nur 1.6° abgezogen werden??

 

Ich meine das hier:

https://www.tinkerunity.org/forum/index.php/topic,4689.0.html

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...