Subversion Repositories tpanel

Rev

Rev 387 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 387 Rev 388
Line 959... Line 959...
959
    REG_CMD(doCPF, "^CPF");     // Clear all page flips from a button.
959
    REG_CMD(doCPF, "^CPF");     // Clear all page flips from a button.
960
    REG_CMD(doDPF, "^DPF");     // Delete page flips from button if it already exists.
960
    REG_CMD(doDPF, "^DPF");     // Delete page flips from button if it already exists.
961
    REG_CMD(doENA, "^ENA");     // Enable or disable buttons with a set variable text range.
961
    REG_CMD(doENA, "^ENA");     // Enable or disable buttons with a set variable text range.
962
    REG_CMD(doFON, "^FON");     // Set a font to a specific Font ID value for those buttons with a range.
962
    REG_CMD(doFON, "^FON");     // Set a font to a specific Font ID value for those buttons with a range.
963
    REG_CMD(getFON, "?FON");    // Get the current font index.
963
    REG_CMD(getFON, "?FON");    // Get the current font index.
964
//    REG_CMD(doGDI, "^GDI");     // Change the bargraph drag increment.
964
    REG_CMD(doGDI, "^GDI");     // Change the bargraph drag increment.
965
//    REG_CMD(doGDV, "^GDV");     // Invert the joystick axis to move the origin to another corner.
965
//    REG_CMD(doGDV, "^GDV");     // Invert the joystick axis to move the origin to another corner.
966
    REG_CMD(doGLH, "^GLH");     // Change the bargraph upper limit.
966
    REG_CMD(doGLH, "^GLH");     // Change the bargraph upper limit.
967
    REG_CMD(doGLL, "^GLL");     // Change the bargraph lower limit.
967
    REG_CMD(doGLL, "^GLL");     // Change the bargraph lower limit.
-
 
968
    REG_CMD(doGRD, "^GRD");     // Change the bargraph ramp down time.
-
 
969
    REG_CMD(doGRU, "^GRU");     // Change the bargraph ramp up time.
968
    REG_CMD(doGSN, "^GSN");     // Set slider/cursor name.
970
    REG_CMD(doGSN, "^GSN");     // Set slider/cursor name.
969
    REG_CMD(doGSC, "^GSC");     // Change the bargraph slider color or joystick cursor color.
971
    REG_CMD(doGSC, "^GSC");     // Change the bargraph slider color or joystick cursor color.
970
    REG_CMD(doICO, "^ICO");     // Set the icon to a button.
972
    REG_CMD(doICO, "^ICO");     // Set the icon to a button.
971
    REG_CMD(getICO, "?ICO");    // Get the current icon index.
973
    REG_CMD(getICO, "?ICO");    // Get the current icon index.
972
    REG_CMD(doJSB, "^JSB");     // Set bitmap/picture alignment using a numeric keypad layout for those buttons with a defined address range.
974
    REG_CMD(doJSB, "^JSB");     // Set bitmap/picture alignment using a numeric keypad layout for those buttons with a defined address range.
Line 9106... Line 9108...
9106
    __success = true;
9108
    __success = true;
9107
    setAllDone();
9109
    setAllDone();
9108
#endif
9110
#endif
9109
}
9111
}
9110
 
9112
 
-
 
9113
void TPageManager::doGDI(int port, vector<int>& channels, vector<std::string>& pars)
-
 
9114
{
-
 
9115
    DECL_TRACER("TPageManager::doGDI(int port, vector<int>& channels, vector<std::string>& pars)");
-
 
9116
 
-
 
9117
    if (pars.size() < 1)
-
 
9118
    {
-
 
9119
        MSG_ERROR("Expecting 1 parameter but got " << pars.size() << "! Ignoring command.");
-
 
9120
        return;
-
 
9121
    }
-
 
9122
 
-
 
9123
    TError::clear();
-
 
9124
    int inc = atoi(pars[0].c_str());
-
 
9125
 
-
 
9126
    if (inc < 0)
-
 
9127
    {
-
 
9128
        MSG_ERROR("Invalid drag increment of " << inc << "!");
-
 
9129
        return;
-
 
9130
    }
-
 
9131
 
-
 
9132
    vector<TMap::MAP_T> map = findButtons(port, channels);
-
 
9133
 
-
 
9134
    if (TError::isError() || map.empty())
-
 
9135
        return;
-
 
9136
 
-
 
9137
    vector<Button::TButton *> buttons = collectButtons(map);
-
 
9138
 
-
 
9139
    if (buttons.size() > 0)
-
 
9140
    {
-
 
9141
        vector<Button::TButton *>::iterator mapIter;
-
 
9142
 
-
 
9143
        for (mapIter = buttons.begin(); mapIter != buttons.end(); mapIter++)
-
 
9144
        {
-
 
9145
            Button::TButton *bt = *mapIter;
-
 
9146
            bt->setBargraphDragIncrement(inc);
-
 
9147
        }
-
 
9148
    }
-
 
9149
}
-
 
