add qpiri as a configurable value
This commit is contained in:
@@ -21,3 +21,5 @@ amperage_factor=1.0
|
|||||||
# This allos you to modify the wattage in case the inverter is giving an incorrect
|
# This allos you to modify the wattage in case the inverter is giving an incorrect
|
||||||
# reading compared to measurement tools. Normally this will remain '1'
|
# reading compared to measurement tools. Normally this will remain '1'
|
||||||
watt_factor=1.01
|
watt_factor=1.01
|
||||||
|
|
||||||
|
qpiri=97
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ void cInverter::poll() {
|
|||||||
|
|
||||||
// Reading QPIRI status
|
// Reading QPIRI status
|
||||||
if (!ups_qpiri_changed) {
|
if (!ups_qpiri_changed) {
|
||||||
if (query("QPIRI", 97)) {
|
if (query("QPIRI", qpiri)) {
|
||||||
m.lock();
|
m.lock();
|
||||||
strcpy(status2, (const char*)buf+1);
|
strcpy(status2, (const char*)buf+1);
|
||||||
m.unlock();
|
m.unlock();
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ class cInverter {
|
|||||||
string *GetQpigsStatus();
|
string *GetQpigsStatus();
|
||||||
string *GetWarnings();
|
string *GetWarnings();
|
||||||
|
|
||||||
|
int qpiri;
|
||||||
|
|
||||||
int GetMode();
|
int GetMode();
|
||||||
void ExecuteCmd(const std::string cmd);
|
void ExecuteCmd(const std::string cmd);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ string devicename;
|
|||||||
int runinterval;
|
int runinterval;
|
||||||
float ampfactor;
|
float ampfactor;
|
||||||
float wattfactor;
|
float wattfactor;
|
||||||
|
int qpiri;
|
||||||
|
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
|
|
||||||
@@ -90,6 +91,8 @@ void getSettingsFile(string filename) {
|
|||||||
attemptAddSetting(&wattfactor, linepart2);
|
attemptAddSetting(&wattfactor, linepart2);
|
||||||
else if(linepart1 == "watt_factor")
|
else if(linepart1 == "watt_factor")
|
||||||
attemptAddSetting(&wattfactor, linepart2);
|
attemptAddSetting(&wattfactor, linepart2);
|
||||||
|
else if(linepart1 == "qpiri")
|
||||||
|
attemptAddSetting(&qpiri, linepart2);
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user