Load command buffer sizes from configuration
Sets values for qpiws, qmod and qpigs from configuration file if they are available.
See commit: dfbb0ecc06
This commit is contained in:
@@ -43,7 +43,7 @@ string devicename;
|
||||
int runinterval;
|
||||
float ampfactor;
|
||||
float wattfactor;
|
||||
int qpiri;
|
||||
int qpiri, qpiws, qmod, qpigs;
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
@@ -93,6 +93,12 @@ void getSettingsFile(string filename) {
|
||||
attemptAddSetting(&wattfactor, linepart2);
|
||||
else if(linepart1 == "qpiri")
|
||||
attemptAddSetting(&qpiri, linepart2);
|
||||
else if(linepart1 == "qpiws")
|
||||
attemptAddSetting(&qpiws, linepart2);
|
||||
else if(linepart1 == "qmod")
|
||||
attemptAddSetting(&qmod, linepart2);
|
||||
else if(linepart1 == "qpigs")
|
||||
attemptAddSetting(&qpigs, linepart2);
|
||||
else
|
||||
continue;
|
||||
}
|
||||
@@ -174,7 +180,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
bool ups_status_changed(false);
|
||||
ups = new cInverter(devicename,qpiri);
|
||||
ups = new cInverter(devicename,qpiri,qpiws,qmod,qpigs);
|
||||
|
||||
// Logic to send 'raw commands' to the inverter..
|
||||
if (!rawcmd.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user