dennisss / tansa

Dancing Robotics Platform
MIT License
39 stars 16 forks source link

Add breakpoints in jocs files; and code that parses these in new player class #83

Closed tessmichi closed 7 years ago

tessmichi commented 7 years ago

GUI element will need to access this logic (defined below):

I'll add methods in new player class created in #50: getNextBreakpointTime: given a time, returns the time at which the current section of procedures (defined in QLab snapshot attached) ends getBreakpointTime: given a breakpoint name, returns the time it starts at (by matching name to number and calling the method below) getBreakpointTime: given a breakpoint number, returns the time it starts at getBreakpointNumber: given a time, returns the breakpoint number that starts at that time or -1 if no breakpoint starts at that time getDroneLocationAtTime: given a drone number and a time, get that drone's location at that time. Will only search times that actions start at, will return invalid result if not found.

I suspect you'll use something like GetDroneLocationAtTime ( GetBreakpointTime (abc) ) and GetDroneLocationAtTime ( GetNextBreakpointTime (abc) ) where abc is the name or number for a breakpoint

15145101_1146936612022684_191667578_o png

tessmichi commented 7 years ago

"Breakpoints" will be optional in jocs. This way we can parse old files without needing to worry about making dummy breakpoints - I also think this is how it should work in the future anyway but we should discuss it

tessmichi commented 7 years ago

Method headers that will be added to Player class when it is created: double getNextBreakpointTime(double lastTime); double getBreakpointTime(unsigned breakpointNumber); double getBreakpointTime(std::string breakpointName); unsigned getBreakpointNumber(double startTime); Point getDroneLocationAtTime(double startTime, unsigned droneId);

tessmichi commented 7 years ago

this is done and in "breakpoints" branch. but cannot push that branch to master until jocsServer is pushed to master

tessmichi commented 7 years ago

Holding off on closing this issue until can merge this with master