Skip to content

Commit 683740e

Browse files
committed
Thanks clang for autoimporting that, I'd appreciate if you didn't
1 parent 25e1f01 commit 683740e

3 files changed

Lines changed: 55 additions & 73 deletions

File tree

platformio.ini

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ build_unflags = -Os -std=gnu++11 -std=gnu++17
6262

6363
; Settings for different boards
6464

65-
[env:esp12e]
66-
platform = espressif8266 @ 4.2.1
67-
board = esp12e
65+
;[env:esp12e]
66+
;platform = espressif8266 @ 4.2.1
67+
;board = esp12e
6868
; Comment out this line below if you have any trouble uploading the firmware
6969
; and if it has a CP2102 on it (a square chip next to the usb port): change to 3000000 (3 million) for even faster upload speed
70-
upload_speed = 921600
70+
;upload_speed = 921600
7171

7272
; Uncomment below if you want to build for ESP-01
7373
;[env:esp01_1m]
@@ -102,16 +102,18 @@ upload_speed = 921600
102102
; -DARDUINO_USB_MODE=1
103103
; -DARDUINO_USB_CDC_ON_BOOT=1
104104

105-
;[env:esp32c3]
106-
;platform = espressif32 @ 6.7.0
107-
;platform_packages =
108-
; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1
109-
; framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip
110-
;build_flags =
111-
; ${env.build_flags}
112-
; -DESP32C3
113-
;board = lolin_c3_mini
114-
;monitor_filters = colorize, esp32_exception_decoder
105+
[env:esp32c3]
106+
platform = espressif32 @ 6.7.0
107+
platform_packages =
108+
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1
109+
framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip
110+
build_flags =
111+
${env.build_flags}
112+
-DESP32C3
113+
-DARDUINO_USB_MODE=1
114+
-DARDUINO_USB_CDC_ON_BOOT=1
115+
board = lolin_c3_mini
116+
monitor_filters = colorize, esp32_exception_decoder
115117

116118
; If you want to use a ESP32C6, you can use this (experimental)
117119
;[env:esp32c6]
@@ -122,18 +124,3 @@ upload_speed = 921600
122124
; -DESP32C6
123125
; -DARDUINO_USB_MODE=1
124126
; -DARDUINO_USB_CDC_ON_BOOT=1
125-
126-
;[env:BOARD_ESP32S3_SUPERMINI]
127-
;platform = espressif32 @ 6.7.0
128-
;platform_packages =
129-
; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1
130-
; framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip
131-
;build_flags =
132-
; ${env.build_flags}
133-
; -DARDUINO_USB_MODE=1
134-
; -DESP32S3
135-
;board = esp32s3_supermini
136-
;board_upload.use_1200bps_touch = 1
137-
;board_upload.wait_for_upload_port = 1
138-
;board_upload.require_upload_port = 1
139-
;upload_speed = 921600

src/defines.h

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,53 +26,50 @@
2626
// ================================================
2727

2828
// Set parameters of IMU and board used
29-
#ifndef IMU
30-
#define IMU IMU_AUTO
31-
#endif
32-
#ifndef SECOND_IMU
33-
#define SECOND_IMU IMU_AUTO
34-
#endif
35-
#ifndef BOARD
36-
#define BOARD BOARD_SLIMEVR_V1_2
37-
#endif
38-
#ifndef IMU_ROTATION
29+
#define IMU IMU_ICM45686
30+
#define SECOND_IMU IMU
31+
#define BOARD BOARD_CUSTOM
3932
#define IMU_ROTATION DEG_270
40-
#endif
41-
#ifndef SECOND_IMU_ROTATION
4233
#define SECOND_IMU_ROTATION DEG_270
43-
#endif
4434

45-
#ifndef PRIMARY_IMU_OPTIONAL
4635
#define PRIMARY_IMU_OPTIONAL false
47-
#endif
48-
#ifndef SECONDARY_IMU_OPTIONAL
4936
#define SECONDARY_IMU_OPTIONAL true
50-
#endif
5137

52-
// Set I2C address here or directly in IMU_DESC_ENTRY for each IMU used
53-
// If not set, default address is used based on the IMU and Sensor ID
54-
// #define PRIMARY_IMU_ADDRESS_ONE 0x4a
55-
// #define SECONDARY_IMU_ADDRESS_TWO 0x4b
38+
#define MAX_SENSORS_COUNT 2
39+
#define TRACKER_TYPE TrackerType::TRACKER_TYPE_SVR_ROTATION
5640

57-
#ifndef BATTERY_MONITOR
58-
// Battery monitoring options (comment to disable):
59-
// BAT_EXTERNAL for ADC pin,
60-
// BAT_INTERNAL for internal - can detect only low battery,
61-
// BAT_MCP3021 for external ADC connected over I2C
62-
#define BATTERY_MONITOR BAT_EXTERNAL
41+
#ifndef SENSOR_DESC_LIST
42+
#define SENSOR_DESC_LIST \
43+
SENSOR_DESC_ENTRY( \
44+
IMU, \
45+
PRIMARY_IMU_ADDRESS_ONE, \
46+
IMU_ROTATION, \
47+
DIRECT_WIRE(PIN_IMU_SCL, PIN_IMU_SDA), \
48+
PRIMARY_IMU_OPTIONAL, \
49+
DIRECT_PIN(PIN_IMU_INT), \
50+
0 \
51+
) \
52+
SENSOR_DESC_ENTRY( \
53+
SECOND_IMU, \
54+
SECONDARY_IMU_ADDRESS_TWO, \
55+
SECOND_IMU_ROTATION, \
56+
DIRECT_WIRE(PIN_IMU_SCL, PIN_IMU_SDA), \
57+
SECONDARY_IMU_OPTIONAL, \
58+
DIRECT_PIN(PIN_IMU_INT_2), \
59+
0 \
60+
)
6361
#endif
6462

65-
// --- OVERRIDES FOR DEFAULT PINS
66-
67-
// #define PIN_IMU_SDA 14
68-
// #define PIN_IMU_SCL 12
69-
// #define PIN_IMU_INT 16
70-
// #define PIN_IMU_INT_2 13
71-
// #define PIN_BATTERY_LEVEL 17
72-
// #define LED_PIN 2
73-
// #define LED_INVERTED true
74-
// #define BATTERY_SHIELD_RESISTANCE 0
75-
// #define BATTERY_SHIELD_R1 10
76-
// #define BATTERY_SHIELD_R2 40.2
63+
#define BATTERY_MONITOR BAT_EXTERNAL
7764

78-
// ------------------------------
65+
#define ON_OFF_BUTTON_PIN 1
66+
#define PIN_IMU_SDA 5
67+
#define PIN_IMU_SCL 6
68+
#define PIN_IMU_INT 255
69+
#define PIN_IMU_INT_2 255
70+
#define PIN_BATTERY_LEVEL 3
71+
#define LED_PIN 0
72+
#define LED_INVERTED true
73+
#define BATTERY_SHIELD_RESISTANCE 0
74+
#define BATTERY_SHIELD_R1 150
75+
#define BATTERY_SHIELD_R2 150

src/network/wifihandler.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
*/
23-
#include "network/wifihandler.h"
24-
2523
#include "GlobalVars.h"
26-
#include "WiFi.h"
27-
#include "esp_wifi_types.h"
2824
#include "globals.h"
25+
#include "network/wifihandler.h"
2926
#if !ESP8266
3027
#include "esp_wifi.h"
28+
#include "esp_wifi_types.h"
3129
#endif
3230

3331
namespace SlimeVR {

0 commit comments

Comments
 (0)