Skip to content

Let tachograph.lua work with lua5.3 while being backwards compatible.#110

Open
howl wants to merge 3 commits intoL1L1:masterfrom
howl:tachograph-lua5.3
Open

Let tachograph.lua work with lua5.3 while being backwards compatible.#110
howl wants to merge 3 commits intoL1L1:masterfrom
howl:tachograph-lua5.3

Conversation

@howl
Copy link

@howl howl commented Feb 8, 2020

This just makes the necesarry changes to apdu.lua and tachograph.lua to work with Lua 5.3 and also maintain the same output.

Signed-off-by: David Santamaría Rogado howl.nsp@gmail.com

Lua 5.3 changes the way behaves with floats and integers.
To maintain the same output as with Lua 5.2 convert #atr to integer.
This way cold ATR appears as for example 23 instead 23.0.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
howl added 2 commits February 8, 2020 22:27
This changes the bare-minimum to let tachograph.lua work over Lua 5.3.
Just the ISO-8859- part converted to integer to avoid conversion be nil
and the hours calculation floored.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Just convert to integers some output values to avoid .0 appearing in the output.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
@howl howl force-pushed the tachograph-lua5.3 branch from aa0048c to 1450a9b Compare February 8, 2020 21:29
@howl
Copy link
Author

howl commented Feb 8, 2020

Ok, my first amend to a non last commit. I have changed the commit message of the bare minimum changes to also reflect that hours calculation have been floored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant