Skip to content

Commit

Permalink
corrected condition for sagv and frequency thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
CircuitSetup committed Oct 5, 2020
1 parent 724beeb commit 1cc43f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ATM90E32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void ATM90E32::begin(int pin, unsigned short lineFreq, unsigned short pgagain, u

/* Enable SPI */
SPI.begin();

Serial.println("Connecting to ATM90E32");
#if defined(ENERGIA)
SPI.setBitOrder(MSBFIRST);
Expand All @@ -457,7 +457,7 @@ void ATM90E32::begin(int pin, unsigned short lineFreq, unsigned short pgagain, u
unsigned short sagV;
unsigned short FreqHiThresh;
unsigned short FreqLoThresh;
if (_lineFreq == 4485 || _lineFreq == 5231)
if (_lineFreq == 4485 || _lineFreq == 4231)
{
sagV = 90;
FreqHiThresh = 61 * 100;
Expand Down
2 changes: 1 addition & 1 deletion ATM90E32.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ The MIT License (MIT)
#define ANenergyCH 0xAF // C Reverse Harm. Energy

/* POWER & P.F. REGISTERS */
#define PmeanA 0xB1 // A Mean Power (P)
#define PmeanT 0xB0 // Total Mean Power (P)
#define PmeanA 0xB1 // A Mean Power (P)
#define PmeanB 0xB2 // B Mean Power (P)
#define PmeanC 0xB3 // C Mean Power (P)
#define QmeanT 0xB4 // Total Mean Power (Q)
Expand Down

0 comments on commit 1cc43f9

Please sign in to comment.