Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Oct 31, 2022
1 parent b13b34f commit dfabb31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions examples/getcurrent/getcurrent.ino
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ void setup(void)
// will pause Zero, Leonardo, etc until serial console opens
delay(1);
}

uint32_t currentFrequency;

Serial.println("Hello!");

Expand Down
5 changes: 4 additions & 1 deletion examples/ina_poweroled/ina_poweroled.ino
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,12 @@ void update_power_display() {
// Compute load voltage, power, and milliamp-hours.
float loadvoltage = busvoltage + (shuntvoltage / 1000);
float power_mW = loadvoltage * current_mA;
(void)power_mW;

total_mA += current_mA;
total_sec += 1;
float total_mAH = total_mA / 3600.0;
(void)total_mAH;

// Update display.
display.clearDisplay();
Expand All @@ -203,7 +206,7 @@ void update_power_display() {
display.display();
}

void printSIValue(float value, char* units, int precision, int maxWidth) {
void printSIValue(float value, const char* units, int precision, int maxWidth) {
// Print a value in SI units with the units left justified and value right justified.
// Will switch to milli prefix if value is below 1.

Expand Down

0 comments on commit dfabb31

Please sign in to comment.