BjarneBitscrambler / SignalK-Orientation

Provides Vessel Attitude, eCompass, Orientation, etc using SensESP, Signal K, and a 9DoF sensor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

status of this repo

mhaberler opened this issue · comments

forked and tried to build this for esp-wrover-kit, planning to move this to an M5stack Core2

is this maintained or should I look elsewhere like https://github.com/BjarneBitscrambler/OrientationSensorFusion-ESP.git ?
could it be SensESP has diverged so much this does not build any more?

Building in release mode
Compiling .pio/build/esp-wrover-kit/src/main.cpp.o
Compiling .pio/build/esp-wrover-kit/src/orientation_sensor.cpp.o
Generating partitions .pio/build/esp-wrover-kit/partitions.bin
Compiling .pio/build/esp-wrover-kit/lib4b7/EEPROM/EEPROM.cpp.o
In file included from src/orientation_sensor.cpp:5:
src/orientation_sensor.h:13:10: fatal error: sensors/sensor.h: No such file or directory
 #include "sensors/sensor.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/esp-wrover-kit/lib46f/WiFi/WiFi.cpp.o
Compiling .pio/build/esp-wrover-kit/lib46f/WiFi/WiFiAP.cpp.o
Compiling .pio/build/esp-wrover-kit/lib46f/WiFi/WiFiClient.cpp.o
Compiling .pio/build/esp-wrover-kit/lib46f/WiFi/WiFiGeneric.cpp.o
Compiling .pio/build/esp-wrover-kit/lib46f/WiFi/WiFiMulti.cpp.o
Compiling .pio/build/esp-wrover-kit/lib46f/WiFi/WiFiSTA.cpp.o
*** [.pio/build/esp-wrover-kit/src/orientation_sensor.cpp.o] Error 1
In file included from src/main.cpp:28:
src/orientation_sensor.h:13:10: fatal error: sensors/sensor.h: No such file or directory
 #include "sensors/sensor.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/esp-wrover-kit/src/main.cpp.o] Error 1

thanks in advance
Michael

it's nothing urgent - fine if this is resolved eventually

I'm running into the same problem as @mhaberler, the code does not build with current versions of SensESP.

A few months ago, I managed to get it to build by manually installing a lot of very old dependencies, but somehow lost that folder. Any chance you'd be willing and able to get this to compile against a current SensESP version?

I am free starting Aug 20 for two weeks to help validate any progress

Thanks @mhaberler. I have just pushed a version that compiles and runs on my ESP32, using the latest SensESP. Note that I haven't tested it beyond confirming that it outputs compass headings correctly to my SK server (i.e. I haven't tested calibration functions, other data fields like accel, etc). It uses the example_main.cpp found in this repository's examples directory. Note also that there are many commented-out sections in the example main.cpp, which I haven't yet enabled and tested.

So, if you have any feedback once you get this up-and-running on your hardware, then please let me know. I'll continue cleaning the code up at my end over the next couple weeks.

thanks, really appreciated! you'll have feedback from me this weekend.

Here's the list of changes made to get the present version (tagged V0.2.0) working with SensESP v2:

  • NumericSensor() changed to FloatSensor() in multiple locations
  • app.OnRepeat changed to ReactESP::app-> where periodic actions are needed
  • enable() method changed to start() in the sensor class
  • wrap code in namespace sensesp {}
  • remove #include <RemoteDebug.h>
  • lib_deps in platformio.ini calls for SignalK/SensESP @ ^2.5.0
  • class MagCalValues derives from sensesp::Sensor instead of Sensor
  • various #includes now specify full path "../.pio/libdeps/esp32dev/SensESP/src/sensesp/..." when previously they just started with "sensesp/..." (this is likely a platformio issue, not SensESP)
  • remove d1_mini as option from platformio.ini (SensESP v2 doesn't support ESP8266)

can confirm that this version results in a successful build, even with the "../.pio/libdeps/esp32dev/SensESP/src/sensesp/..." replaced by just "sensesp/..."
haven't yet deployed it to the hardware on my boat for testing, will report back once that is done.

success building and running on a M5Core2 , values in signalK look credible
M5Stick-C build ok, some I2C issue left but that's just me
rough first cut: https://github.com/mhaberler/SignalK-Orientation.git

thanks a lot!

I've updated the sample code in ./examples/... so that all of the optional Signal K outputs (e.g. Attitude) work. This required a few changes within ./src/signalk_output.h As well, I've tidied up some code and clarified some comments in other files, and removed the full pathnames for the include files (I sorted out the problem with my PlatformIO).

Documentation is re-generated and can be found at https://github.com/BjarneBitscrambler/SignalK-Orientation/blob/main/docs/html/index.html

I've tested the latest version 0.2.1 on my ESP32 devkit, with all optional outputs enabled, and it worked fine. If anyone has any comments or suggestions, feel free to chime in!

I think we're good to close this - really appreciated!