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
|
||||
# reading compared to measurement tools. Normally this will remain '1'
|
||||
watt_factor=1.01
|
||||
|
||||
qpiri=97
|
||||
|
||||
@@ -176,7 +176,7 @@ void cInverter::poll() {
|
||||
|
||||
// Reading QPIRI status
|
||||
if (!ups_qpiri_changed) {
|
||||
if (query("QPIRI", 97)) {
|
||||
if (query("QPIRI", qpiri)) {
|
||||
m.lock();
|
||||
strcpy(status2, (const char*)buf+1);
|
||||
m.unlock();
|
||||
|
||||
@@ -34,6 +34,8 @@ class cInverter {
|
||||
string *GetQpigsStatus();
|
||||
string *GetWarnings();
|
||||
|
||||
int qpiri;
|
||||
|
||||
int GetMode();
|
||||
void ExecuteCmd(const std::string cmd);
|
||||
};
|
||||
|
||||
@@ -43,6 +43,7 @@ string devicename;
|
||||
int runinterval;
|
||||
float ampfactor;
|
||||
float wattfactor;
|
||||
int qpiri;
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
@@ -90,6 +91,8 @@ void getSettingsFile(string filename) {
|
||||
attemptAddSetting(&wattfactor, linepart2);
|
||||
else if(linepart1 == "watt_factor")
|
||||
attemptAddSetting(&wattfactor, linepart2);
|
||||
else if(linepart1 == "qpiri")
|
||||
attemptAddSetting(&qpiri, linepart2);
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user