Commit 9a3974b7 authored by insult's avatar insult

Flyttet timiniimp fra imponatorrepo

parent ae51f5c0
[OutputJobFile]
Version=1.0
[OutputGroup1]
Name=ets.OutJob
Description=
TargetOutputMedium=PDF
VariantName=[No Variations]
VariantScope=1
CurrentConfigurationName=
TargetPrinter=\\http://insane.ed.ntnu.no\Dell Laser Printer 1700n
PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1
OutputMedium1=Print Job
OutputMedium1_Type=Printer
OutputMedium1_Printer=
OutputMedium1_PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1
OutputMedium2=PDF
OutputMedium2_Type=Publish
OutputMedium3=Folder Structure
OutputMedium3_Type=GeneratedFiles
OutputMedium4=Video
OutputMedium4_Type=Multimedia
OutputType1=Composite
OutputName1=Composite Drawing
OutputCategory1=Documentation
OutputDocumentPath1=timiniimp.PcbDoc
OutputVariantName1=
OutputEnabled1=1
OutputEnabled1_OutputMedium1=0
OutputEnabled1_OutputMedium2=1
OutputEnabled1_OutputMedium3=0
OutputEnabled1_OutputMedium4=0
OutputDefault1=0
PageOptions1=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=2|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=1|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4 210 x 297 mm|PrintScaleMode=0
Configuration1_Name1=OutputConfigurationParameter1
Configuration1_Item1=PrintArea=DesignExtent|PrintAreaLowerLeftCornerX=0|PrintAreaLowerLeftCornerY=0|PrintAreaUpperRightCornerX=0|PrintAreaUpperRightCornerY=0|Record=PcbPrintView
Configuration1_Name2=OutputConfigurationParameter2
Configuration1_Item2=IncludeBottomLayerComponents=True|IncludeMultiLayerComponents=True|IncludeTopLayerComponents=True|Index=0|Mirror=False|Name=Multilayer Composite Print|PadNumberFontSize=14|Record=PcbPrintOut|ShowHoles=True|ShowPadNets=False|ShowPadNumbers=False|SubstituteFonts=True
Configuration1_Name3=OutputConfigurationParameter3
Configuration1_Item3=CArc=Full|CFill=Full|Comment=Full|Coordinate=Full|CPad=Full|CRegion=Full|CText=Full|CTrack=Full|CVia=Full|DDSymbolKind=0|DDSymbolSize=500000|DDSymbolSortKind=0|Designator=Full|Dimension=Full|DLayer1=TopLayer|DLayer2=BottomLayer|FArc=Full|FFill=Full|FPad=Full|FRegion=Full|FText=Full|FTrack=Full|FVia=Full|Layer=BottomLayer|Polygon=Full|PrintOutIndex=0|Record=PcbPrintLayer
Configuration1_Name4=OutputConfigurationParameter4
Configuration1_Item4=CArc=Full|CFill=Full|Comment=Full|Coordinate=Full|CPad=Full|CRegion=Full|CText=Full|CTrack=Full|CVia=Full|DDSymbolKind=0|DDSymbolSize=500000|DDSymbolSortKind=0|Designator=Full|Dimension=Full|DLayer1=TopLayer|DLayer2=BottomLayer|FArc=Full|FFill=Full|FPad=Full|FRegion=Full|FText=Full|FTrack=Full|FVia=Full|Layer=Mechanical3|Polygon=Full|PrintOutIndex=0|Record=PcbPrintLayer
Configuration1_Name5=OutputConfigurationParameter5
Configuration1_Item5=CArc=Full|CFill=Full|Comment=Full|Coordinate=Full|CPad=Full|CRegion=Full|CText=Full|CTrack=Full|CVia=Full|DDSymbolKind=0|DDSymbolSize=500000|DDSymbolSortKind=0|Designator=Full|Dimension=Full|DLayer1=TopLayer|DLayer2=BottomLayer|FArc=Full|FFill=Full|FPad=Full|FRegion=Full|FText=Full|FTrack=Full|FVia=Full|Layer=MultiLayer|Polygon=Full|PrintOutIndex=0|Record=PcbPrintLayer
OutputType2=Composite
OutputName2=Copy of Composite Drawing
OutputCategory2=Documentation
OutputDocumentPath2=Array.PcbDoc
OutputVariantName2=
OutputEnabled2=1
OutputEnabled2_OutputMedium1=0
OutputEnabled2_OutputMedium2=2
OutputEnabled2_OutputMedium3=0
OutputEnabled2_OutputMedium4=0
OutputDefault2=0
PageOptions2=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=2|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=1|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4 210 x 297 mm|PrintScaleMode=0
Configuration2_Name1=OutputConfigurationParameter1
Configuration2_Item1=PrintArea=DesignExtent|PrintAreaLowerLeftCornerX=0|PrintAreaLowerLeftCornerY=0|PrintAreaUpperRightCornerX=0|PrintAreaUpperRightCornerY=0|Record=PcbPrintView
Configuration2_Name2=OutputConfigurationParameter2
Configuration2_Item2=IncludeBottomLayerComponents=True|IncludeMultiLayerComponents=True|IncludeTopLayerComponents=True|Index=0|Mirror=False|Name=Multilayer Composite Print|PadNumberFontSize=14|Record=PcbPrintOut|ShowHoles=True|ShowPadNets=False|ShowPadNumbers=False|SubstituteFonts=True
Configuration2_Name3=OutputConfigurationParameter3
Configuration2_Item3=CArc=Full|CFill=Full|Comment=Full|Coordinate=Full|CPad=Full|CRegion=Full|CText=Full|CTrack=Full|CVia=Full|DDSymbolKind=0|DDSymbolSize=500000|DDSymbolSortKind=0|Designator=Full|Dimension=Full|DLayer1=TopLayer|DLayer2=BottomLayer|FArc=Full|FFill=Full|FPad=Full|FRegion=Full|FText=Full|FTrack=Full|FVia=Full|Layer=BottomLayer|Polygon=Full|PrintOutIndex=0|Record=PcbPrintLayer
Configuration2_Name4=OutputConfigurationParameter4
Configuration2_Item4=CArc=Full|CFill=Full|Comment=Full|Coordinate=Full|CPad=Full|CRegion=Full|CText=Full|CTrack=Full|CVia=Full|DDSymbolKind=0|DDSymbolSize=500000|DDSymbolSortKind=0|Designator=Full|Dimension=Full|DLayer1=TopLayer|DLayer2=BottomLayer|FArc=Full|FFill=Full|FPad=Full|FRegion=Full|FText=Full|FTrack=Full|FVia=Full|Layer=Mechanical3|Polygon=Full|PrintOutIndex=0|Record=PcbPrintLayer
Configuration2_Name5=OutputConfigurationParameter5
Configuration2_Item5=CArc=Full|CFill=Full|Comment=Full|Coordinate=Full|CPad=Full|CRegion=Full|CText=Full|CTrack=Full|CVia=Full|DDSymbolKind=0|DDSymbolSize=500000|DDSymbolSortKind=0|Designator=Full|Dimension=Full|DLayer1=TopLayer|DLayer2=BottomLayer|FArc=Full|FFill=Full|FPad=Full|FRegion=Full|FText=Full|FTrack=Full|FVia=Full|Layer=MultiLayer|Polygon=Full|PrintOutIndex=0|Record=PcbPrintLayer
[PublishSettings]
OutputFilePath2=F:\home\Are\imponator\trunk\hw\timiniimp\Project Outputs for timiniimp\ets.PDF
ReleaseManaged2=1
OutputBasePath2=Project Outputs for timiniimp
OutputPathMedia2=
OutputPathOutputer2=[Output Type]
OutputFileName2=ets.PDF
OpenOutput2=1
PromptOverwrite2=1
PublishMethod2=0
ZoomLevel2=50
FitSCHPrintSizeToDoc2=0
FitPCBPrintSizeToDoc2=0
GenerateNetsInfo2=1
MarkPins2=1
MarkNetLabels2=1
MarkPortsId2=1
GenerateTOC=1
OutputFilePath3=F:\home\Are\imponator\trunk\hw\timiniimp\Project Outputs for timiniimp\
ReleaseManaged3=1
OutputBasePath3=Project Outputs for timiniimp
OutputPathMedia3=
OutputPathOutputer3=[Output Type]
OutputFileName3=
OpenOutput3=1
OutputFilePath4=F:\home\Are\imponator\trunk\hw\timiniimp\Project Outputs for timiniimp\
ReleaseManaged4=1
OutputBasePath4=Project Outputs for timiniimp
OutputPathMedia4=
OutputPathOutputer4=[Output Type]
OutputFileName4=
OpenOutput4=1
PromptOverwrite4=1
PublishMethod4=5
ZoomLevel4=50
FitSCHPrintSizeToDoc4=1
FitPCBPrintSizeToDoc4=1
GenerateNetsInfo4=1
MarkPins4=1
MarkNetLabels4=1
MarkPortsId4=1
MediaFormat4=Windows Media file (*.wmv,*.wma,*.asf)
FixedDimensions4=1
Width4=352
Height4=288
MultiFile4=0
FramesPerSecond4=25
FramesPerSecondDenom4=1
AviPixelFormat4=7
AviCompression4=MP42 MS-MPEG4 V2
AviQuality4=100
FFmpegVideoCodecId4=13
FFmpegPixelFormat4=0
FFmpegQuality4=80
WmvVideoCodecName4=Windows Media Video V7
WmvQuality4=80
[GeneratedFilesSettings]
RelativeOutputPath2=F:\home\Are\imponator\trunk\hw\timiniimp\Project Outputs for timiniimp\ets.PDF
OpenOutputs2=1
RelativeOutputPath3=F:\home\Are\imponator\trunk\hw\timiniimp\Project Outputs for timiniimp\
OpenOutputs3=1
AddToProject3=1
TimestampFolder3=0
UseOutputName3=0
OpenODBOutput3=0
OpenGerberOutput3=0
OpenNCDrillOutput3=0
OpenIPCOutput3=0
EnableReload3=0
RelativeOutputPath4=F:\home\Are\imponator\trunk\hw\timiniimp\Project Outputs for timiniimp\
OpenOutputs4=1
<html>
<head>
<META http-equiv="Content-Type" content="text/html">
<style type="text/css">
h1, h2, h3, h4, h5, h6 {
font-family : 'segoe-ui',arial,sans-serif;
font-size:15pt;
font-weight:normal;
line-height:40px;
color : #000;
background-color : #dedede;
padding: 0.3em;
}
body {
font-family : verdana;
background: #f1f1f1;
font-size:13px;
}
td, th {
padding: 0.5em;
text-align : left;
width: auto;
border:1px solid #DEDEDE;
}
th {
background-color : #DEDEDE;
}
th.column1, td.column1 {
text-align: left;
width : 18%;
}
table {
width : 100%;
border-collapse: collapse;
font-size:13px;
}
.front_matter, .front_matter_column1, .front_matter_column2, .front_matter_column3 {
padding-top : 0.1em;
padding-bottom : 0.1em;
border : 0px solid black;
width : auto;
vertical-align: top
}
.front_matter_column1 {
text-align : right;
}
.total_column1, .total_column {
font-weight : bold;
}
.total_column1 {
text-align : right;
}
.front_matter_column2 {
text-align : center;
}
.front_matter_column3 {
text-align : left;
}
.warning, .error {
color : red;
font-weight : bold;
}
tr.onmouseout_odd {
/*background-color : #EEEEE0 */
}
tr.onmouseout_even {
/*background-color : #F3F3E3 */
}
tr.onmouseover_odd, tr.onmouseover_even {
background-color : #FFF;
}
a:link, a:visited, .q a:link,.q a:active,.q {
color: #21489e;
}
a:link.callback, a:visited.callback {
color: #008000
}
a:link.customize, a:visited.customize {
position: absolute;
right: 16px; top: 30px;
font-family:'segoe ui',arial,tahoma,sans-serif;
text-decoration:underline;
font-size:11px;
color:#0066cc;
}
p.contents_level1 {
font-weight : bold;
font-size : 110%;
margin : 0.5em;
}
p.contents_level2 {
position : relative;
left : 20px;
margin : 0.5em;
}
HR{
border-collapse:collapse;
border:none;
border-top:1px solid #dedede;
}
</style>
<style type="text/css" media="print">
body{
background:#fff;
}
a:link.customize{
display:none;
}
table,th,td,hr{
border-color:#999;
background:#fff;
}
</style>
</head>
<body>
<a href="dxpprocess://Client:SetupPreferences?Server=PCB|PageName=General" class="customize"><acronym title="dxpprocess://Client:SetupPreferences?Server=PCB|PageName=General">Reporting Options</acronym></a>
<h1>File in Previous Format</h1>
<table class="front_matter">
<tr class="front_matter">
<td class="front_matter_column1">Date</td>
<td class="front_matter_column2">:</td>
<td class="front_matter_column3">18.08.2015</td>
</tr>
<tr class="front_matter">
<td class="front_matter_column1">Time</td>
<td class="front_matter_column2">:</td>
<td class="front_matter_column3">15:59:05</td>
</tr>
<tr class="front_matter">
<td class="front_matter_column1">Filename</td>
<td class="front_matter_column2">:</td>
<td class="front_matter_column3"><a href="file://D:\Temp\Byggekurs\imponator\hw\timiniimp\timiniimp.PcbDoc" class="file"><acronym title="D:\Temp\Byggekurs\imponator\hw\timiniimp\timiniimp.PcbDoc">D:\Temp\Byggekurs\imponator\hw\timiniimp\timiniimp.PcbDoc</acronym></a></td>
</tr>
</table>
<br>
<table>
<tr>
<th style="text-align : left" colspan="1" class="">Version</th>
<th style="text-align : left" colspan="1" class="">Warning</th>
</tr>
<tr class="onmouseout_even" onmouseover="className = 'onmouseover_even'" onmouseout="className = 'onmouseout_even'">
<td class="column1">Release 12</td>
<td class="column2"><b>CAUTION</b> - Air Gap Width previously controlled by Clearance rule is now controlled by Polygon Connect Style rule's newly introduced Air Gap Width (set to default value). Suggest reviewing each Polygon Connect Style rule's Air Gap Width attribute for correctness.</td>
</tr>
<tr class="onmouseout_even" onmouseover="className = 'onmouseover_even'" onmouseout="className = 'onmouseout_even'">
<td class="column1">Release 13</td>
<td class="column2"><b>CAUTION</b> - Silkscreen Over Component Pads Rules are converted to Silk To Solder Mask Clearance Rules. Suggest examining rule scopes for accuracy.</td>
</tr>
</table>
<br><hr>
<p>This file was generated by <b>an earlier</b> version of the software</p>
</body>
</html>
This diff is collapsed.
Record=TopLevelDocument|FileName=timiniimp.SchDoc
# MCU name
MCU = atmega168
CFLAGS = -g -Os \
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \
-Wall -Wstrict-prototypes \
-Wa,-adhlns=$(<:.c=.lst) \
$(patsubst %,-I%,$(EXTRAINCDIRS))
CFLAGS += -std=gnu99
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
TARGET = imp2005
SRC = $(TARGET).c imp_decoder.c
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
# Programming support using avrdude. Settings and variables.
#
# The settings here only apply for programming the imponator on a *nix
# platform with avrdude version 5 intalled. If you are programming on a
# windows platform, please consult the winavr docs.
AVRDUDE_PROGRAMMER = jtag2isp
AVRDUDE_PORT = usb
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
# ---------------------------------------------------------------------------
# Define directories, if needed.
DIRAVR = /usr/avr
DIRAVRBIN = $(DIRAVR)/bin
DIRAVRUTILS = $(DIRAVR)/utils/bin
DIRINC = .
DIRLIB = $(DIRAVR)/avr/lib
# Define programs and commands.
SHELL = bash
CC = avr-gcc
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
SIZE = avr-size
# Programming support using avrdude.
AVRDUDE = avrdude
REMOVE = rm -f
COPY = cp
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf
# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = -------- end --------
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
MSG_COFF = Converting to AVR COFF:
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
MSG_FLASH = Creating load file for Flash:
MSG_EEPROM = Creating load file for EEPROM:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default targets.
all: omega hart emil nabla kth timini
default: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \
$(TARGET).lss $(TARGET).sym sizeafter finished end
omega:
python2 animgen2.py omega > imp_autogen.h
make default
mv ${TARGET}.hex hex/imponator_omega.hex
hart:
python2 animgen2.py hart > imp_autogen.h
make default
mv ${TARGET}.hex hex/imponator_hart.hex
emil:
python2 animgen2.py emil > imp_autogen.h
make default
mv ${TARGET}.hex hex/imponator_emil.hex
nabla:
python2 animgen2.py nabla > imp_autogen.h
make default
mv ${TARGET}.hex hex/imponator_nabla.hex
kth:
python2 animgen2.py kth > imp_autogen.h
make default
mv ${TARGET}.hex hex/imponator_kth.hex
timini:
python2 animgen2.py timini > imp_autogen.h
make default
mv ${TARGET}.hex hex/imponator_timini.hex
# Eye candy.
# AVR Studio 3.x does not check make's exit code but relies on
# the following magic strings to be generated by the compile job.
begin:
@echo
@echo $(MSG_BEGIN)
finished:
@echo $(MSG_ERRORS_NONE)
end:
@echo $(MSG_END)
@echo
# Display size of file.
sizebefore:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
sizeafter:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
# Display compiler version information.
gccversion :
@$(CC) --version
# Convert ELF to COFF for use in debugging / simulating in
# AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: $(TARGET).elf
@echo
@echo $(MSG_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
extcoff: $(TARGET).elf
@echo
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
@echo
@echo $(MSG_FLASH) $@
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
%.eep: %.elf
@echo
@echo $(MSG_EEPROM) $@
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
%.lss: %.elf
@echo
@echo $(MSG_EXTENDED_LISTING) $@
$(OBJDUMP) -h -S $< > $@
# Create a symbol table from ELF output file.
%.sym: %.elf
@echo
@echo $(MSG_SYMBOL_TABLE) $@
avr-nm -n $< > $@
# Link: create ELF output file from object files.
.SECONDARY : $(TARGET).elf
.PRECIOUS : $(OBJ)
%.elf: $(OBJ)
@echo
@echo $(MSG_LINKING) $@
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS)
# Compile: create object files from C source files.
%.o : %.c
@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(ALL_CFLAGS) $< -o $@
# Compile: create assembler files from C source files.
%.s : %.c
$(CC) -S $(ALL_CFLAGS) $< -o $@
# Assemble: create object files from assembler source files.
%.o : %.S
@echo
@echo $(MSG_ASSEMBLING) $<
$(CC) -c $(ALL_ASFLAGS) $< -o $@
# Target: clean project.
clean: begin clean_list finished end
clean_list :
@echo
@echo $(MSG_CLEANING)
$(REMOVE) imponator_*.hex
$(REMOVE) imp_autogen.h
$(REMOVE) $(TARGET).hex
$(REMOVE) $(TARGET).eep
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).cof
$(REMOVE) $(TARGET).elf
$(REMOVE) $(TARGET).map
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).a90
$(REMOVE) $(TARGET).sym
$(REMOVE) $(TARGET).lnk
$(REMOVE) $(TARGET).lss
$(REMOVE) $(OBJ)
$(REMOVE) $(LST)
$(REMOVE) $(SRC:.c=.s)
$(REMOVE) $(SRC:.c=.d)
# Automatically generate C source code dependencies.
# (Code originally taken from the GNU make user manual and modified
# (See README.txt Credits).)
#
# Note that this will work with sh (bash) and sed that is shipped with WinAVR
# (see the SHELL variable defined above).
# This may not work with other shells or other seds.
#
%.d: %.c
set -e; $(CC) -MM $(ALL_CFLAGS) $< \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \
[ -s $@ ] || rm -f $@
# Remove the '-' if you want to see the dependency files generated.
-include $(SRC:.c=.d)
# Listing of phony targets.
.PHONY : all default omega emil nabla kth begin finish end sizebefore sizeafter\
gccversion coff extcoff clean clean_list program
#!/usr/bin/env python
import sys
## PATH RELATED ##################################################################
PATHS = {}
IMPONATORS = ("omega","nabla","kth","emil","hart","timini")
def define_paths(imponator):
p = {} # p is short for paths
if imponator in ('omega', 'nabla'):
# Remap lists:
p['map_grd0'] = [0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]
p['map_grd1'] = [0xF, 0xE, 0xD, 0xC, 0xB, 0xA, 0x9, 0x8]
# Definittion of paths:
p['full'] = [0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,
0xe,0xf]
p['circ'] = p['full']
p['circ2_enter'] = p['full'][:0x2]
p['circ2'] = p['full'][0x3:0xc]
p['circ2_exit'] = p['full'][0xc:]
elif imponator in 'hart':
# Remap lists:
p['map_grd0'] = [0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]
p['map_grd1'] = [0xF, 0xE, 0xD, 0xC, 0xB, 0xA, 0x9, 0x8]
# Definittion of paths:
p['full'] = [0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,
0xe,0xf]
p['circ'] = p['full'][-1:] + p['full'][:]
p['circ_left'] = p['circ'][:9]
p['circ_right'] = p['circ'][8:]
elif imponator == 'kth':
# Remap lists:
p['map_grd0'] = [0x0, 0x1, 0x2, 0x3, 0x9, 0x6, 0x5, 0x4]
p['map_grd1'] = [0xF, 0xE, 0xD, 0xC, 0x8, 0x7, 0xA, 0xB]
# Definittion of paths:
p['full'] = [0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,
0xe,0xf]
p['circ'] = [0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0x8,0x7,0xa,0xb,
0xc,0xd,0xe,0xf]
p['circ_lower'] = p['circ'][:0xa]
p['circ_upper'] = p['circ'][0x9:]
elif imponator == 'timini':
# Remap lists:
p['map_grd0'] = [0x9, 0x8, 0xA, 0xD, 0x5, 0xB, 0x7, 0x6]
p['map_grd1'] = [0x0, 0x1, 0xF, 0xE, 0x4, 0xC, 0x2, 0x3]
#LED mapping
#-3---4---5---6-
#---F---E-------
#-2-----------7-
#-------D-------
#-1-----------8-
#-------C---A---
#-0-----------9-
#-------B-------
# Definittion of paths:
p['full'] = [0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,
0xC,0xD,0xE,0xF]
p['line_v0'] = p['full'][:5]
p['line_v1'] = p['full'][5:6]
p['line_v2'] = p['full'][6:10]
p['line_v3'] = p['full'][10:11]
p['line_v4'] = p['full'][11:]
p['line_h0'] = [0x8,0xB,0xF]
p['line_h1'] = [0x9,0xA,0xD,0xE]
p['line_h2'] = [0x0,0xC,0x7]
p['line_h3'] = [0x1,0x4,0x6]
p['line_h4'] = [0x2,0x3,0x5]
p['circ'] = p['full']
p['circ_left'] = p['circ'][:10]
p['circ_right'] = p['circ'][9:]
p['T'] = [0x3, 0x4, 0x5, 0x6, 0xB, 0xC, 0xD, 0xE]
p['I'] = [0xB, 0xC, 0xD, 0xE]
p['M'] = [0xD, 0xE, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x6, 0x7, 0x8, 0x9]
p['N'] = [0x0, 0x1, 0x2, 0x3, 0xF, 0xD, 0xA, 0x9, 0x8, 0x7, 0x6]
elif imponator == 'emil':
# Remap lists:
p['map_grd0'] = [0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]
p['map_grd1'] = [0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF]
# Definittion of paths:
p['full'] = [0x2,0x1,0x0,0x9,0x8,0xA,0xB,0xC,0x4,0x3,0xD,0xF,
0xE,0x7,0x6,0x5]
p['line_v0'] = p['full'][:5]
p['line_v1'] = p['full'][5:6]
p['line_v2'] = p['full'][6:10]
p['line_v3'] = p['full'][10:11]
p['line_v4'] = p['full'][11:]
p['line_h0'] = [0x8,0xB,0xF]
p['line_h1'] = [0x9,0xA,0xD,0xE]
p['line_h2'] = [0x0,0xC,0x7]
p['line_h3'] = [0x1,0x4,0x6]
p['line_h4'] = [0x2,0x3,0x5]
p['circ'] = p['line_v0'] + p['line_v1'] + p['line_v2'][1:] +\
reverse_path(p['line_v2'][1:-1]) + p['line_v3'] + p['line_v4']
p['circ_left'] = p['circ'][:10]
p['circ_right'] = p['circ'][9:]
p['E'] = p['line_v0'] + p['line_h0'][1:] + p['line_h2'][1:] +\
p['line_h4']
p['M'] = p['full'][:6] + p['full'][7:8] + p['full'][10:]
p['I'] = p['line_v2']
p['L'] = p['line_v0'] + p['line_h4'][1:]
return p
## ANIMATION RELATED ###########################################################
def dim_all(frame, dim=0x01):
for i in xrange(len(frame)):
if frame[i] > 0x0: frame[i] -= dim
if frame[i] < 0x0: frame[i] = 0
return frame
def reverse_path(list):
list_r = list[:]
list_r.reverse()
return list_r
def merge_paths(path1, path2):
""" Merges two paths in a funny manner """
path = []
# Find wich path is longest:
if len(path2) < len(path1):
short_path = path2
long_path = path1
else: