Skip to content

Commit

Permalink
use existing clock delta when coming out of reset (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
csboling authored and tehn committed Dec 2, 2019
1 parent 4f7bd2f commit f9b53f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ansible_grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,17 +848,18 @@ void clock_kria(uint8_t phase) {

if(pos_reset) {
clock_count = 0;
u64 current_tick = get_ticks();
for(int i1=0;i1<KRIA_NUM_TRACKS;i1++)
for(int i2=0;i2<KRIA_NUM_PARAMS;i2++) {
pos[i1][i2] = k.p[k.pattern].t[i1].lend[i2];
pos_mul[i1][i2] = k.p[k.pattern].t[i1].tmul[i2];
last_ticks[i1] = current_tick - clock_deltas[i1];
}
cue_count = 0;
cue_sub_count = 0;
pos_reset = false;
}


for ( uint8_t i=0; i<KRIA_NUM_TRACKS; i++ )
{
if ( !k.p[k.pattern].t[i].tt_clocked )
Expand Down

0 comments on commit f9b53f7

Please sign in to comment.