Commit Graph

610 Commits

Author SHA1 Message Date
Butterscotch!
da4480315b Improve WiFi logging (#358)
* Try to make WiFi printout more standard

* Handle ESP8266 WiFi encryption type

ESP8266 WiFi encryption type is according to 802.11, while ESP32 seems to report based on whatever... It would also be oh so convenient if we just report the name, so here it is

* Use tabs with quotes for WiFi scan

It was mentioned this would be easier for parsing, so I'll just leave it the same but with quotes, as it's still just as readable now

* Reformat with clang-format
v0.5.2
2024-12-11 17:33:57 +02:00
Meia
d8b51aaeb4 Remove ESP32-C3 startup delay (#329) 2024-12-11 17:02:46 +02:00
Spacefish
457fe2cfc9 ESP32-C6 support (#327)
* Designate all initializer clauses to fix compiler errors with newer
compilers

* ESP32C6 support

* fshelper: fixed ESP8266 regression caused by abstracting FS access #321 (#328)

* fshelper: fixed ESP8266 regression caused by abstracting FS access #321

* Removing not needed ifdef

l0ud spotted that this is not need.

Co-Authored-By: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com>

---------

Co-authored-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com>

* Fix enabling motion bias estimation (#325)

* fix pre-processor warning

* add macro for calculating radians (#317)

* feat: add macro for calculating radians

* style: silence unused variable warning

* remove unnecessary float cast in macro

* SoftFusion sensor framework with BMI, ICM, LSM6, MPU sensor implementations (#322)

* Update readme to mention BMI270 support.

* Soft fusion sensor initial code, wip

* Soft fusion ICM-42688-P lazy WIP implementation.

* sfusion: Cleanup, implemented sensor frequency calibration

* icm42688: add more comments, basic driver (no hw filtering) should be working

* sfustion: compilation fix

* sfusion: start calibration when upside down

* cleanup: remove confusing had data flag

* sensor manager: use unique_ptr instead of raw pointers

* sfusion: big refactoring wip

* sfusion: make aux work, at least sfusion sensors should now be functional

* sfusion: lightweight implementation of BMI270 sensor, no sensitivity cal yet

* sfusion: BMI270: added CRT and gyro zx factor. should be functionally equivalent to the old driver

* Added lsm6dsv

* Trying to work around esp32c3 compilation problem, not liking that solution

* sfusion: fix problems found after rebase

* Update README.md

* Bump Arduino core to 3.0 to match GCC12

* Remove fast pin swapping that is no longer compatible with arduino core v3

* Bring back fast pin swapping

* Update platformio-tools.ini

* Fix accel timescale (calibration no longer takes forever)

* Fix non-sfusion sensors

* Added LSM6DSO and DSR support and refactored DSV support

* Removed template float param from the implementation

* sfusion: port MPU6050 driver wip, not expecting to be functional yet

* sfusion: add headers specifying main code owners

* connection: fix warning

* update README.md

* fshelper: fixed ESP8266 regression caused by abstracting FS access

* sfusion: fix error on merge

* bno080: differentiate bno080, bno085, bno086 again

* sfusion: final touches

* restore hadData functionality, implementing it in every sensor, made configured flag bno-only

* fix address supplement in non-sfusion sensors, do i2c bus reset for all sensors

* sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamplesAndReturn function to take ms instead of seconds

* sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base

* Log FIFO overruns on LSMs

* Reset the soft watchdog while eating or collecting calibration samples

Resolves an issue where the soft watchdog would trigger.

* Fix missing word in comment, switch to constexpr

* Update esp32/esp8266

---------

Co-authored-by: Gorbit99 <gorbitgames@gmail.com>
Co-authored-by: nekomona <nekomona@nekomona.com>
Co-authored-by: nekomona <nekomona@163.com>
Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
Co-authored-by: kounocom <meia@kouno.xyz>
Co-authored-by: Kubuxu <oss@kubuxu.com>

* Add Haritora to consts (#333)

Add haritora consts, fix misspelling

* dont double scan i2c address on bus for ESP32C6

* add custom portmap for ESP32C6

* update to latest tasmota tools for ESP32C6

* serial over USB

* remove change that does nothing

* remove 2s wait in main.cpp it´s not required

* make it change neutral

* more change neutrality

---------

Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
Co-authored-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com>
Co-authored-by: Meia Kouno <71262281+kounocom@users.noreply.github.com>
Co-authored-by: Fredrik Hatletvedt <32248439+Pespiri@users.noreply.github.com>
Co-authored-by: Przemyslaw Romaniak <loudpl@gmail.com>
Co-authored-by: Gorbit99 <gorbitgames@gmail.com>
Co-authored-by: nekomona <nekomona@nekomona.com>
Co-authored-by: nekomona <nekomona@163.com>
Co-authored-by: kounocom <meia@kouno.xyz>
Co-authored-by: Kubuxu <oss@kubuxu.com>
Co-authored-by: JovannMC <jovannmc@femboyfurry.net>
Co-authored-by: Eiren Rain <Eirenliel@users.noreply.github.com>
2024-12-11 17:00:06 +02:00
dependabot[bot]
41ad236a1f Bump jidicula/clang-format-action from 4.13.0 to 4.14.0 (#369)
Bumps [jidicula/clang-format-action](https://github.com/jidicula/clang-format-action) from 4.13.0 to 4.14.0.
- [Release notes](https://github.com/jidicula/clang-format-action/releases)
- [Commits](https://github.com/jidicula/clang-format-action/compare/v4.13.0...v4.14.0)

---
updated-dependencies:
- dependency-name: jidicula/clang-format-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 11:01:20 +02:00
jabberrock
0ad955d1d4 [sfusion, BMI270] Perform gryo motionless calibration before gyro offset calibration (#367)
On a normal reset, we set the CRT (motionless) registers at startup, and then apply the calibrated gryo offset to every gyro sample.

Previously, we performed gyro offset calibration before CRT calibration. This means that we are actually calculating the gyro offset based on a CRT of 0, instead of the actual CRT.

This change performs CRT calibration before gyro calibration, so that the gryo offset is based on the actual CRT.
2024-11-24 19:30:55 -05:00
jabberrock
a2522929dd [BMI270] Fix bug in data frame size calculation (#366)
* [BMI270] Fix bug in data frame size calculation

Previously, required_length was always 0 because we shifting by a huge number, rather than the bit position. So the check for incomplete frames would never trigger. The final data frame in a FIFO read is sometimes an incomplete frame, and therefore we would read garbage for the data frame. There are often incomplete frames when we call LEDManager to blink the LED, because the FIFO overruns.

1. During gyroscope calibration, we often read random gyroscope samples, which throws off the calibration results.
2. During 6-sided calibration, we often read random acceleration samples which causes rest detection to move on to collecting the next side, even if we don't move the tracker.
3. During normal operation, we will rarely read random gyroscope and accelerometer samples. These are usually one-offs and probably don't affect tracking.

This change fixes the bounds check so that we correctly identify incomplete frames and discard them.

* Simplify check
2024-11-21 07:17:23 -05:00
jabberrock
11b846f6b7 Fix bounds checks in BMI270 driver in bulk_read (#362)
Both i and bytes_to_read are size_t, which are unsigned long. `i - bytes_to_read` should have been `bytes_to_read - i` for how many bytes are left in the buffer. But since we're dealing with unsigned values, it's safer to only do additions and comparisons.
2024-11-20 07:16:52 -05:00
lucas lelievre
9f20c126a2 CI: Actually working firmware version detection (#365)
* Fix firmware version detection

* Fix ci

* remove release workflow
2024-11-17 00:02:30 +03:00
lucas lelievre
608fbd2eb1 Fix firmware version detection (#364) v0.5.1 2024-11-13 21:26:25 +03:00
lucas lelievre
628fe20960 CI: Have firmware version be assigned by git + Create draft release from new tag build (#360)
* Have firmware version be assigned by git + Create draft release from new tag build

* Fix quotes

* Short commit id

* Fix function call

* clang-format
v0.5.0
2024-11-08 20:25:26 +02:00
Uriel
0b882db74f Enforce clang-format on the repo (#355)
* Enforce clang-format on the repo

* improve CI config

* fix build error

* undo src format

* apply format by hand

* fix last one

* fix build error

* wat
2024-11-08 19:23:18 +02:00
lucas lelievre
50fa801653 CI: Change the filename output so it uses the board name instead of the board platform (#359)
Change the filename output so it uses the board name instead of the board platform
2024-11-08 16:43:24 +02:00
Uriel
a4a9778f62 Add announcement of magnetometer not supported (#356)
* Add announcement of magnetometer not supported

* undo platformio config

* remove debug line
2024-10-31 22:20:14 +03:00
Uriel
a9f5b1ae8c Add a way to toggle magnetometer in runtime (#341)
* Untested magnetometer toggle feature for BNO08X and overal packet structure for setting flags from the server

* Some build fixes

* refactor(configuration): rename `CalibrationConfig` to `SensorConfig`

* fix network package order

* typo found

* ignore clion files

* finish feature

* remove ota config that i used

* C skill issue on defines

* i have personal issues with C

* do a reset before

* reinit sensor

* Fix remaining merge errors

* remove BNO_USE_MAGNETOMETER_CORRECTION

* Update src/sensors/sensor.h

Co-authored-by: Lena <25586367+Vyolex@users.noreply.github.com>

* who loves tabs

* send sensorconfig instead of magdata on sensorinfo

* Bump protocol and firmware version

---------

Co-authored-by: Eiren Rain <eirenliel@users.noreply.github.com>
Co-authored-by: DevMiner <devminer@devminer.xyz>
Co-authored-by: Lena <25586367+Vyolex@users.noreply.github.com>
2024-10-30 20:23:49 +02:00
Butterscotch!
85dead25f3 Change "PASS" to "PASSWD" (#343)
Co-authored-by: Eiren Rain <Eirenliel@users.noreply.github.com>
2024-10-30 20:15:43 +02:00
jojos38
2946a6a7a6 Fix softfusion watchdog timer reset (#346)
Fix some microcontrollers crashing (Soft WDT reset) during the calibration loop
2024-10-30 20:09:29 +02:00
DevMiner
b278bcfcf4 chore: clarify protocol version (#350)
* chore: clarify protocol version

* Pull the bandaid on the test return

---------

Co-authored-by: Eiren Rain <Eirenliel@users.noreply.github.com>
2024-10-30 19:46:40 +02:00
m-RNA
e0751174e0 Enable caching to accelerate compilation (#354) 2024-10-27 08:25:52 +03:00
Butterscotch!
dbce4cb809 Add dependabot & update workflows (#344)
* Add dependabot & update workflows

* Specify python-version & use pip cache

* Add requirements.txt

* Cache PIP generally instead & remove requirements
2024-09-25 19:02:37 +03:00
Ondrej Hruska
8b000644ff GET.INFO Serial Command Should Returns Battery Voltage & Level (in Percentages) (#338)
* GET.INFO serial command return also battery voltage & level in percents

* move public headers together
2024-09-01 13:46:47 -04:00
JovannMC
fef504e3b4 Add Haritora to consts (#333)
Add haritora consts, fix misspelling
2024-06-25 14:36:31 +03:00
Przemyslaw Romaniak
ea00bebedd SoftFusion sensor framework with BMI, ICM, LSM6, MPU sensor implementations (#322)
* Update readme to mention BMI270 support.

* Soft fusion sensor initial code, wip

* Soft fusion ICM-42688-P lazy WIP implementation.

* sfusion: Cleanup, implemented sensor frequency calibration

* icm42688: add more comments, basic driver (no hw filtering) should be working

* sfustion: compilation fix

* sfusion: start calibration when upside down

* cleanup: remove confusing had data flag

* sensor manager: use unique_ptr instead of raw pointers

* sfusion: big refactoring wip

* sfusion: make aux work, at least sfusion sensors should now be functional

* sfusion: lightweight implementation of BMI270 sensor, no sensitivity cal yet

* sfusion: BMI270: added CRT and gyro zx factor. should be functionally equivalent to the old driver

* Added lsm6dsv

* Trying to work around esp32c3 compilation problem, not liking that solution

* sfusion: fix problems found after rebase

* Update README.md

* Bump Arduino core to 3.0 to match GCC12

* Remove fast pin swapping that is no longer compatible with arduino core v3

* Bring back fast pin swapping

* Update platformio-tools.ini

* Fix accel timescale (calibration no longer takes forever)

* Fix non-sfusion sensors

* Added LSM6DSO and DSR support and refactored DSV support

* Removed template float param from the implementation

* sfusion: port MPU6050 driver wip, not expecting to be functional yet

* sfusion: add headers specifying main code owners

* connection: fix warning

* update README.md

* fshelper: fixed ESP8266 regression caused by abstracting FS access

* sfusion: fix error on merge

* bno080: differentiate bno080, bno085, bno086 again

* sfusion: final touches

* restore hadData functionality, implementing it in every sensor, made configured flag bno-only

* fix address supplement in non-sfusion sensors, do i2c bus reset for all sensors

* sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamplesAndReturn function to take ms instead of seconds

* sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base

* Log FIFO overruns on LSMs

* Reset the soft watchdog while eating or collecting calibration samples

Resolves an issue where the soft watchdog would trigger.

* Fix missing word in comment, switch to constexpr

* Update esp32/esp8266

---------

Co-authored-by: Gorbit99 <gorbitgames@gmail.com>
Co-authored-by: nekomona <nekomona@nekomona.com>
Co-authored-by: nekomona <nekomona@163.com>
Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
Co-authored-by: kounocom <meia@kouno.xyz>
Co-authored-by: Kubuxu <oss@kubuxu.com>
2024-06-25 13:57:18 +03:00
Fredrik Hatletvedt
83b075b804 add macro for calculating radians (#317)
* feat: add macro for calculating radians

* style: silence unused variable warning

* remove unnecessary float cast in macro
2024-06-20 02:35:00 +03:00
Meia Kouno
3ae17abdf4 Fix enabling motion bias estimation (#325) 2024-05-04 19:35:22 -04:00
unlogisch04
d71c65cc70 fshelper: fixed ESP8266 regression caused by abstracting FS access #321 (#328)
* fshelper: fixed ESP8266 regression caused by abstracting FS access #321

* Removing not needed ifdef

l0ud spotted that this is not need.

Co-Authored-By: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com>

---------

Co-authored-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com>
2024-05-04 13:04:08 -04:00
nekomona
e09ca3c571 Merge code for applying sensorOffset and setting data ready flag (#314)
Merge applying of sensorOffset and data ready flag

Co-authored-by: nekomona <nekomona@nekomona.com>
2024-03-28 16:52:11 +02:00
DevMiner
230859d4fa Move platform specific code for FS access into an abstraction (#319)
refactor(configuration): move platform specific code for FS access into an abstraction
2024-03-26 19:09:13 +02:00
wigwagwent
993d35aaea Fix rest detection timescale (#305)
Sensor fusion expects the time to be in seconds while rest detection expects it to be in microseconds. This makes is so when the update sensor fusion is called the rest detection now gets the time in micros

Co-authored-by: Eiren Rain <Eirenliel@users.noreply.github.com>
2024-03-08 14:30:57 +02:00
Ray Votyn
44c4c259b1 Add seeed xiao esp32c3 support (#307)
* Add seeed xiao esp32c3 support

* Fix defines spacing

* Add board to platformio-tools.ini

---------

Co-authored-by: Butterscotch! <bscotchvanilla@gmail.com>
2024-02-07 23:03:50 -05:00
unlogisch04
d4cb74c328 Fix ICM20948 PacketBundling and LastData (#302)
The delay in sendData() makes at somepoint that the packetbundling does not work correctly. The ICM works without delay on ESP8266, ESP32-C3, ESP32-S2
Also added the LastData Flag for get info
2024-02-07 22:19:14 -05:00
DevMiner
2c8e41ce08 feat: allow connecting to one specific server IP without broadcasting (#301) 2024-01-18 21:24:45 -05:00
Higanbana
35da44b1f9 ESP32: Fix ADC/battery sense logic (#310)
* ESP32: Fix ADC voltage readings

* Forgot endif oops

* Refactor a little bit

* Fix spelling of 'resolution'
2024-01-18 21:24:04 -05:00
Butterscotch!
c26ec17ae9 Update BMI remap example and remove trailing spaces (#309)
Update BMI remap example & remove trailing spaces
2024-01-12 03:18:28 -05:00
Higanbana
89405da69e Remove ESP32-C3 USB CDC warning (#311) 2024-01-12 02:13:10 -05:00
Eiren Rain
b744c53676 Bump version to 0.4.0 v0.4.0 2023-11-08 17:57:51 +01:00
Eiren Rain
8a00376200 Add compliance mode to limit trasmitter power to FCC certified values 2023-11-08 17:57:41 +01:00
unlogisch04
14f2752d4d feat: commit hash (#228)
Co-authored-by: DevMiner <tobigames200@gmail.com>
Co-authored-by: nekomona <nekomona@163.com>
2023-10-13 15:57:33 +03:00
wigwagwent
a3d4321a89 Use sensorType instead of IMU define (#297)
Co-authored-by: DevMiner <devminer@devminer.xyz>
2023-10-13 15:56:30 +03:00
unlogisch04
10125c7253 Fix WiFiscan not working when not connected (#293)
Co-authored-by: DevMiner <tobigames200@gmail.com>
2023-10-13 15:55:55 +03:00
unlogisch04
26f53ae5e5 Fix serial wifi and bwifi. Crash bwifi when no ... (#298)
Co-authored-by: DevMiner <tobigames200@gmail.com>
2023-10-13 15:54:50 +03:00
Yao Wei
9968f152fc Add BOARD_WEMOSWROOM02 (#279)
Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
2023-10-02 01:52:51 +03:00
sctanf
07785c8fc8 fix Imu icm42688 (#290) 2023-09-22 20:06:14 +03:00
sctanf
1ed8d63e65 Add ICM-42688 imu and MMC5983MA magnetometer (#242) 2023-09-22 17:30:25 +03:00
nekomona
3789a4cdb8 Add GET WIFISCAN and base64 WiFi credential commands (#262) 2023-09-22 16:14:28 +03:00
unlogisch04
77d9d3229e icm20948 timeout correction because of wifi set (#289) 2023-09-22 16:12:59 +03:00
0forks
3b4ca6e627 BMI160: Fix double rest detection (#286)
Fix double rest detection with vqf
2023-09-22 16:12:19 +03:00
0forks
41f57bce5b BMI160: Fix magnetometer error check (#285)
Fix BMI160 error register checks
2023-09-22 16:11:23 +03:00
0forks
afca9b2957 BMI160: Print fusion algo name in debug log (#284)
Print fusion algo name in BMI160 debug log
2023-09-22 16:10:41 +03:00
0forks
69523f2a03 Fix mahony/madgwick updates (#283) 2023-09-22 16:10:13 +03:00
Castle McCloud
d66ebd0d97 Fix 9250 loop (#246)
Co-authored-by: Kitlith <kitlith@kitl.pw>
2023-09-21 18:04:13 +03:00