Skip to content

Commit

Permalink
Update to resolve issue openenergymonitor#44
Browse files Browse the repository at this point in the history
To resolve compile error for unused variable.
  • Loading branch information
orcaman98 authored Jan 30, 2019
1 parent 524c76a commit 1f1a84e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EmonLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ void EnergyMonitor::serialprint()
//and Jérôme who alerted us to http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/

long EnergyMonitor::readVcc() {
long result;


//not used on emonTx V3 - as Vcc is always 3.3V - eliminates bandgap error and need for calibration http://harizanov.com/2013/09/thoughts-on-avr-adc-accuracy/

#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined (__AVR_ATmega328P__)
Expand All @@ -247,6 +246,7 @@ long EnergyMonitor::readVcc() {


#if defined(__AVR__)
long result;
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA,ADSC));
Expand Down

0 comments on commit 1f1a84e

Please sign in to comment.