mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-09-26 23:29:14 +08:00
Slay
This commit is contained in:
parent
2b259ee727
commit
d68a181673
BIN
ESP/.DS_Store
vendored
Normal file
BIN
ESP/.DS_Store
vendored
Normal file
Binary file not shown.
@ -3,9 +3,9 @@
|
||||
## !!Important note: Apostrophes inside of quotes ex: "a't" are NOT ALLOWED. This will fail to build!!
|
||||
|
||||
[wifi]
|
||||
ssid = ""
|
||||
password = ""
|
||||
mdnsname = "openiristracker"
|
||||
ssid = "ARRIS-4039-5G"
|
||||
password = "145080724114"
|
||||
mdnsname = "babble"
|
||||
channel = 1
|
||||
ap_ssid = "EyeTrackVR"
|
||||
ap_password = "12345678"
|
||||
|
@ -38,6 +38,7 @@ struct DeviceStates {
|
||||
WiFiState_Connecting,
|
||||
WiFiState_Connected,
|
||||
WiFiState_ADHOC,
|
||||
WiFiState_USB,
|
||||
WiFiState_Error
|
||||
};
|
||||
|
||||
|
@ -80,6 +80,10 @@ void etvr_eye_tracker_web_init() {
|
||||
}
|
||||
#endif // ETVR_EYE_TRACKER_WEB_API
|
||||
|
||||
bool isUSBConnected() {
|
||||
return Serial.availableForWrite() > 0;
|
||||
}
|
||||
|
||||
void setup() {
|
||||
setCpuFrequencyMhz(240);
|
||||
Serial.begin(115200);
|
||||
@ -104,11 +108,14 @@ void setup() {
|
||||
|
||||
serialManager.init();
|
||||
|
||||
#ifndef ETVR_EYE_TRACKER_USB_API
|
||||
etvr_eye_tracker_web_init();
|
||||
#else // ETVR_EYE_TRACKER_WEB_API
|
||||
WiFi.disconnect(true);
|
||||
#endif // ETVR_EYE_TRACKER_WEB_API
|
||||
// Check if USB is connected
|
||||
if (isUSBConnected()) {
|
||||
log_i("USB connection detected, enabling USB mode");
|
||||
WiFi.disconnect(true);
|
||||
} else {
|
||||
log_i("No USB connection detected, trying WiFi mode");
|
||||
etvr_eye_tracker_web_init();
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
Loading…
Reference in New Issue
Block a user