Hi,
I currently try to create a time library based on millis() method. It transforms seconds into a time structure and then into a time string. I wrote a library.json to publish it as an available library, but there is the following compile error: src/algebra/operations.h:6:1:
error: expected initializer before ‘DivisionResult’
It is available in github: the GitHub - stoire/einstein: A PlatformIO package for time-handling and string generation . Any help is thanked sincerely.
There’s a missing semicolon in the last line.
If I correct that, I can use the library as normal
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = arduino
lib_deps =
https://github.com/brunolnetto/einstein.git
#include <Arduino.h>
#include <converters/fundamental.h>
void setup(){
Serial.begin(115200);
}
void loop() {
DivisionResult res = min2h(122);
Serial.println("res = " + String((unsigned long)res.quocient) + "h, remainer " + String((unsigned long)res.remainder) + " minutes");
delay(500);
}
Such a foolish mistake. Thank you for the keen eye.