Giter Club home page Giter Club logo

esp32-aog's People

Contributors

eringerli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-aog's Issues

Compatibility with AOG 4.3.10

Hello,

first of all, great improvement for the AOG Eco systems. I tested it with ONLY the NXP IMU, which works fine on the ESP32 side.
The data sent via UDP seems to be received from AOG (UDP counter increases, wireshark trace looks also good) but the content ist not processed. I can not see any Incline or heading information within AOG.

Maybe you can support with below questions:

  1. Is the UDP Data Format compatible with AOG v. 4.3.10?
  2. Which config need to be selected on AOG side to receive the IMU / Incline information?
  3. Any caveats that need to be considered when using it with AOG 4.3.10?

Regards

Code review before pull request

In my fork https://github.com/benreu/esp32-aog, I have made substantial changes including:

  1. autoreconnect if WiFi gets lost and shows up again
  2. autoswitch between AP and station modes upon startup. If the Esp32 receives a client on the AP, shut down station. If the Esp32 finds the station, shut down the AP.
  3. add steering wheel switch to shut off hydraulic valve if steering wheel gets turned
  4. show A/D count in WebUI
  5. add Bang Bang valve support (currently untested)
  6. some minor fixes
  7. disabled info tab to reduce burden on ESPUI (after I added widgets, ESPUI no longer worked)
  8. add support for Work and Steer LEDs
  9. use interrupts for steering wheel and steer enable switches, for cleaner code
  10. create unique hotspot by using "Steer module" + mac address to avoid hotspot conflicts

What I'm wondering is: do you want me to create a merge request? Or would you rather review/test it? Or any other concerns you may have?

I hereby disclaim that my changes may depart from your original design, even if I tried to be as unobtrusive as I could.

not building

Hi,
I tried to fill in your code but I found some problems