9150
/* Currently not implemented
-
 
9151
void TPageManager::doGDV(int port, vector<int>& channels, vector<std::string>& pars)
-
 
9152
{
-
 
9153
    DECL_TRACER("TPageManager::doGDV(int port, vector<int>& channels, vector<std::string>& pars)");
-
 
9154
}
-
 
9155
*/
9111
/**
9156
/**
9112
 * Change the bargraph upper limit.
9157
 * Change the bargraph upper limit.
9113
 */
9158
 */
9114
void TPageManager::doGLH(int port, vector<int>& channels, vector<std::string>& pars)
9159
void TPageManager::doGLH(int port, vector<int>& channels, vector<std::string>& pars)
9115
{
9160
{
Line 9222... Line 9267...
9222
        }
9267
        }
9223
    }
9268
    }
9224
}
9269
}
9225
 
9270
 
9226
/*
9271
/*
-
 
9272
 * Set bargraph ramp down time in 1/10 seconds.
-
 
9273
 */
-
 
9274
void TPageManager::doGRD(int port, vector<int>& channels, vector<string>& pars)
-
 
9275
{
-
 
9276
    DECL_TRACER("TPageManager::doGRD(int port, vector<int>& channels, vector<string>& pars)");
-
 
9277
 
-
 
9278
    if (pars.size() < 1)
-
 
9279
    {
-
 
9280
        MSG_ERROR("Expecting 1 parameter but got " << pars.size() << "! Ignoring command.");
-
 
9281
        return;
-
 
9282
    }
-
 
9283
 
-
 
9284
    TError::clear();
-
 
9285
    int t = atoi(pars[0].c_str());
-
 
9286
 
-
 
9287
    if (t < 0)
-
 
9288
    {
-
 
9289
        MSG_ERROR("Invalid ramp down time limit " << t << "!");
-
 
9290
        return;
-
 
9291
    }
-
 
9292
 
-
 
9293
    vector<TMap::MAP_T> map = findButtons(port, channels);
-
 
9294
 
-
 
9295
    if (TError::isError() || map.empty())
-
 
9296
        return;
-
 
9297
 
-
 
9298
    vector<Button::TButton *> buttons = collectButtons(map);
-
 
9299
 
-
 
9300
    if (buttons.size() > 0)
-
 
9301
    {
-
 
9302
        vector<Button::TButton *>::iterator mapIter;
-
 
9303
 
-
 
9304
        for (mapIter = buttons.begin(); mapIter != buttons.end(); mapIter++)
-
 
9305
        {
-
 
9306
            Button::TButton *bt = *mapIter;
-
 
9307
            bt->setBargraphRampDownTime(t);
-
 
9308
        }
-
 
9309
    }
-
 
9310
}
-
 
9311
 
-
 
9312
/*
-
 
9313
 * Set bargraph ramp up time in 1/10 seconds.
-
 
9314
 */
-
 
9315
void TPageManager::doGRU(int port, vector<int>& channels, vector<string>& pars)
-
 
9316
{
-
 
9317
    DECL_TRACER("TPageManager::doGRU(int port, vector<int>& channels, vector<string>& pars)");
-
 
9318
 
-
 
9319
    if (pars.size() < 1)
-
 
9320
    {
-
 
9321
        MSG_ERROR("Expecting 1 parameter but got " << pars.size() << "! Ignoring command.");
-
 
9322
        return;
-
 
9323
    }
-
 
9324
 
-
 
9325
    TError::clear();
-
 
9326
    int t = atoi(pars[0].c_str());
-
 
9327
 
-
 
9328
    if (t < 0)
-
 
9329
    {
-
 
9330
        MSG_ERROR("Invalid ramp up time limit " << t << "!");
-
 
9331
        return;
-
 
9332
    }
-
 
9333
 
-
 
9334
    vector<TMap::MAP_T> map = findButtons(port, channels);
-
 
9335
 
-
 
9336
    if (TError::isError() || map.empty())
-
 
9337
        return;
-
 
9338
 
-
 
9339
    vector<Button::TButton *> buttons = collectButtons(map);
-
 
9340
 
-
 
9341
    if (buttons.size() > 0)
-
 
9342
    {
-
 
9343
        vector<Button::TButton *>::iterator mapIter;
-
 
9344
 
-
 
9345
        for (mapIter = buttons.begin(); mapIter != buttons.end(); mapIter++)
-
 
9346
        {
-
 
9347
            Button::TButton *bt = *mapIter;
-
 
9348
            bt->setBargraphRampUpTime(t);
-
 
9349
        }
-
 
9350
    }
-
 
9351
}
-
 
9352
 
-
 
9353
/*
9227
 * Change the bargraph slider name or joystick cursor name.
9354
 * Change the bargraph slider name or joystick cursor name.
9228
 */
9355
 */
9229
void TPageManager::doGSN(int port, vector<int>& channels, vector<string>& pars)
9356
void TPageManager::doGSN(int port, vector<int>& channels, vector<string>& pars)
9230
{
9357
{
9231
    DECL_TRACER("TPageManager::doGSN(int port, vector<int>& channels, vector<string>& pars)");
9358
    DECL_TRACER("TPageManager::doGSN(int port, vector<int>& channels, vector<string>& pars)");