mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +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!!
|
## !!Important note: Apostrophes inside of quotes ex: "a't" are NOT ALLOWED. This will fail to build!!
|
||||||
|
|
||||||
[wifi]
|
[wifi]
|
||||||
ssid = ""
|
ssid = "ARRIS-4039-5G"
|
||||||
password = ""
|
password = "145080724114"
|
||||||
mdnsname = "openiristracker"
|
mdnsname = "babble"
|
||||||
channel = 1
|
channel = 1
|
||||||
ap_ssid = "EyeTrackVR"
|
ap_ssid = "EyeTrackVR"
|
||||||
ap_password = "12345678"
|
ap_password = "12345678"
|
||||||
|
|||||||
@ -38,6 +38,7 @@ struct DeviceStates {
|
|||||||
WiFiState_Connecting,
|
WiFiState_Connecting,
|
||||||
WiFiState_Connected,
|
WiFiState_Connected,
|
||||||
WiFiState_ADHOC,
|
WiFiState_ADHOC,
|
||||||
|
WiFiState_USB,
|
||||||
WiFiState_Error
|
WiFiState_Error
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -80,6 +80,10 @@ void etvr_eye_tracker_web_init() {
|
|||||||
}
|
}
|
||||||
#endif // ETVR_EYE_TRACKER_WEB_API
|
#endif // ETVR_EYE_TRACKER_WEB_API
|
||||||
|
|
||||||
|
bool isUSBConnected() {
|
||||||
|
return Serial.availableForWrite() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
setCpuFrequencyMhz(240);
|
setCpuFrequencyMhz(240);
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
@ -104,11 +108,14 @@ void setup() {
|
|||||||
|
|
||||||
serialManager.init();
|
serialManager.init();
|
||||||
|
|
||||||
#ifndef ETVR_EYE_TRACKER_USB_API
|
// Check if USB is connected
|
||||||
etvr_eye_tracker_web_init();
|
if (isUSBConnected()) {
|
||||||
#else // ETVR_EYE_TRACKER_WEB_API
|
log_i("USB connection detected, enabling USB mode");
|
||||||
WiFi.disconnect(true);
|
WiFi.disconnect(true);
|
||||||
#endif // ETVR_EYE_TRACKER_WEB_API
|
} else {
|
||||||
|
log_i("No USB connection detected, trying WiFi mode");
|
||||||
|
etvr_eye_tracker_web_init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user