Skip to content
This repository was archived by the owner on Feb 25, 2021. It is now read-only.

Commit 1695f0a

Browse files
authored
Cleanup (#2)
* GPS and Motordriver working. Really ugly hacks, needs cleanup * Cleanup, removing bno, preparing for generic imu correction * generic correction (https://appelsiini.net/2018/calibrate-magnetometer/) * LSM9DS1 implemented * Implemented calibrationone bug: lsm9ds1 filter are way to slow * Better IMU Reset, some cleanups, fixed save/restore * only write on I2C if something changed * changed to 50hz to reduce cpu util * Implemented Ackermann * removed a line by mistake * fix typo * Workaround for espressif/arduino-esp32#2685 Newer plattform has support for saving configuration, older need older async-tcp. * Put some dependencys in the plattformio.ini Removed (nearly) all code to set up the new config/setup. Features should be copied back later. * Start wifiAp and nothing else if HW not initialized * cleanup * Added new submodule * Copy files for the espui in the data directory * changed partition * core webui start * no change in memory, easier a single firmware instead spiffs-dedendencys * removed mdns, no real benefit in test-setup * working idleStats * Only one namespace for configuration. Implemented HW chooser * rename example to make it consistent (all hardware that is not on I2C in the init) * Begin of the "IO-Abtraction-Layer" * Start of IO abstraction, fixed preferences * start LED-Task earlier * less global data, added logik for pwm * allow the ads1115 differential measureings compared to A3 (e.g. VCC) instead to gnd (normal single ended mode). Should result in better results with ratiometric sensors and a not 100% stable 5V source * some addition to the init process (still WI) * switched ads1115 library. Removed soe (currently) unsused dependencys * IO abstraction now contains the ads1115 * completed features for IO abstraction * Network Setup * allowed SSID selektion in AP mode (hostname in emergency/config mode * First webinterface for the network setup * Added Label-Field for PGNs, correction of intendation * introduced a variable with the local IP (accessing can be different ETH/WiFi) => abtraction needed * Created the UDP PGN handler (sending/receiving) - untested ATM * undo the revert to broken idlestats * start threads * Working PGN exchange * implemented (not yet tested) the different rtcm sources * preperations to seperate the common rtcm and nmea tasks, since file gets too long * disbaled fixed uload port * network for nodemcu * Move nmea structures in new files * some adjustments on the network webinterface * prepared for UI via SPIFFs * removed upstream ESPUI module, own fork until bug s00500/ESPUI#63 is fixed * added fork from ESPUI * Nmea implementation * moved all status updates on the Network core, try to avoid heap coruption (some used libraries seems not to bee thread safe) * removed own fork, upstream fixed the issue * added ESPUI * Added json document size * Better Wifihandling * avoid multithread updated of the webUI * minor fixes * put all status updates in one task to avoid crashes of the webui, removed bluetooth (arduino seems to have problems enabling wifi and BT at the same time, since the radio is shared and the options for the different "coexistence"-parameters are not accessible. * small fixes for gps setup and output * some backgroundtasks only if not in setup-mode/hw * Moved disabling of updated * added debug messages. Fixed reading digital inputs from the fxl6408 and address offsets * small fixes (udp intervall, more info/error messages * after talking to the espui dev the spiffs-variant has only a minor performance benefit, so remove the data directry for simplification (so spiffs setup planed anymore) * moved networking code from hwSetup to network to make files smaller/better to understand. Names of functions/variables not yet refactored * created functionpointer for analogIn; added two special values (true/false or zero / one) * implemented work- and steerswitch * moved inputs from hw specific to general init * moved gps-init (esp. the async udp part) after network init * fixed missing i2c locks * added wheel angle reading * Added digital out selectors and utun-relay control * fixed GUI for uturn * changed PWM to 10 bit (finer control => good 8 bit usable after minpwm * added motor to ioAccess and init f9p board * Added a modofied AutoPID (symmetrical) * fixed datatype in the header * added steering actuator * small fix in the GUI (control in the wron tab) * save in the right label * distribute the time a bit more, to reduce further the risk of a rce condition in the not threadsafe webserver * show when PWm-Test is active * use dutyCycle ... * bugfixes to enable steering (steering enabled = false; preferences in the main thread => datastructures
1 parent 3d7c258 commit 1695f0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3753
-3820
lines changed

.gitmodules

+9-26
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
1+
[submodule "lib/MicroNMEA"]
2+
path = lib/MicroNMEA
3+
url = https://github.com/eringerli/MicroNMEA.git
14
[submodule "lib/Adafruit_ADS1X15"]
25
path = lib/Adafruit_ADS1X15
3-
url = https://github.com/soligen2010/Adafruit_ADS1X15.git
4-
[submodule "lib/Adafruit_BNO055"]
5-
path = lib/Adafruit_BNO055
6-
url = https://github.com/eringerli/Adafruit_BNO055.git
7-
[submodule "lib/Adafruit_MMA8451_Library"]
8-
path = lib/Adafruit_MMA8451_Library
9-
url = https://github.com/eringerli/Adafruit_MMA8451_Library.git
10-
[submodule "ArduinoJson.git"]
11-
path = lib/ArduinoJson
12-
url = https://github.com/bblanchon/ArduinoJson.git
13-
[submodule "lib/AutoPID"]
14-
path = lib/AutoPID
15-
url = https://github.com/eringerli/AutoPID.git
16-
[submodule "lib/eeprom32_rotate"]
17-
path = lib/eeprom32_rotate
18-
url = https://github.com/xoseperez/eeprom32_rotate.git
19-
[submodule "lib/ESPAsyncWebServer"]
20-
path = lib/ESPAsyncWebServer
21-
url = https://github.com/me-no-dev/ESPAsyncWebServer.git
6+
url = https://github.com/soligen2010/Adafruit_ADS1X15
227
[submodule "lib/ESPUI"]
238
path = lib/ESPUI
24-
url = https://github.com/eringerli/ESPUI.git
25-
[submodule "lib/MicroNMEA"]
26-
path = lib/MicroNMEA
27-
url = https://github.com/eringerli/MicroNMEA.git
28-
[submodule "tools/EspArduinoExceptionDecoder"]
29-
path = tools/EspArduinoExceptionDecoder
30-
url = https://github.com/me21/EspArduinoExceptionDecoder.git
9+
url = https://github.com/s00500/ESPUI/
10+
branch = 2.0.0
11+
[submodule "lib/AutoPID"]
12+
path = lib/AutoPID
13+
url = https://github.com/doppelgrau/AutoPID

lib/Adafruit_BNO055

-1
This file was deleted.

lib/Adafruit_MMA8451_Library

-1
This file was deleted.

lib/ArduinoJson

-1
This file was deleted.

lib/AutoPID

lib/ESPAsyncWebServer

-1
This file was deleted.

lib/eeprom32_rotate

-1
This file was deleted.

no_ota_eeprom.csv

-13
This file was deleted.

partition.csv

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Name, Type, SubType, Offset, Size, Flags
3+
factory, app, factory, 0x010000, 0x200000,
4+
nvs, data, nvs, 0x210000, 0x020000,
5+
spiffs, data, spiffs, 0x230000, 0x180000

platformio.ini

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
platform = espressif32
1313
board = featheresp32
1414
framework = arduino
15-
board_build.partitions = no_ota_eeprom.csv
16-
build_flags = -DNO_GLOBAL_EEPROM -DDEBUG_EEPROM32_ROTATE_PORT=Serial -DI2C_BUFFER_LENGTH=255 -g
15+
board_build.partitions = partition.csv
16+
build_flags = -DI2C_BUFFER_LENGTH=255 -Os
1717
;-DUSE_SERIAL
18-
lib_deps = AsyncTCP, Adafruit Unified Sensor, ESP32CAN, Adafruit FXOS8700, Adafruit FXAS21002C, Adafruit Unified Sensor, Adafruit AHRS
18+
lib_deps = AsyncTCP, SparkFun LSM9DS1 IMU, ArduinoJson, ESP Async WebServer, EspSoftwareSerial
19+
20+
; if the port is not detected automatically
21+
; upload_port = /dev/ttyUSB1

0 commit comments

Comments
 (0)