The firmware source code uses a lot of abbreviated variable names, which are not immediately clear to the reader what they stand for. Few examples are, ind1, ind2, dt, c_chek.
Use verbose naming of variables to make the code structure easier to follow.