Skip to content

Commit f1058b8

Browse files
Some minor example promotion cleanup
1 parent b7bb3e4 commit f1058b8

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

libraries/BluetoothHIDMaster/examples/KeyboardPiano/KeyboardPiano.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void mb(void *cbdata, int butt, bool down) {
9191
inline uint32_t stepForHz(float hz) {
9292
const float stepHz = 1000.0 / 44100.0;
9393
const float step = hz * stepHz;
94-
return (uint32_t)(step * 65536.0);
94+
return (uint32_t)(step * 65536.0f);
9595
}
9696

9797
uint32_t keyStepMap[128]; // The frequency of any raw HID key

libraries/BluetoothHIDMaster/examples/KeyboardPianoBLE/KeyboardPianoBLE.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void mb(void *cbdata, int butt, bool down) {
9191
inline uint32_t stepForHz(float hz) {
9292
const float stepHz = 1000.0 / 44100.0;
9393
const float step = hz * stepHz;
94-
return (uint32_t)(step * 65536.0);
94+
return (uint32_t)(step * 65536.0f);
9595
}
9696

9797
uint32_t keyStepMap[128]; // The frequency of any raw HID key

libraries/Mouse/examples/Circle/Circle.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void loop() {
1717
float r = 100;
1818
float ox = 0.0;
1919
float oy = 0.0;
20-
for (float a = 0; a < 2.0 * 3.14159; a += 0.1) {
20+
for (float a = 0.0f; a < 2.0f * 3.14159f; a += 0.1f) {
2121
float ax = r * cos(a);
2222
float ay = r * sin(a);
2323
float dx = ax - ox;

libraries/MouseAbsolute/examples/CircleAbsolute/CircleAbsolute.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void loop() {
1717
float r = 1000;
1818
for (float cx = 1000; cx <= 16000; cx += 4000) {
1919
for (float cy = 1000; cy <= 16000; cy += 4000) {
20-
for (float a = 0; a < 2.0 * 3.14159; a += 0.1) {
20+
for (float a = 0.0f; a < 2.0f * 3.14159f; a += 0.1f) {
2121
float ax = r * cos(a);
2222
float ay = r * sin(a);
2323
MouseAbsolute.move(ax + cx, ay + cy, 0);

libraries/SD/examples/CardInfo/CardInfo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void setup() {
137137
volumesize /= 1024;
138138
Serial.println(volumesize);
139139
Serial.print("Volume size (Gb): ");
140-
Serial.println((float)volumesize / 1024.0);
140+
Serial.println((float)volumesize / 1024.0f);
141141

142142
Serial.print("Card size: ");
143143
Serial.println((float)SD.size64() / 1000);

libraries/SingleFileDrive/examples/DataLoggerUSB/DataLoggerUSB.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void loop() {
8282
// Don't want the USB to connect during an update!
8383
File f = LittleFS.open("data.csv", "a");
8484
if (f) {
85-
f.printf("%lu,%lu,%f,%lu\n", cnt++, millis(), temp, hwrand);
85+
f.printf("%lu,%lu,%f,%lu\n", cnt++, millis(), (double)temp, hwrand);
8686
f.close();
8787
}
8888
}

0 commit comments

Comments
 (0)