diff options
-rw-r--r-- | LightInstallation.py | 1 | ||||
-rw-r--r-- | config/Outdoor.xml | 61 | ||||
-rw-r--r-- | layouts/BasicSixStrip.xml | 62 |
3 files changed, 64 insertions, 60 deletions
diff --git a/LightInstallation.py b/LightInstallation.py index 5882806..07fa8fc 100644 --- a/LightInstallation.py +++ b/LightInstallation.py @@ -84,6 +84,7 @@ class LightInstallation: def initializeComponent(self, config): components = [] if config != None: + config = configGetter.resolveConfigInheritance(config) for configItem in config.getchildren(): [module,className] = configItem.find('Class').text.split('.') exec('from ' + module+'.'+className + ' import *') diff --git a/config/Outdoor.xml b/config/Outdoor.xml index 1cf00e4..b34e18a 100644 --- a/config/Outdoor.xml +++ b/config/Outdoor.xml @@ -6,66 +6,7 @@ </Defaults> </InstallationConfiguration> <PixelConfiguration> - <PixelStrip> - <Class>layouts.LineLayout</Class> - <Args> - <Id>strip1</Id> - <pixelToPixelSpacing>4</pixelToPixelSpacing> - <spacing>4</spacing> - <numPixels>50</numPixels> - <originLocation>(10,20)</originLocation> - </Args> - </PixelStrip> - <PixelStrip> - <Class>layouts.LineLayout</Class> - <Args> - <Id>strip2</Id> - <pixelToPixelSpacing>4</pixelToPixelSpacing> - <spacing>4</spacing> - <numPixels>50</numPixels> - <originLocation>(10,24)</originLocation> - </Args> - </PixelStrip> - <PixelStrip> - <Class>layouts.LineLayout</Class> - <Args> - <Id>strip3</Id> - <pixelToPixelSpacing>4</pixelToPixelSpacing> - <spacing>4</spacing> - <numPixels>50</numPixels> - <originLocation>(10,28)</originLocation> - </Args> - </PixelStrip> - <PixelStrip> - <Class>layouts.LineLayout</Class> - <Args> - <Id>strip4</Id> - <pixelToPixelSpacing>4</pixelToPixelSpacing> - <spacing>4</spacing> - <numPixels>50</numPixels> - <originLocation>(10,32)</originLocation> - </Args> - </PixelStrip> - <PixelStrip> - <Class>layouts.LineLayout</Class> - <Args> - <Id>strip5</Id> - <pixelToPixelSpacing>4</pixelToPixelSpacing> - <spacing>4</spacing> - <numPixels>50</numPixels> - <originLocation>(10,36)</originLocation> - </Args> - </PixelStrip> - <PixelStrip> - <Class>layouts.LineLayout</Class> - <Args> - <Id>strip6</Id> - <pixelToPixelSpacing>4</pixelToPixelSpacing> - <spacing>4</spacing> - <numPixels>50</numPixels> - <originLocation>(10,40)</originLocation> - </Args> - </PixelStrip> + <InheritsFrom>layouts/BasicSixStrip.xml</InheritsFrom> </PixelConfiguration> <PixelMapperConfiguration> <PixelMapper> diff --git a/layouts/BasicSixStrip.xml b/layouts/BasicSixStrip.xml new file mode 100644 index 0000000..38c50d4 --- /dev/null +++ b/layouts/BasicSixStrip.xml @@ -0,0 +1,62 @@ +<PixelConfiguration> + <PixelStrip> + <Class>layouts.LineLayout</Class> + <Args> + <Id>strip1</Id> + <pixelToPixelSpacing>4</pixelToPixelSpacing> + <spacing>4</spacing> + <numPixels>50</numPixels> + <originLocation>(10,20)</originLocation> + </Args> + </PixelStrip> + <PixelStrip> + <Class>layouts.LineLayout</Class> + <Args> + <Id>strip2</Id> + <pixelToPixelSpacing>4</pixelToPixelSpacing> + <spacing>4</spacing> + <numPixels>50</numPixels> + <originLocation>(10,24)</originLocation> + </Args> + </PixelStrip> + <PixelStrip> + <Class>layouts.LineLayout</Class> + <Args> + <Id>strip3</Id> + <pixelToPixelSpacing>4</pixelToPixelSpacing> + <spacing>4</spacing> + <numPixels>50</numPixels> + <originLocation>(10,28)</originLocation> + </Args> + </PixelStrip> + <PixelStrip> + <Class>layouts.LineLayout</Class> + <Args> + <Id>strip4</Id> + <pixelToPixelSpacing>4</pixelToPixelSpacing> + <spacing>4</spacing> + <numPixels>50</numPixels> + <originLocation>(10,32)</originLocation> + </Args> + </PixelStrip> + <PixelStrip> + <Class>layouts.LineLayout</Class> + <Args> + <Id>strip5</Id> + <pixelToPixelSpacing>4</pixelToPixelSpacing> + <spacing>4</spacing> + <numPixels>50</numPixels> + <originLocation>(10,36)</originLocation> + </Args> + </PixelStrip> + <PixelStrip> + <Class>layouts.LineLayout</Class> + <Args> + <Id>strip6</Id> + <pixelToPixelSpacing>4</pixelToPixelSpacing> + <spacing>4</spacing> + <numPixels>50</numPixels> + <originLocation>(10,40)</originLocation> + </Args> + </PixelStrip> +</PixelConfiguration> |