aboutsummaryrefslogtreecommitdiff
path: root/example/pio_mcp9808.cc
diff options
context:
space:
mode:
Diffstat (limited to 'example/pio_mcp9808.cc')
-rw-r--r--example/pio_mcp9808.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/pio_mcp9808.cc b/example/pio_mcp9808.cc
index 446afbf..cad8990 100644
--- a/example/pio_mcp9808.cc
+++ b/example/pio_mcp9808.cc
@@ -50,7 +50,7 @@ int main(int argc, char* argv[]) {
val = ntohs(val);
float temp = (val >> 4) & 0xFF;
- temp += (float)(val & 0xF) / 16;
+ temp += static_cast<float>(val & 0xF) / 16;
printf("Temp: %f\n", temp);
BI2cDevice_delete(i2c_device);