On 09/10/17 03:29, Mark Webb-Johnson wrote:
Do the best you can, and if you can’t work out how to get something in particular, let me know or leave it as a “TODO” marked in the code.
Thanks for adding the metrics. I sent a pull request with an initial implementation of the Stat message. It doesn't use any of your new metrics except battery voltage (I'd already added that one) and I wedged sending it into a nearby loop which is almost certainly the wrong place, but it works and I was able to send telemetry from a real car today using a wifi hotspot for network connectivity. I had trouble with method overloading and hiding in the Metrics classes and ended up giving the AsStringDefault method a unique name. The api I made also seems very clunky, do I really have to make a std::string from a constant and then pass it in? Or is it more idomatic to pass in the constant and turn it into a std::string when and if it is returned? I don't like the fixed size buffer to construct the message, I copied the TPMS message code, and not knowing the "right" way to do it in this embedded C++, I just cargo culted it together. I'd be much happier if we at least used something that was aware of how big the buffer was and failed more gracefully than overflowing. I tried an SD card and it didn't work. How do I hard code or otherwise inject some startup commands without an SD card? I tried tracing through the command code but quickly decided it was easier to just start the vehicle module, wifi and v2 server with my laptop in monitor mode. Since I rebased onto the current master, things don't compile: /vagrant/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/spiffs/./spiffs_vfs.c: In function 'vfs_spiffs_fstat': /vagrant/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/spiffs/./spiffs_vfs.c:344:22: error: 'CONFIG_SPIFFS_LOG_PAGE_SIZE' undeclared (first use in this function) st->st_blksize = CONFIG_SPIFFS_LOG_PAGE_SIZE;