Add checksum calculation to relevant barcode types

This commit is contained in:
Alex Good committed 2016-04-26 10:13:22 +01:00
1 parent 63f4aa2c46
commit 7435af80e5
10 files changed
+36 -10

No files matched your search

+4
View File
@@ -46,6 +46,10 @@ func (qr *qrcode) Set(x, y int, val bool) {
qr.data.SetBit(x*qr.dimension+y, val)
}
func (qr *qrcode) CheckSum() int {
return 0
}
func (qr *qrcode) calcPenalty() uint {
return qr.calcPenaltyRule1() + qr.calcPenaltyRule2() + qr.calcPenaltyRule3() + qr.calcPenaltyRule4()
}