Closed bartneck closed 1 month ago
added fix to main program length is also now output is either meters or laps as defined by lengthUnit. Still working on an output for total time.
I created a handshake-program-manual.xml
for testing. I get a validation error:
Assertion evaluation ('(count(.//sw:instruction/sw:rest) = 0)') for element 'continue' on schema type 'continueType' did not succeed.
The total program length is also incorrect:
Decision: always display meters and laps. Both correspond to each other. If a lengthAsTime is present, display it as + xxx minutes. If only time is present then remove meters and laps.
The program length of this program is now 3520 meters / 140.8 Laps. It should be 3400 meters 136 laps
I haven't been able to recreate this bug. Both the handshake and the manual xml files compile properly and give the correct program length output. What file were you using?
This is an interesting one. The program that does not work is called handshake-program-test.xml
in the handshake folder. It is generated through handshake-program.py
. The same program created manually handshake-program.xml
does not show the miscalculation.
Bug was caused by python outputting continue Length in XML only as lengthAsDistance. Fix should be in main swiML.py, however could you please check if its working for you as I'm currently getting this bug when trying to run the write function in python: OSError: [Errno 9] Bad file descriptor Still unsure how to fix this, but working on it.
I updated the handshake-program.py
and it worked fine. The XML is now valid and the program length is accurate.
I created a program
/bookExamples/patterns/handshake/handshake-program.html
. It uses a mixture of lengthAsLaps and lengthAsDistance. The total is reported as 520. It is calculated at 200+120+200. There are indeed 120 laps being swum in the main set. The calculation is not respecting the unit of measurement. 120 laps in a 25 meters pool is 3000 meters. The total should be 3400 meters.It seem that the calculation is treating the number of laps as meters.