diff --git a/components/zh_ds18b20/README.md b/components/zh_ds18b20/README.md index 2f12d14..03e8d02 100644 --- a/components/zh_ds18b20/README.md +++ b/components/zh_ds18b20/README.md @@ -7,7 +7,7 @@ ## Dependencies -1. [zh_onewire](http://git.zh.com.ru/alexey.zholtikov/zh_onewire.git) +1. [zh_onewire](https://github.com/aZholtikov/zh_onewire.git) ## [Function description](http://zh-ds18b20.zh.com.ru) @@ -17,8 +17,8 @@ In an existing project, run the following command to install the components: ```text cd ../your_project/components -git clone http://git.zh.com.ru/alexey.zholtikov/zh_onewire.git -git clone http://git.zh.com.ru/alexey.zholtikov/zh_ds18b20.git +git clone https://github.com/aZholtikov/zh_onewire.git +git clone https://github.com/aZholtikov/zh_ds18b20.git ``` In the application, add the component: @@ -36,8 +36,10 @@ One or more 1-Wire DS18B20 sensors on bus: void app_main(void) { - uint8_t *rom; - float temperature; + esp_log_level_set("zh_onewire", ESP_LOG_NONE); + esp_log_level_set("zh_ds18b20", ESP_LOG_NONE); + uint8_t *rom = NULL; + float temperature = 0.0; zh_onewire_init(GPIO_NUM_5); if (zh_onewire_reset() != ESP_OK) { diff --git a/components/zh_ds18b20/include/zh_ds18b20.h b/components/zh_ds18b20/include/zh_ds18b20.h index 4e670aa..386df6b 100644 --- a/components/zh_ds18b20/include/zh_ds18b20.h +++ b/components/zh_ds18b20/include/zh_ds18b20.h @@ -17,18 +17,18 @@ extern "C" #endif /** - * @brief Read temperature from a specific 1-Wire device on bus. + * @brief Read temperature from a specific 1-Wire device on bus. * - * @param[in] device Pointer to a buffer containing an eight-byte rom value. Can be NULL if only one 1-Wire device is present on the bus. + * @param[in] device Pointer to a buffer containing an eight-byte rom value. Can be NULL if only one 1-Wire device is present on the bus. * - * @param[out] temperature Pointer to a buffer containing the received temperature. + * @param[out] temperature Pointer to a buffer containing the received temperature. * - * @attention 1-Wire bus must be initialized first. @code zh_onewire_init(GPIO_NUM_X) @endcode + * @attention 1-Wire bus must be initialized first. @code zh_onewire_init(GPIO_NUM_X) @endcode * * @return * - ESP_OK if read was successful * - ESP_FAIL if any error - * - ESP_ERR_INVALID_CRC if case an read error + * - ESP_ERR_INVALID_CRC if check CRC is fail */ esp_err_t zh_ds18b20_read(const uint8_t *device, float *temperature); diff --git a/components/zh_ds18b20/version.txt b/components/zh_ds18b20/version.txt index d5e98f7..afaf360 100644 --- a/components/zh_ds18b20/version.txt +++ b/components/zh_ds18b20/version.txt @@ -1 +1 @@ -1.3.2 \ No newline at end of file +1.0.0 \ No newline at end of file diff --git a/components/zh_ds18b20/zh_ds18b20.c b/components/zh_ds18b20/zh_ds18b20.c index 9f333df..0895bf1 100644 --- a/components/zh_ds18b20/zh_ds18b20.c +++ b/components/zh_ds18b20/zh_ds18b20.c @@ -1,6 +1,7 @@ /** * @file * The main code of the zh_ds18b20 component. + * */ #include "zh_ds18b20.h"