Likewise, the laser analyses were done at nine different focus settings to obtain one good set of data. In the meantime, the team went back to the drawing board. They figured out that if they discarded a lot of the old code on board their distant subject, they could make room for software that could command the instrument to take the nine images on its own and analyze them on-board to find the best focus.
Source: Mars Rover’s ChemCam Instrument gets sharper vision
The program to run the whole instrument is only 40 kilobytes. The first tests on Mars were completed earlier this week.