コード例 #1
0
 void lookForInstanceName(){
    if(msgBytes[currentMsgIndex][currentMsgBufIndex] == '['){
        msgBytes[currentMsgIndex][currentMsgBufIndex] = '\0';
        currentInstanceID = getIndexFromName (&msgBytes[currentMsgIndex][0]);
        currentMsgBufIndex = -1;
        instanceNameRead = true;
    }
 }
コード例 #2
0
ファイル: button_list.cpp プロジェクト: egeldenhuys/prothesis
int button_list::change_colour(string name, string colour)
{
    int index = getIndexFromName(name);

    if (index != -1)
        cButtonList_.at(index)->ApplyColour(QString::fromStdString(colour));


}
コード例 #3
0
ファイル: LedController.cpp プロジェクト: intirix/LedManager
LedController *LedController::create( const char *chipset, uint16_t numLeds )
{
  uint8_t ledChip = getIndexFromName( chipset );
  LedController *controller = new LedController();
  if ( ledChip == 1 )
  {
    controller = new WS2801Controller( numLeds );
  }/*
  else if ( ledChip == 2 )
  {
    controller = new LPD8806Controller( numLeds );
  }*/
  return controller;
}