Skip to content

Commit

Permalink
Merge pull request #445 from UncleRus/fix-remove-i2cdev-logd
Browse files Browse the repository at this point in the history
Fix printf() format in examples and components
  • Loading branch information
UncleRus authored Aug 8, 2022
2 parents 4f05043 + 03c71cd commit 43b6498
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/bmp180/bmp180.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* MIT Licensed as described in the file LICENSE
*/
#include "bmp180.h"

#include <inttypes.h>
#include <esp_err.h>
#include <esp_log.h>
#include <ets_sys.h>
Expand Down
1 change: 1 addition & 0 deletions components/hmc5883l/hmc5883l.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* BSD Licensed as described in the file LICENSE
*/
#include "hmc5883l.h"
#include <inttypes.h>
#include <esp_log.h>
#include <esp_err.h>
#include <esp_timer.h>
Expand Down
2 changes: 1 addition & 1 deletion components/pca9685/pca9685.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include "pca9685.h"
#include <esp_idf_lib_helpers.h>

#include <inttypes.h>
#include <esp_system.h>
#include <esp_log.h>
#include <ets_sys.h>
Expand Down
1 change: 1 addition & 0 deletions components/rda5807m/rda5807m.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* BSD Licensed as described in the file LICENSE
*/
#include "rda5807m.h"
#include <inttypes.h>
#include <esp_idf_lib_helpers.h>
#include <esp_log.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions examples/ds18x20/multi/main/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <inttypes.h>
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
Expand Down
3 changes: 2 additions & 1 deletion examples/ina3221/default/main/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <inttypes.h>
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
Expand Down Expand Up @@ -91,7 +92,7 @@ void task(void *pvParameters)
// Get voltage in millivolts and current in milliamperes
ESP_ERROR_CHECK(ina3221_get_shunt_value(&dev, i, &shunt_voltage, &shunt_current));

printf("\nC%u:Measure number %lu\n", i + 1, measure_number);
printf("\nC%u:Measure number %" PRIu32 "\n", i + 1, measure_number);
if (warning && (i + 1) == WARNING_CHANNEL)
printf("C%u:Warning Current > %.2f mA !!\n", i + 1, WARNING_CURRENT);
printf("C%u:Bus voltage: %.02f V\n", i + 1, bus_voltage);
Expand Down
1 change: 1 addition & 0 deletions examples/ls7366r/default/main/main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <freertos/queue.h>
Expand Down
1 change: 1 addition & 0 deletions examples/mcp23x17/mcp23s17/main/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <inttypes.h>
#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
Expand Down
1 change: 1 addition & 0 deletions examples/ms5611/default/main/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <inttypes.h>
#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
Expand Down
1 change: 1 addition & 0 deletions examples/sgp40/default/main/main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Simple example with humidity sensor and SGP40
*/
#include <inttypes.h>
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
Expand Down

0 comments on commit 43b6498

Please sign in to comment.