synced nomenclature for vfollower variables #bugfix
This commit is contained in:
parent
6d471fd928
commit
9f172f1c18
4 changed files with 3 additions and 5 deletions
|
|
@ -130,7 +130,7 @@ void loop() {
|
||||||
// Check voltage of first and second stages and compare against thresholds
|
// Check voltage of first and second stages and compare against thresholds
|
||||||
adjustVin();
|
adjustVin();
|
||||||
VComp = analogRead(VCOMP_SENSE_PIN);
|
VComp = analogRead(VCOMP_SENSE_PIN);
|
||||||
VAdj = analogRead(V_FOLLOW_PIN);
|
VFol = analogRead(V_FOLLOW_PIN);
|
||||||
|
|
||||||
// Voltage Follower adjustment
|
// Voltage Follower adjustment
|
||||||
if (VLast > Hyst || VLast < -Hyst) {
|
if (VLast > Hyst || VLast < -Hyst) {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ update the voltMeterConstant variable in pP_config.h with the correct value*/
|
||||||
|
|
||||||
/*------------------------------------------------*/
|
/*------------------------------------------------*/
|
||||||
|
|
||||||
void adjustVin() {
|
void readVin() {
|
||||||
VOld = Vin;
|
VOld = Vin;
|
||||||
Vin = readVcc(), DEC;
|
Vin = readVcc(), DEC;
|
||||||
senseLong = senseThrs * 1024L;
|
senseLong = senseThrs * 1024L;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ void pP_i2c::i2cInput(int bytesReceived) {
|
||||||
}
|
}
|
||||||
switch (cmdRcvd[0]) {
|
switch (cmdRcvd[0]) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
senseInt = (long) cmdRcvd[1];
|
followerInt = (long) cmdRcvd[1];
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case 0x01:
|
case 0x01:
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ long compInt;
|
||||||
|
|
||||||
// Voltage Comparator Adjustment parameters
|
// Voltage Comparator Adjustment parameters
|
||||||
int VComp = 0;
|
int VComp = 0;
|
||||||
int diffCompL = VComp - compInt;
|
|
||||||
int diffCompH = compInt - VComp;
|
|
||||||
|
|
||||||
// Voltage Follower Adjustment parameters
|
// Voltage Follower Adjustment parameters
|
||||||
int VAdj = 0;
|
int VAdj = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue