Loïc G.
-
Gesamte Inhalte
2 -
Benutzer seit
-
Letzter Besuch
Posts erstellt von Loïc G.
-
-
Hello !
I'm trying to get the data from a Outdoor Weather bricklet using the C/C++ bindings from uC.
I want to use `tf_outdoor_weather_get_station_data` instead of the callback methods. For this I first need to get the station identifier using `tf_outdoor_weather_get_station_identifiers` but I'm unable to get it to work.uint8_t * stations_id; uint16_t * station_nb; tf_outdoor_weather_get_station_identifiers(&ow, stations_id, station_nb); tf_hal_printf("nb: %I16u - station 1: %I16u\n", station_nb, stations_id);
Returns 0 for both the values.
I get correct values when using the callback methods so the communication is working.
Any clue on what I'm doing wrong ?
Get outdoor weather station identifier
in General Discussion
Geschrieben
I finally got it working :
uint8_t stations_id[255]; uint16_t station_nb; tf_outdoor_weather_get_station_identifiers(&this->ow, stations_id, &station_nb);
I think it can be done in a better way using a pointer instead of a array of 255 uint8_t elements but my C++ skills are still limited.