When trying to use ASCII mode, the LRC is not correctly calculated.
The function _calculate_lrc receives data in ASCII (not converted to hex). Then, it performs the correct operations but the input is incorrect. To solve this problem, _calculate_lrc shoult convert its input to hex using _hexencode. It could be also possible that the previous function (_embed_payload) performed this conversion before.
When trying to use ASCII mode, the LRC is not correctly calculated.
The function _calculate_lrc receives data in ASCII (not converted to hex). Then, it performs the correct operations but the input is incorrect. To solve this problem, _calculate_lrc shoult convert its input to hex using _hexencode. It could be also possible that the previous function (_embed_payload) performed this conversion before.