Skip to content

Commit

Permalink
Fix trouble calculating return values with decimal places (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelstoer authored Aug 31, 2016
2 parents 5922641 + fe51cd5 commit 95b4b23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions max7219.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ local function commit()
-- ...
-- module: 3 register: 8 data: 0
for i = 1, numberOfColumns do
local module = ((i - 1) / 8) + 1
local register = ((i - 1) % 8) + 1
local module = math.floor(((i - 1) / 8) + 1)
local register = math.floor(((i - 1) % 8) + 1)
sendByte(module, register, columns[i])
end
end
Expand Down

0 comments on commit 95b4b23

Please sign in to comment.