Brushless motor algorithm

Hi, sorry for the late reply, I've had tons of schoolwork.

My schematic for the power stages is this:


For the comparator, I have 3 set up like this:

As for code, I don't have any beyond just a blind startup of the motor. This is where I need help - how do I use the comparator waveform to decide when to commutate?

As a side note, my circuit draws insane current (3A @6V) - any idea why? When I use a store bought ESC, I only draw about 0.5A, even though I'm running it faster.