Michael Stubbs, a Flying Squad sergeant, was in a police car chasing Steven Farrer and Anthony Pendrigh when he was hit in the head by a ricocheting bullet.
Nineteen rounds were fired at the police car pursuing Farrer and Pendrigh after a pounds 17,000 raid on a Security Express van in Blackfen, south London, last August.
Sgt Stubbs was off work for six months after the shooting.
Farrer, 25, from Greenwich and Pendrigh, 26 from Eltham, both south London, denied charges of attempted murder, but admitted using the machinegun to resist arrest. They also pleaded guilty to robbing Security Express of pounds 17,000, and other firearms charges.
They were jailed for 12 years for robbery and six years concurrent for possession of firearms. They were sentenced to a further six years for having the machine gun with intent to resist arrest.