adding one to match outlet id
This commit is contained in:
@@ -42,19 +42,19 @@ void ePowerSwitchEquipment::refreshOutlet(int outletId) {
|
||||
{
|
||||
static const std::string str1 = "Outlet ";
|
||||
static const std::string str2 = " name";
|
||||
usernameVarname = insert(&str1, outletId, &str2);
|
||||
usernameVarname = insert(&str1, outletId + 1, &str2);
|
||||
}
|
||||
std::string requestedVarname;
|
||||
{
|
||||
static const std::string str1 = "|-> ";
|
||||
static const std::string str2 = " requested";
|
||||
requestedVarname = insert(&str1, outletId, &str2);
|
||||
requestedVarname = insert(&str1, outletId + 1, &str2);
|
||||
}
|
||||
std::string currentVarname;
|
||||
{
|
||||
static const std::string str1 = "\\-> ";
|
||||
static const std::string str2 = " current";
|
||||
currentVarname = insert(&str1, outletId, &str2);
|
||||
currentVarname = insert(&str1, outletId + 1, &str2);
|
||||
}
|
||||
std::string midasUsername;
|
||||
{
|
||||
@@ -170,18 +170,33 @@ void ePowerSwitchEquipment::updateOutletNumber() {
|
||||
*/
|
||||
for (int i = epicsOutletNumber; i < this->numberOfOutlet; i++) {
|
||||
|
||||
std::string requestedVarname;
|
||||
std::string currentVarname;
|
||||
std::string usernameVarname;
|
||||
{
|
||||
static const std::string str1 = "Outlet ";
|
||||
static const std::string str2a = " current";
|
||||
static const std::string str2b = " requested";
|
||||
requestedVarname = insert(&str1, i, &str2a);
|
||||
currentVarname = insert(&str1, i, &str2b);
|
||||
static const std::string str2 = " name";
|
||||
usernameVarname = insert(&str1, i + 1, &str2);
|
||||
}
|
||||
std::string requestedVarname;
|
||||
{
|
||||
static const std::string str1 = "|-> ";
|
||||
static const std::string str2 = " requested";
|
||||
requestedVarname = insert(&str1, i + 1, &str2);
|
||||
}
|
||||
std::string currentVarname;
|
||||
{
|
||||
static const std::string str1 = "\\-> ";
|
||||
static const std::string str2 = " current";
|
||||
currentVarname = insert(&str1, i + 1, &str2);
|
||||
}
|
||||
|
||||
MVOdbError ovbError;
|
||||
|
||||
fOdbEqVariables->Delete(usernameVarname.c_str(), &ovbError);
|
||||
if (ovbError.fError) {
|
||||
fMfe->Msg(MERROR, __FUNCTION__, ovbError.fErrorString);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fOdbEqVariables->Delete(requestedVarname.c_str(), &ovbError);
|
||||
if (ovbError.fError) {
|
||||
fMfe->Msg(MERROR, __FUNCTION__, ovbError.fErrorString);
|
||||
|
||||
Reference in New Issue
Block a user