Closed pjueon closed 2 years ago
I found a better solution. With the latest version of JetsonGPIO, this PR is not needed any more. Close this PR.
Is there maybe something we need to #ifdef
for older and newer versions or is this not needed ?
It is possible, but I think you don't have to.
There are 3 variations of JetsonGPIO
library.
Old one
GPIO::model
is a global variable and its type is std::string
. You should use GPIO::model
as a variable.
Temporary one (The one for this PR)
GPIO::model
is a function that returns std::string
object. You should use GPIO::model
as a function.
This one was not an officially released version. This one was created about a week ago.
The latest one
GPIO::model
is a global variable and its type is GPIO::LazyString
which is a proxy type for std::string
.
You can use GPIO::model
either as a variable or a function.
So each variation doesn't have compatibility for others at the binary level, but 3 (which is the latest one) has compatibility for 1 and 2 at the code level.
The current source code of the txtempus
can be built with 1 and 3.
With this PR, it can be built with 2 and 3.
It is possible to make txtempus
buildable with all variations of JetsonGPIO
(not by #ifdef
but by template).
But I think you don't have to change the txtempus
just for the version that was not officially released.
In the latest version of JetsonGPIO, GPIO::model is not a variable but a function