Fixed the padding 236 and 17 thing. Basically i keep track of how many writable bits are left. To do this, first take the whole grid(25^2), then subtract each base pattern as you set it. Total 270 base bits as u see me highlight.(mode:4, alignment pattern: 25, corners:3*(64)=192, format strips: 33, timing strips:16) Left over is 355. Then write data bytes, each should take away exactly 8 bits from the available bits. After writing data bytes, you add another 4 terminator bits, so those get removed. Then you want to keep going as long as you have MORE than enough to write the error correction and version info bits. Remember, if you can write another byte, then 8 bits are left, this means i didn’t really think about if it’s > or >=. Then to get # of bits requred for error and version info, you do n_per_blocknum_blocks8+7. n_per_block is just total_n/num_blocks, so n_per_blocknum_blocks = total_n/num_blocksnum_blocks = total_n. total_n is # of ERROR CORRECTION(not including version info) BYTES, so to convert to # of bits, multiply by 8. Lastly, +7 because there are 7 version# bits according to this image i found online. Rn i have no clue what level of error correction i’m using, but i had gemini generate a whole csv file full of the things, which can’t attach here. IT basically tells teh n_per_block and num_blocks for each level of error correction for each version qr code. next need to actually put info in format strips, masking, and create generator polynomial. I foudn formula for generator polynoomial online(not gmeini), but it’s complicated so will need to make a funciton for it.