예제 #1
0
void reevaluateLedConfig(void)
{
    updateLedCount();
    determineLedStripDimensions();
    determineOrientationLimits();
    updateLedRingCounts();
}
예제 #2
0
void reevaluateLedConfig(void)
{
    updateLedCount();
    updateDimensions();
    updateLedRingCounts();
    updateRequiredOverlay();
}
예제 #3
0
void LedManager::addHub(string port,int baudRate,ofColor color)
{
	hubs.push_back(new Hub(numHubs,port,baudRate,color));
	numHubs = hubs.size();	

	printf("Add hub, new hub size %i\n",numHubs);

	updateLedCount();
}
예제 #4
0
void LedManager::removeHub(int hubIndex)
{
	if(hubIndex == -1) hubIndex = numHubs-1;
	if(hubIndex < numHubs && numHubs > 0) hubs.erase(hubs.begin()+hubIndex);

	
	numHubs = hubs.size();

	for(int i=0;i<numHubs;i++) hubs[i]->hubIndex = i;

	updateLedCount();
}
예제 #5
0
void LedManager::addHub(ofxXmlSettings settings, int hubIndex)
{
	printf("Add Hub %i\n",hubIndex);
		
	//tmp
	ofColor colors[3] = {ofColor::orangeRed,ofColor::aliceBlue,ofColor::forestGreen};
	
	hubs.push_back(new Hub(settings,hubIndex,colors[hubIndex]));
	numHubs = hubs.size();	
	printf("Add hub, new hub size %i\n",numHubs);

	updateLedCount();
}
예제 #6
0
void LedManager::loadSettings(ofxXmlSettings settings)
{
	settings.pushTag("leds");

	int loadedHubs = settings.getNumTags("hub");

	printf("Loaded hubs %i\n",loadedHubs);

	for(int i=0;i<loadedHubs;i++)
	{
		addHub(settings,i);
		//hubs[i]->loadSettings(settings,i);
	}
		
 
	settings.popTag();

	updateLedCount();

	updatePositions();
	updateLedMap();
}
예제 #7
0
void reevaluateLedConfig(void)
{
    updateLedCount();
    updateDimensions();
    updateLedRingCounts();
}