* Cleanup scanI2C library
* Fixed formatting issues
* First round of changes based on feedback
* Fixed a fat fingered mistake
* Actually fix the formatting issues
* Send vendor information on handshake
Embed vendor information into build parameters & defines so SlimeVR vendors can maintain their own firmware updates without adding new boards
Bump protocol version to 21
* Fix build flags quotes
* Report in GET TEST if magnetometer is not found
* Remove vendor flags from platformio.ini
* Fix 0 byte string sending and check for lengths
* Formatting
* Make sure the size assert actually works
* Formatting
* Update src/globals.h
Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
* Log vendor information
* Formatting
---------
Co-authored-by: gorbit99 <gorbitgames@gmail.com>
Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
* Make SPI work
Move sensor building logic to a separate class and file
Don't use templates for RegisterInterface/I2CImpl/SPIImpl
This started getting ridiculous, now we can actually maintain it.
Make BNO085 work again
Add BNO to automatic detection, remove a bunch of others
Not all IMU types are enabled right now due to code size optimization, but it could be expanded in the future with optimization of Softfusion.
Pick IMU type automatically by asking it
* ESP32 spelling fix (#396)
Fix: ES32 -> ESP32
* (Probably) multiply acceleration by tracker rotation offset
* Remove stome stuff from softfusionsensor
* Missed stuff
* Undo defines changes
* Undo debug.h changes
* Uses32BitSensorData is unneccessary now
* Remove some unnecessary variables
* Cleanup some logging text
* Formatting
* Split SensorBuilder into a header-source file pair
* Fix copyright
* Fix some issues with glove after all the changes
Add definitions for SlimeVR v1.2
Fix typo and add comments to quaternion sandwich function
* Add NO_WIRE definition for SPI devices
* Fix formatting
* Minor fix
* If ICM-45686 not found, ask again nicely
* Fix MCP interface not building
* Remove uneccessary "default" ctor from SPIImpl
* Remove buildSensorReal
* Invert if statement in sensorbuilder+
* Fix formatting
* If ICM-45686 not found, ask again nicely
* Fix MCP interface not building
* Fix formatting
* Various cleanup
* Formattign
* Fix detected logic
* Remove unnecessary Self using
* For some reason this fixes memory corruption issues
* Formatting
* This actually works this time
* Small cleanup
* Remove some unused includes
* Formatting
* Mag support (Attempt 2) (#458)
* WhoAmI check working
* In theory this should be setting up the mag
* Not sure how that happened
* Add magnetometer status to GET TEST and GET INFO
* Formatting
* Formatting 2
---------
Co-authored-by: Eiren Rain <Eirenliel@users.noreply.github.com>
Co-authored-by: Butterscotch! <bscotchvanilla@gmail.com>
* fix debugbuild
* make all esp32 define the same
only check if ESP32 is defined. The value changed from "1" to "ESP32" in pioarduino and tasmota in newer versions.
* Run CI for new boards with own defines
* Do not redefine board when defined from CI or other places
* Move sensor defaults to the separate file too
* Add comment to sensor offset
* Add a way to ask for raw accel from BNO08X
* Merge fix
* Update from suggestions
* Fix typos
* Move some stuff around and apply suggestions
* Fix formatting
* Add defines for all other boards too
* Make glove buildable
* Make failed build report better
* Make SPI work
Move sensor building logic to a separate class and file
Don't use templates for RegisterInterface/I2CImpl/SPIImpl
This started getting ridiculous, now we can actually maintain it.
Make BNO085 work again
Add BNO to automatic detection, remove a bunch of others
Not all IMU types are enabled right now due to code size optimization, but it could be expanded in the future with optimization of Softfusion.
Pick IMU type automatically by asking it
* ESP32 spelling fix (#396)
Fix: ES32 -> ESP32
* (Probably) multiply acceleration by tracker rotation offset
* Split SensorBuilder into a header-source file pair
* Fix copyright
* Fix some issues with glove after all the changes
Add definitions for SlimeVR v1.2
Fix typo and add comments to quaternion sandwich function
* Add NO_WIRE definition for SPI devices
* Fix formatting
* Minor fix
* If ICM-45686 not found, ask again nicely
* Fix MCP interface not building
* Remove uneccessary "default" ctor from SPIImpl
* Remove buildSensorReal
* Invert if statement in sensorbuilder+
* Fix formatting
* If ICM-45686 not found, ask again nicely
* Fix MCP interface not building
* Fix formatting
* Various cleanup
* Formattign
---------
Co-authored-by: Butterscotch! <bscotchvanilla@gmail.com>
Co-authored-by: gorbit99 <gorbitgames@gmail.com>
* [ICM45*] Fix processing bad samples and stack overflow panics
1. At startup, we were receiving invalid samples from the IMU and passing it to
VQF. This causes huge initial rotations and accelerations that takes time
for VQF to eliminate.
Fix is to check the header to see if the data is present. Also had to add a
check for invalid gyro samples even though it is present.
2. During play, the tracker would rarely go haywire and jump into a random
position. I suspect this is caused by a stack overflow, which causes the
tracker to panic. Combined with problem (1), whenever the tracker restarts,
it would send huge rotations and accelerations to the server. This causes
the jump.
Fix is to make the read_buffer static, so that it's reserved on the BSS
segment instead of the stack. I noticed this because I was getting panics
when I tried to increase the size of the read buffer, or declared some new
stack variables.
After implementing these two fixes, rotation and acceleration are stable at
startup, and I am able to make modifications to the icm45base code without
randomly encountering panics.
* Always read one fewer packet to prevent AN-000364 2.16 errata
* BNO085 add more Features and Readouts to the lib
* BNO085 add
- Experimental compiler flags for disable Calibration
- Temp Readout (all 1 sec)
- Inspection only send when updated
- added conginue as 1 imu.dataAvailable() only reads out 1 packet of data
* BNO085 add source of info
After a reboot of the tracker the optional sensor did show up on the server too.
This is because a sensor packet was sent from all sensors including empty and unknown.
This should hopefully fix the issue.
It is a fast fix. It probably would be better to move all this check to sensor, and if the sensor has a chang set the flag, and reset the flag if the function gets called.
* Refactor toggles into separate class
* Add vqf toggles to config bits
* Load toggles into the sensor
* Mark correct toggles as supported for VQF
* Zero out calibration if it's disabled for softfusioncalibration
* Fix BNO085 typo
* Formatting
* hotfix: scan for IMU on bus twice
* hotfix: never fully empty icm45 fifo
* leave one packet, not one byte
* Formatting
---------
Co-authored-by: gorbit99 <gorbitgames@gmail.com>
* fix_sensorConfigData Magnetometer not avaliable on Server
* fix formating
* Send Sensor Configuration changes to Server.
before the Magnetometerchanges would not have been sent to the Server.
* Formating
* Refactor packets into structures
* Remove left in packet code
* Swap multi-byte data to big endian
* Refactor convert_to_bytes to use std::reverse instead
* Missed removing some old code
* Fix convert_to_chars refactor
* Add comment to legacy fields
* Add back rest of cut off comment