_git/_tomstix/esp32-aog $ pio run
Processing featheresp32 (platform: espressif32; board: featheresp32; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/featheresp32.html
PLATFORM: Espressif 32 (6.1.0) > Adafruit ESP32 Feather
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

  • framework-arduinoespressif32 @ 3.20007.0 (2.0.7)
  • tool-esptoolpy @ 1.40500.0 (4.5.0)
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 52 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- AsyncTCP @ 1.1.1
    |-- Adafruit Unified Sensor @ 1.1.9
    |-- ESP32CAN @ 0.0.1
    |-- Adafruit FXOS8700 @ 2.2.0
    | |-- Adafruit BusIO @ 1.14.1
    | | |-- Wire @ 1.0.1
    | | |-- SPI @ 2.0.0
    | |-- Wire @ 1.0.1
    | |-- SPI @ 2.0.0
    | |-- Adafruit Unified Sensor @ 1.1.9
    |-- Adafruit FXAS21002C @ 2.2.0
    | |-- Adafruit BusIO @ 1.14.1
    | | |-- Wire @ 1.0.1
    | | |-- SPI @ 2.0.0
    | |-- Wire @ 1.0.1
    | |-- SPI @ 2.0.0
    | |-- Adafruit Unified Sensor @ 1.1.9
    |-- Adafruit AHRS @ 1.1.4
    | |-- Adafruit Unified Sensor @ 1.1.9
    |-- ESP Async WebServer @ 1.2.3
    | |-- AsyncTCP @ 1.1.1
    | |-- AsyncElegantOTA @ 2.2.7
    | | |-- AsyncTCP @ 1.1.1
    | | |-- FS @ 2.0.0
    | | |-- Update @ 2.0.0
    | | |-- WiFi @ 2.0.0
    | |-- FS @ 2.0.0
    | |-- WiFi @ 2.0.0
    |-- AsyncElegantOTA @ 2.2.7
    | |-- AsyncTCP @ 1.1.1
    | |-- FS @ 2.0.0
    | |-- Update @ 2.0.0
    | |-- WiFi @ 2.0.0
    |-- ArduinoJson @ 5.13.4
    |-- Wire @ 1.0.1
    |-- AutoPID @ 1.0.3
    |-- ESPUI @ 1.6.2
    | |-- ESP Async WebServer @ 1.2.3
    | | |-- AsyncTCP @ 1.1.1
    | | |-- AsyncElegantOTA @ 2.2.7
    | | | |-- AsyncTCP @ 1.1.1
    | | | |-- FS @ 2.0.0
    | | | |-- Update @ 2.0.0
    | | | |-- WiFi @ 2.0.0
    | | |-- FS @ 2.0.0
    | | |-- WiFi @ 2.0.0
    | |-- ArduinoJson @ 5.13.4
    | |-- FS @ 2.0.0
    | |-- SPIFFS @ 2.0.0
    | | |-- FS @ 2.0.0
    | |-- WiFi @ 2.0.0
    | |-- AsyncTCP @ 1.1.1
    | |-- AsyncElegantOTA @ 2.2.7
    | | |-- AsyncTCP @ 1.1.1
    | | |-- FS @ 2.0.0
    | | |-- Update @ 2.0.0
    | | |-- WiFi @ 2.0.0
    |-- FS @ 2.0.0
    |-- SPIFFS @ 2.0.0
    | |-- FS @ 2.0.0
    |-- DNSServer @ 2.0.0
    | |-- WiFi @ 2.0.0
    |-- WiFi @ 2.0.0
    |-- HTTPClient @ 1.2
    | |-- WiFi @ 2.0.0
    | |-- WiFiClientSecure @ 2.0.0
    | | |-- WiFi @ 2.0.0
    |-- MicroNMEA @ 2.0.1
    |-- Adafruit ADS1X15 @ 1.2.0
    | |-- Wire @ 1.0.1
    |-- Adafruit MMA8451 Library @ 1.0.5
    | |-- Adafruit Unified Sensor @ 1.1.9
    | |-- Wire @ 1.0.1
    |-- Adafruit BNO055 @ 1.1.8
    | |-- Adafruit Unified Sensor @ 1.1.9
    | |-- Wire @ 1.0.1
    |-- json
    |-- ESP32 Async UDP @ 2.0.0
    Building in release mode
    Compiling .pio/build/featheresp32/src/autosteer.cpp.o
    Compiling .pio/build/featheresp32/src/can.cpp.o
    Compiling .pio/build/featheresp32/src/idleStats.cpp.o
    Compiling .pio/build/featheresp32/src/jsonFunctions.cpp.o
    Compiling .pio/build/featheresp32/src/main.cpp.o
    Compiling .pio/build/featheresp32/src/rtk.cpp.o
    Compiling .pio/build/featheresp32/src/sensor.cpp.o
    Building .pio/build/featheresp32/bootloader.bin
    Generating partitions .pio/build/featheresp32/partitions.bin
    esptool.py v4.5
    Creating esp32 image...
    Merged 1 ELF section
    Successfully created esp32 image.
    src/jsonFunctions.cpp:29:10: fatal error: crypto/base64.h: No such file or directory
    #include <crypto/base64.h>
    ^~~~~~~~~~~~~~~~~
    compilation terminated.
    Compiling .pio/build/featheresp32/lib9c8/AsyncTCP/AsyncTCP.cpp.o
    Compiling .pio/build/featheresp32/lib731/Adafruit Unified Sensor/Adafruit_Sensor.cpp.o
    In file included from src/main.cpp:38:
    .pio/libdeps/featheresp32/AsyncElegantOTA/src/AsyncElegantOTA.h:4:2: warning: #warning AsyncElegantOTA.loop(); is deprecated, please remove it from loop() if defined. This function will be removed in a future release. [-Wcpp]
    #warning AsyncElegantOTA.loop(); is deprecated, please remove it from loop() if defined. This function will be removed in a future release.
    ^~~~~~~
    Compiling .pio/build/featheresp32/lib004/ESP32CAN/CAN.c.o
    *** [.pio/build/featheresp32/src/jsonFunctions.cpp.o] Error 1
    cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
    In file included from .pio/libdeps/featheresp32/ESP32CAN/src/CAN.c:37:
    /home/orcim/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/esp_intr.h:8:2: warning: #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead [-Wcpp]
    #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
    ^~~~~~~
    In file included from lib/Adafruit_MMA8451_Library/Adafruit_MMA8451.h:29,
    from src/sensor.cpp:31:
    lib/Wire/src/Wire.h:46:5: error: 'i2c_t' does not name a type; did you mean 'ino_t'?
    i2c_t * i2c;
    ^~~~~
    ino_t
    lib/Wire/src/Wire.h:66:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t last_error; // @stickbreaker from esp32-hal-i2c.h
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:85:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t writeTransmission(uint16_t address, uint8_t* buff, uint16_t size, bool sendStop=true);
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:86:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t readTransmission(uint16_t address, uint8_t* buff, uint16_t size, bool sendStop=true, uint32_t readCount=NULL);
    ^~~~~~~~~
    esp_err_t
    In file included from lib/Adafruit_MMA8451_Library/Adafruit_MMA8451.h:29,
    from src/main.hpp:34,
    from src/autosteer.cpp:28:
    lib/Wire/src/Wire.h:46:5: error: 'i2c_t' does not name a type; did you mean 'ino_t'?
    i2c_t * i2c;
    ^~~~~
    ino_t
    lib/Wire/src/Wire.h:66:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t last_error; // @stickbreaker from esp32-hal-i2c.h
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:85:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t writeTransmission(uint16_t address, uint8_t
    buff, uint16_t size, bool sendStop=true);
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:86:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t readTransmission(uint16_t address, uint8_t* buff, uint16_t size, bool sendStop=true, uint32_t readCount=NULL);
    ^~~~~~~~~
    esp_err_t
    In file included from lib/Adafruit_MMA8451_Library/Adafruit_MMA8451.h:29,
    from src/main.hpp:34,
    from src/rtk.cpp:35:
    lib/Wire/src/Wire.h:46:5: error: 'i2c_t' does not name a type; did you mean 'ino_t'?
    i2c_t * i2c;
    ^~~~~
    ino_t
    lib/Wire/src/Wire.h:66:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t last_error; // @stickbreaker from esp32-hal-i2c.h
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:85:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t writeTransmission(uint16_t address, uint8_t
    buff, uint16_t size, bool sendStop=true);
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:86:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t readTransmission(uint16_t address, uint8_t* buff, uint16_t size, bool sendStop=true, uint32_t readCount=NULL);
    ^~~~~~~~~
    esp_err_t
    In file included from lib/Adafruit_MMA8451_Library/Adafruit_MMA8451.h:29,
    from src/main.hpp:34,
    from src/idleStats.cpp:27:
    lib/Wire/src/Wire.h:46:5: error: 'i2c_t' does not name a type; did you mean 'ino_t'?
    i2c_t * i2c;
    ^~~~~
    ino_t
    lib/Wire/src/Wire.h:66:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t last_error; // @stickbreaker from esp32-hal-i2c.h
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:85:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t writeTransmission(uint16_t address, uint8_t
    buff, uint16_t size, bool sendStop=true);
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:86:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t readTransmission(uint16_t address, uint8_t* buff, uint16_t size, bool sendStop=true, uint32_t readCount=NULL);
    ^~~~~~~~~
    esp_err_t
    In file included from lib/Adafruit_MMA8451_Library/Adafruit_MMA8451.h:29,
    from src/main.hpp:34,
    from src/jsonFunctions.hpp:23,
    from src/main.cpp:26:
    lib/Wire/src/Wire.h:46:5: error: 'i2c_t' does not name a type; did you mean 'ino_t'?
    i2c_t * i2c;
    ^~~~~
    ino_t
    lib/Wire/src/Wire.h:66:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t last_error; // @stickbreaker from esp32-hal-i2c.h
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:85:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t writeTransmission(uint16_t address, uint8_t
    buff, uint16_t size, bool sendStop=true);
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:86:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t readTransmission(uint16_t address, uint8_t* buff, uint16_t size, bool sendStop=true, uint32_t readCount=NULL);
    ^~~~~~~~~
    esp_err_t
    In file included from lib/Adafruit_MMA8451_Library/Adafruit_MMA8451.h:29,
    from src/main.hpp:34,
    from src/can.cpp:27:
    lib/Wire/src/Wire.h:46:5: error: 'i2c_t' does not name a type; did you mean 'ino_t'?
    i2c_t * i2c;
    ^~~~~
    ino_t
    lib/Wire/src/Wire.h:66:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t last_error; // @stickbreaker from esp32-hal-i2c.h
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:85:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t writeTransmission(uint16_t address, uint8_t
    buff, uint16_t size, bool sendStop=true);
    ^~~~~~~~~
    esp_err_t
    lib/Wire/src/Wire.h:86:5: error: 'i2c_err_t' does not name a type; did you mean 'esp_err_t'?
    i2c_err_t readTransmission(uint16_t address, uint8_t* buff, uint16_t size, bool sendStop=true, uint32_t readCount=NULL);
    ^~~~~~~~~
    esp_err_t
    src/rtk.cpp: In function 'void ntripWorker(void
    )':
    src/rtk.cpp:263:44: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    if( steerConfig.rtkCorrectionUsername != '\0' ) {
    ^~~~
    src/rtk.cpp:266:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    if( steerConfig.rtkCorrectionPassword != '\0' ) {
    ^~~~
    src/rtk.cpp:283:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    if( steerConfig.rtkCorrectionMountpoint != '\0' ) {
    ^~~~
    *** [.pio/build/featheresp32/src/autosteer.cpp.o] Error 1
    *** [.pio/build/featheresp32/src/idleStats.cpp.o] Error 1
    *** [.pio/build/featheresp32/src/rtk.cpp.o] Error 1
    *** [.pio/build/featheresp32/src/can.cpp.o] Error 1
    *** [.pio/build/featheresp32/src/main.cpp.o] Error 1
    *** [.pio/build/featheresp32/src/sensor.cpp.o] Error 1

Hotspot gets same SSID and Password as network access point after failed connection

After uploading the code I connected to the hotspot, AOG, created by the ESP and entered the SSID and password for my network access point. The ESP failed to connect and is now creates a hotspot with the same SSID and password as my network access point.

Shouldn't the SSID the ESP uses to create a hotspot be different from the SSID of the network access point the user wants to connect it to?

For a tractor that uses multiple ESPs it would seem that each one should have its own name. This name could be the hostname and the hotspot SSID of the module. (Emlid uses this method for their Reach GPS products.) The default name could be something like "New AOG Module". I can imagine using AOG-Steer, AOG-Throttle, AOG-Section, AOG-GPS, etc. That way, if a module fails to connect, it would be easy to find with a mobile phone.

Adding Control widgets to ESP32 UI fails

In the process of adding some more widgets and code to support steering wheel encoders to turn off steering, the web page no longer loads. I tried it several times, and as soon as I add widgets, the page no longer loads. Removing the added widgets makes it work again. I see the ESPUI has moved on to include a

ESPUI.jsonInitialDocumentSize = 8000; // This is the default, adjust when you have too many widgets or options

When I try to add this to esp32-aog, I get an error:

'class ESPUIClass' has no member named 'jsonInitialDocumentSize'

And if I try to switch to the https://github.com/s00500/ESPUI repository, I get an error when trying to compile the esp-aog project

'class ESPUIClass' has no member named 'updateControlAsyncTransmit'

I see the repositories cannot be merged automatically using GitHub's website. Indeed, I tried to merge locally by pulling from both repos, which gave the conflicting differences. It appears the biggest differences are syntax and variable names, with a few added functions on the eringerli repo. I'm wondering what it would take to bring these repos into sync?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.