mqtt_timer_left_ms: timer->end_time is in ticks, now is in ticks, so left
is in ticks. left * portTICK_PERIOD_MS is the time left.
With that change, the select in both mqtt_esp_read and mqtt_esp_write
seems to work as expected(with time, not ticks)
On MQTTClient.c function mqtt_subscribe, if more than MQTT_MAX_MESSAGE_HANDLERS are registered, the variable rc receives the value of grantedQoS.
If grantedQoS = 0, and all handlers are already occupied, it goes on and returns 0 to the caller.
Original work by @ourairquality
* Sysparam threadsafe and SPI access
* Sysparam test cases
* Fix for negative int8
* Sysparam getting bool without memory allocation. Bool tests.
* SPI flash refactoring.
* Extract common spiflash.c into core.
* Use spiflash.c in sysparam.
* Use memcpy in spiflash.c insted of hand-written version.
* Tests for spiflash.c
* custom delay
* Update comment
* add bus control status, add some missing include & fixed display output on sh1104 (#319)
* add some missing include
* Fixed display on SH1106
* Fix comment, add force sytem, rework flag, 16 bits data transfert
* Update all library with new I2C API
* custom delay
* Update comment, add bus control status
* fix i2c read + fix ds3231 temp + fix ssd1306 send
The function sntp_set_servers() duplicates the strings supplied in the
server_url[] array into new strings but forgets to allocate the extra
byte needed for the \0 terminator for each string.
Fix the problem by using strdup(), which allocates the right amount of
memory and copies the string at once.
* Process rercursive folder for spiffs images
* Flat file name from the directory structure
* change method to find '/' as the suggestion of @sheinz
* remove unused variable
* Allow changing write function of stdout.
Required for stdout redirection.
Works on blocks, not chars - does _not_ use sdk_os_putc !
Should work even when linking with SPIFFS.
* bmp280 more options
add option to user for temp oversampling and possibility to skipp a specific measure
* Update bmp280.h
* quick fix oups
* less redundant terms
* Added a MQTT pub/sub example of using AWS IoT (via ECC based TLS1.2 connection).
* Fixed a buffer overflow issue when receiving large MQTT packet.
* Reset TLS connection on read/write errors.
The BME280 is close to compatible with the existing BMP280 and extends it with support for measuring humidity, so support has been bundled into the bmp280 driver.
The example now auto-detects the device and displays the humidity for the BME280.
The I2C bus initialization has been moved out of the bmp280 driver to support multiple devices.
The check-id and reset logic has been bundled into the driver initialization. It needs to be re-initialized after reset anyway and the chip-id is need to initialize it, just re-initialize to reset.
Support has been added for multiple devices. The calibration data storage needs to be managed by the caller rather than static data. The caller can choose the I2C address to allow two BMx280 devices to be used on the same I2C bus.
An interface has been added to return the measurement values in an integer fixed float format. The float format interface is still there.
All the values are read in one I2C transaction to ensure they are a consistent set.
Renamed bmp280_calib_t to bmp280_t, and removed read_register8.
An application using multiple I2C devices will need it's own
loop. This reworks the code to make the detection, calibration
constant loading, and measurment functions available too without
having to use the bmp810 task which is still retained.
Adds support for oversampling.
Fixes a bug in the calculation of the temperature.
Better error handling. Checks for I2C errors and errors in the loading
of the calibration constants and propagates these up.
Configure the pins as open-drain just in case the code forces them
high although it should be configuring them as inputs to let them float high.
Initialize the pins when the driver is initialized.
Enable the internal pull-ups to prevent them floating too high if not
connected and damaging the circuit.