Add a new simulation key handler for weather data:
- 'w' will generate new weather, cycling through the various conditions
- 'W' will clear the weather data
* Integration of Simple Weather Service
Replace the old WeatherService by the new Simple Weather Service.=
* Update InfiniTime to after SimpleWeatherService got merged
---------
Co-authored-by: Reinhold Gschweicher <pyro4hell@gmail.com>
This pull request allows my pull request InfiniTimeOrg/InfiniTime#1323 in the
InfiniTime project to build the simulator that's in this project. Both pull requests
add the feature that I requested here: InfiniTimeOrg/InfiniTime#1320
Co-authored-by: Dyllan Kobal <dddk500@gmail.com>
Remove the custom MotorController class and use the upstream
MotorController instead.
To enable this move add custom code in nrf_gpio to handle the Motor pin
instead of the custom motor_is_running member variable.
Also implement the repeating app_timer type used in the upstream
MotorController.
The external SPI flash is implemented as a 4MB on the local filesystem.
This allows the FS (littleFS) and settings to work properly.
Remove the simulated `FS.h` and `FS.cpp`, because we can now use
the files from InfiniTime directly as the heavy lifting is done in the simulated
`SpiNorFlash.h` and cpp files.
`SpiNorFlash.h` provides read and write functions with `uint8_t` buffer, but
`fs::fstream` expects `char` buffer. Use `reinterpret_cast` and check if by
any chance the `char` type on a platform is implemented with more
than one byte. Then the `reinterpret_cast<char *>(buffer)` would change the
meaning of the `size` parameter, which could lead to garbage data.
Co-authored-by: Reinhold Gschweicher <pyro4hell@gmail.com>
Like in `FileOpen()` interpret filenames starting with `/` as paths
relative to the current working directory by removing the first `/` from
the path.
Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/23