Skip to content

Commit

Permalink
new program
Browse files Browse the repository at this point in the history
  • Loading branch information
cba56 committed Aug 22, 2024
1 parent 41e5545 commit 19e61c4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified bookExamples/.DS_Store
Binary file not shown.
Binary file modified bookExamples/patterns/.DS_Store
Binary file not shown.
12 changes: 4 additions & 8 deletions bookExamples/patterns/loops/loops-program-swim.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def nested_loop():
length=('lengthAsDistance',100),
stroke=('standardStroke','freestyle'),
rest=('sinceStart',"PT1M"+str((40+(j*5)))+"S"),
intensity=('startIntensity',('percentageEffort',(100-(10*nr_inner_loops))+(j*10)))
intensity=('startIntensity',('percentageEffort',
(100-(10*nr_inner_loops))+(j*10)))
))
instruction_list.append(swiML.Instruction(
length=('lengthAsDistance',(j+1)*25),
Expand All @@ -33,17 +34,12 @@ def write_program():
stroke=('standardStroke','any'),
intensity=('startIntensity',('zone','easy')),
)
# warm down instruction
warmDown=swiML.Instruction(
length=('lengthAsDistance',400),
stroke=('standardStroke','any'),
intensity=('startIntensity',('zone','easy')),
)

# assembly of the main instructions
myInstructions=[swiML.SegmentName('Warm Up'),warmUp]
myInstructions.append(swiML.SegmentName('Nested Loop'))
myInstructions.extend(nested_loop())
myInstructions.extend([swiML.SegmentName('Warm down'),warmDown])
myInstructions.extend([swiML.SegmentName('Warm down'),warmUp])

# create the program
simpleProgram=swiML.Program(
Expand Down
26 changes: 23 additions & 3 deletions swiML.xpr
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@
<entry>
<String>scenario.associations</String>
<scenarioAssociation-array>
<scenarioAssociation>
<field name="url">
<String>bookExamples/loops-program-swim.xml</String>
</field>
<field name="scenarioIds">
<list>
<String>swiMLXSL latest</String>
</list>
</field>
<field name="scenarioTypes">
<list>
<String>XSL</String>
</list>
</field>
<field name="scenarioStorageLocations">
<list>
<Byte>2</Byte>
</list>
</field>
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>bookExamples/patterns/loops/loops-program-swim.xml</String>
Expand All @@ -34,7 +54,7 @@
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>bookExamples/patterns/loops/loops-program-intro.xml</String>
<String>bookExamples/patterns/handshake/handshake-program-intro.xml</String>
</field>
<field name="scenarioIds">
<list>
Expand All @@ -54,7 +74,7 @@
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>bookExamples/patterns/handshake/handshake-program.xml</String>
<String>bookExamples/patterns/loops/loops-program-intro.xml</String>
</field>
<field name="scenarioIds">
<list>
Expand All @@ -74,7 +94,7 @@
</scenarioAssociation>
<scenarioAssociation>
<field name="url">
<String>bookExamples/patterns/handshake/handshake-program-intro.xml</String>
<String>bookExamples/patterns/handshake/handshake-program.xml</String>
</field>
<field name="scenarioIds">
<list>
Expand Down

0 comments on commit 19e61c4

Please sign in to comment.