I just added initial framework-version to GitHub (commit).
I decided to reverse the lookup-table for percentage calculation and always use 1% resolution to make code simpler. If user wants less resolution it's easy to just calculate e.g. ReadPercentage() / 10 * 10 or even supply a custom lookup-table.
Also I think it would be better to not use special return values in CalculatePercentage and just return value from 0 to 100.
@rhofer I am glad you were able to resolve the issue. I get that it is not visible to the naked eye, that mono is in bootloader. We wanted to keep the bootloader as small as possible, taking up a minimal amount of flash memory. Therefore it does not talk to the display or any other peripheral. It presents itself as a HID on the USB port.
@malaire I have found the source of the issue on Debian, it the modem manager service that keeps resetting Mono by pulling the DTR low on all serial devices. I will post an more informative reply, in your original post.
If you set power fence to true the Wifi module, SD Card and display will loose power. When you re-establish the power, the display/wifi and sd card chip will need to be initialized again - see the init() method.
@stoffera I can live without it. I haven't written anything in C++ since the late 90's, so to be honest, I only added C++ 11 because it seemed to be the dialect preferred in example code on the net. With that in mind, I doubt anything I produce i C++ will be of production quality ;)
A short explanation: The json::Json class lets you pick out values from a JSON document by using paths like /location/city. The actual data behind the JSON document is delivered by the SdCardByteBuffer class, which allows you to stream data to a file on the SD card, and later read it back in again. The Json class does not really know that it is reading from the SD card; instead it accepts any kind of buffer as long as the buffer implements the IByteBuffer interface, which abstracts away the nitty-gritty detail of buffering data. Likewise, the Wifi class relies the IByteBuffer interface to store the data received from the network.
As for libc functions, timegm doesn't seem to be available and it seems to be a non-standard function. But as it seems to do basically same what I just added as DateTime::toUnixTime, I'm not sure if that is really needed.
UTC is somewhat simple to handle even without library functions, but localtime and especially daylight saving time is definitely not.
@malaire We are rolling out a version 1.7.1 in the next day or two, that marks the package modemmanager as a Conflict. This means it must be uninstalled before openmono can be installed.
We think this is the correct approach, because it uses the dkpg system to document the relationship. Also, it is left as a user choice. We want to avoid removing packages from a users system by default.