-Updated Controller loading: now working for Grid:launchScene

This commit is contained in:
Harry van Haaren 2013-10-19 13:24:35 +01:00
parent 88b04ecd6e
commit 25c758208a
2 changed files with 6 additions and 6 deletions

View file

@ -588,8 +588,8 @@ int GenericMIDI::loadController( std::string file )
}
else
{
LUPPP_WARN("%s %s","No controller bindings found at ", file.c_str() );
return LUPPP_RETURN_WARNING;
LUPPP_WARN("%s %s","No input bindings found at ", file.c_str() );
//return LUPPP_RETURN_WARNING;
}
@ -610,8 +610,8 @@ int GenericMIDI::loadController( std::string file )
}
else
{
LUPPP_WARN("%s %s","No controller bindings found at ", file.c_str() );
return LUPPP_RETURN_WARNING;
LUPPP_WARN("%s %s","No output bindings found at ", file.c_str() );
//return LUPPP_RETURN_WARNING;
}

View file

@ -104,7 +104,7 @@ int DiskWriter::writeControllerFile(std::string name ,
// add metadata to binding
// FIXME: get action string from Event class: need to move function from GenericMIDI to there
//cJSON_AddNumberToObject( binding, "action", cJSON_CreateString( "actionStringHere" ) );
cJSON_AddItemToObject( binding, "action", cJSON_CreateString( "gridlogic:launchscene" ) );
cJSON_AddNumberToObject( binding, "status", b.at(i)->status );
cJSON_AddNumberToObject( binding, "data" , b.at(i)->data );
@ -119,7 +119,7 @@ int DiskWriter::writeControllerFile(std::string name ,
// write the sample JSON node to <samplePath>/sample.cfg
stringstream controllerCfgPath;
controllerCfgPath << getenv("HOME") << "/.config/openAV/luppp/controller.cfg";
controllerCfgPath << getenv("HOME") << "/.config/openAV/luppp/" << name << ".ctlr";
ofstream controllerCfgFile;
controllerCfgFile.open ( controllerCfgPath.str().c_str() );